jacopo-chevallard / PyP-BEAGLE

4 stars 1 forks source link

Upload Python Package

PyP-BEAGLE

PyP-BEAGLE (Python Postprocessing of BEAGLE) is a Python package to postprocess the analyses performed with the galaxy SED modelling tool Beagle (BayEsian Analysis of GaLaxy sEds). PyP-BEAGLE allows one to create different types of publication-quality plots, LaTeX tables, as well as several higher level "summary" catalogues.

Installing PyP-BEAGLE

Known issues

Using PyP-BEAGLE

The post-processing of Beagle results is performed by means of the command pyp_beagle. Since PyP-BEAGLE is often updated, you can visualize the (entire) possible options via the PyP-BEAGLE help, with the command

pyp_beagle --help

Below we report a few of some common PyP-BEAGLE use cases and related commands.

Plotting the posterior probability distributions (aka "triangle plots")

Command

pyp_beagle -r <your Beagle results folder> \
--plot-triangle \
[-np <number of processors>] \
[--json-triangle <JSON triangle file>] \
[--mock-catalogue <input mock catalogue>] \
[--json-mock <JSON mock file>]

where

Output

The successful execution of the script will create a set of *_triangle.pdf files (one per object) in the <your Beagle results folder>/pyp-beagle/plot folder.

Plotting the comparison of data and model observables (aka "marginal plots")

Command

pyp_beagle -r <your Beagle results folder> \
--plot-marginal \
[-np <number of processors>] \
[--log-wavelength] \
[--plot-line-labels] \
[--spectral-resolution <resolution>] \

where

Output

The successful execution of the script will create a set of *_marginal_SED_spec.pdf files (one per object) in the <your Beagle results folder>/pyp-beagle/plot folder.

Computing a summary catalogue

Command

pyp_beagle -r <your Beagle results folder> 
--compute-summary
[--json-summary <JSON summary file>]

where

Output

The successful execution of the script will create the file <your Beagle results folder>/pyp-beagle/data/BEAGLE_summary_catalogue.fits.

Description

In the POSTERIOR PDF extension we have added some quantities related to the MAP = Maximum-a-Posteriori solution, namely the probability (MAP_probability), log-likelihood (MAP_ln_likelihood), chi-square (MAP_chi_square), and number of data points used in the fitting (MAP_n_data). These quantities enable a quick "frequentist-like" check of the goodness-of-the-fit of the MAP solution.

The physical parameters corresponding to the MAP solution are indicated as <parameter_name>_MAP (e.g. mass_MAP).

Plotting the comparison of input and retrieved parameters when fitting mock observations

Command

pyp_beagle -r <your Beagle results folder> 
--mock-catalogue <input mock catalogue> \
--json-mock <JSON mock file>

where

Output

The successful execution of the script will create the files <your Beagle results folder>/pyp-beagle/plot/BEAGLE_mock_retrieved_params_hist.pdf and <your Beagle results folder>/pyp-beagle/plot/BEAGLE_mock_retrieved_params.pdf.