Skip to content
Snippets Groups Projects
Select Git revision
  • 72-improve-docs-for_optimal_setup
  • master default protected
  • os-path-join
  • develop-GA
  • add-higher-spindown-components
  • v1.3
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
10 results

file_formats_used_by_pyfstat.md

Blame
  • File formats used by PyFstat

    This page documents the various file formats and how they are used.

    MCMC Searches:

    Data output

    • outdir/label.log: On importing pyfstat, two logging streams are setup: one stream which is written to the terminal, and a second which is saved to a file outdir/label.log where the outdir and label are given when initialising the search. While the terminal output can be suppressed with the -q flag, the file is always written with a log-level set to INFO. This file is never overwritten, so can be used to search for changes in the setup or old results.

    • outdir/label.par: A parameter file containing the maximum detection stat. value, and estimates of the best-fit parameters. This can be read in with read_par() and written with write_par().

    • outdir/label_saved_data.p: Upon succesful completion of an MCMC search, the results will be saved to a python pickle file. This pickle file can subsequently be read back and contains many useful outputs such as the sampler object, the lnprobs and lnlikes from the run, and of course the chains themselves. Rerunning a script with different parameters, the pickle is overwritten once the simulation completes, however, a backup is saved with an appended .old label.

    Image output

    • outdir/label_walkers.png: The position of all temperature 0 walkers during the burn-in + production stage. In addition, the final panel plots a histogram of the detection statistic from all temperature 0 walkers; if a burn-in period is defined this is computed separately and colored red.

    • outdir/label_init_i_walkers.png: The same as the walkers, but for the ith initialisation stage.

    • outdir/label_corner.png: A corner plot of the production samples using the corner package. This file is generated by plot_corner().

    • outdir/label_prior_posterior.png: A plot showing the prior and a KDE of the posterior, generated by plot_prior_posterior()

    Grid searches

    Data output

    • outdir/label_grid_FS.txt: Upon succesful completion of a grid search, the grid points are saved in plain text format. The order is set by get_input_data_array with an additional column being the output detection statistic.

    Image output

    • outdir/label_1D.png

    • outdir/label_2D.png: A 2D contour plot of the detection statitistic over the range of parameters; options exist to flatten higher dimension searches. Generated using plot_2D().