petitRADTRANS.retrieval.plotting

Module Contents

Functions

plot_specs(fig, ax, path, name, nsample, color1, ...)

plot_data(fig, ax, data[, resolution, scaling])

contour_corner(sampledict, parameter_names[, ...])

Use the corner package to plot the posterior distributions produced by pymultinest.

contour_corner_large(sampledict, parameter_names[, ...])

Use the corner package to plot the posterior distributions produced by pymultinest.

nice_corner(samples, parameter_names, output_file[, ...])

Paul's custom hex grid corner plots.

petitRADTRANS.retrieval.plotting.plot_specs(fig, ax, path, name, nsample, color1, color2, zorder, rebin_val=None)
petitRADTRANS.retrieval.plotting.plot_data(fig, ax, data, resolution=None, scaling=1.0)
petitRADTRANS.retrieval.plotting.contour_corner(sampledict, parameter_names, output_file=None, parameter_ranges=None, parameter_plot_indices=None, true_values=None, short_name=None, legend=False, prt_plot_style=True, plot_best_fit=False, colors=None, quintiles=[0.16, 0.5, 0.84], **kwargs)

Use the corner package to plot the posterior distributions produced by pymultinest.

Args:
sampledictdict

A dictionary of samples, each sample has shape (N_Samples,N_params). The keys of the dictionary correspond to the names of each retrieval, and are the prefixes to the post_equal_weights.dat files. These are passed as arguments to retrieve.py. By default, this is only the current retrieval, and plots the posteriors for a single retrieval. If multiple names are passed, they are overplotted on the same figure.

parameter_namesdict

A dictionary with keys for each retrieval name, as in sampledict. Each value of the dictionary is the names of the parameters to beplotted, as set in the run_definition file.

output_filestr

Output file name

parameter_rangesdict

A dictionary with keys for each retrieval name as in sampledict. Each value contains the ranges of parameters that have a range set with corner_range in the parameter class. Otherwise the range is +/- 4 sigma

parameter_plot_indicesdict

A dictionary with keys for each retrieval name as in sampledict. Each value contains the indices of the sample to plot, as set by the plot_in_corner parameter of the parameter class

true_valuesdict

A dictionary with keys for each retrieval name as in sampledict. Each value contains the known values of the parameters.

short_namedict

A dictionary with keys for each retrieval name as in sampledict. Each value contains the names to be plotted in the corner plot legend. If non, uses the retrieval names used as keys for sampledict

legendbool

Turn the legend on or off

prt_plot_stylebool

Use the prt plot style, changes the colour scheme and fonts to match the rest of the prt plots.

plot_best_fitbool

Plot the maximum likelihood values as vertical lines for each parameter.

colorslist

List of colours for plotting multiple retrievals.

kwargsdict

Each kwarg can be one of the kwargs used in corner.corner. These can be used to adjust the title_kwargs,label_kwargs,hist_kwargs, hist2d_kawargs or the contour kwargs. Each kwarg must be a dictionary with the arguments as keys and values as the values.

petitRADTRANS.retrieval.plotting.contour_corner_large(sampledict, parameter_names, output_file=None, parameter_ranges=None, parameter_plot_indices=None, true_values=None, short_name=None, legend=False, prt_plot_style=True, plot_best_fit=False, use_labels_as_titles=True, quintiles=None, colors=None, **kwargs)

Use the corner package to plot the posterior distributions produced by pymultinest.

Args:
sampledictdict

A dictionary of samples, each sample has shape (N_Samples,N_params). The keys of the dictionary correspond to the names of each retrieval, and are the prefixes to the post_equal_weights.dat files. These are passed as arguments to retrieve.py. By default, this is only the current retrieval, and plots the posteriors for a single retrieval. If multiple names are passed, they are overplotted on the same figure.

parameter_namesdict

A dictionary with keys for each retrieval name, as in sampledict. Each value of the dictionary is the names of the parameters to beplotted, as set in the run_definition file.

output_filestr

Output file name

parameter_rangesdict

A dictionary with keys for each retrieval name as in sampledict. Each value contains the ranges of parameters that have a range set with corner_range in the parameter class. Otherwise the range is +/- 4 sigma

parameter_plot_indicesdict

A dictionary with keys for each retrieval name as in sampledict. Each value contains the indices of the sample to plot, as set by the plot_in_corner parameter of the parameter class

true_valuesdict

A dictionary with keys for each retrieval name as in sampledict. Each value contains the known values of the parameters.

short_namedict

A dictionary with keys for each retrieval name as in sampledict. Each value contains the names to be plotted in the corner plot legend. If non, uses the retrieval names used as keys for sampledict

legendbool

Turn the legend on or off

prt_plot_stylebool

Use the prt plot style, changes the colour scheme and fonts to match the rest of the prt plots.

kwargsdict

Each kwarg can be one of the kwargs used in corner.corner. These can be used to adjust the title_kwargs,label_kwargs,hist_kwargs, hist2d_kawargs or the contour kwargs. Each kwarg must be a dictionary with the arguments as keys and values as the values.

petitRADTRANS.retrieval.plotting.nice_corner(samples, parameter_names, output_file, N_samples=None, parameter_ranges=None, parameter_plot_indices=None, true_values=None, max_val_ratio=None)

Paul’s custom hex grid corner plots. Won’t work with sampledict setup in retrieve.py!