file_formats_used_by_pyfstat.md 2.46 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# 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](https://github.com/dfm/corner.py) 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()`.