species.plot package

Submodules

species.plot.plot_color module

Module with functions for creating color-magnitude and color-color plots.

species.plot.plot_color.plot_color_color(colorbox, objects=None, models=None, mass_labels=None, companion_labels=False, field_range=None, label_x='color [mag]', label_y='color [mag]', xlim=None, ylim=None, offset=None, legend='upper left', output='color-color.pdf')[source]
Parameters:
  • colorbox (species.core.box.ColorColorBox, None) – Box with the colors and magnitudes.
  • objects (tuple(tuple(str, str, str, str), ),) – tuple(tuple(str, str, str, str, str, str, float, float), ), None Tuple with individual objects. The objects require a tuple with their database tag, the two filter IDs for the first color, and the two filter IDs for the second color. Optionally, the horizontal and vertical alignment and fractional offset values can be provided for the label can be provided (default: ‘left’, ‘bottom’, 8e-3, 8e-3). Not used if set to None.
  • models (tuple(species.core.box.ColorMagBox, ), None) – Tuple with ColorColorBox objects which have been created from the isochrone data with get_color_color(). These boxes contain synthetic photometry for a given age and a range of masses. Not used if set to None.
  • mass_labels (list(float, ), None) – Plot labels with masses next to the isochrone data of models. The list with masses has to be provided in Jupiter mass. No labels are shown if set to None.
  • companion_labels (bool) – Plot labels with the names of the directly imaged companions.
  • field_range (tuple(str, str), None) – Range of the discrete colorbar for the field dwarfs. The tuple should contain the lower and upper value (‘early M’, ‘late M’, ‘early L’, ‘late L’, ‘early T’, ‘late T’, ‘early Y). The full range is used if set to None.
  • label_x (str) – Label for the x-axis.
  • label_y (str) – Label for the y-axis.
  • output (str) – Output filename.
  • xlim (tuple(float, float)) – Limits for the x-axis.
  • ylim (tuple(float, float)) – Limits for the y-axis.
  • offset (tuple(float, float)) – Offset of the x- and y-axis label.
  • legend (str) – Legend position.
Returns:

Return type:

None

species.plot.plot_color.plot_color_magnitude(colorbox=None, objects=None, isochrones=None, models=None, mass_labels=None, companion_labels=False, field_range=None, label_x='color [mag]', label_y='M [mag]', xlim=None, ylim=None, offset=None, legend='upper left', output='color-magnitude.pdf')[source]
Parameters:
  • colorbox (list(species.core.box.ColorMagBox, ), None) – Boxes with the colors and magnitudes. Not used if set to None.
  • objects (tuple(tuple(str, str, str, str), ),) – tuple(tuple(str, str, str, str, str, str, float, float), ), None Tuple with individual objects. The objects require a tuple with their database tag, the two filter IDs for the color, and the filter ID for the absolute magnitude. Optionally, the horizontal and vertical alignment and fractional offset values can be provided for the label can be provided (default: ‘left’, ‘bottom’, 8e-3, 8e-3). Not used if set to None.
  • isochrones (tuple(species.core.box.IsochroneBox, ), None) – Tuple with boxes of isochrone data. Not used if set to None.
  • models (tuple(species.core.box.ColorMagBox, ), None) – Tuple with ColorMagBox objects which have been created from the isochrone data with get_color_magnitude(). These boxes contain synthetic photometry for a given age and a range of masses. Not used if set to None.
  • mass_labels (list(float, ), None) – Plot labels with masses next to the isochrone data of models. The list with masses has to be provided in Jupiter mass. No labels are shown if set to None.
  • companion_labels (bool) – Plot labels with the names of the directly imaged companions.
  • field_range (tuple(str, str), None) – Range of the discrete colorbar for the field dwarfs. The tuple should contain the lower and upper value (‘early M’, ‘late M’, ‘early L’, ‘late L’, ‘early T’, ‘late T’, ‘early Y). The full range is used if set to None.
  • label_x (str) – Label for the x-axis.
  • label_y (str) – Label for the y-axis.
  • xlim (tuple(float, float)) – Limits for the x-axis.
  • ylim (tuple(float, float)) – Limits for the y-axis.
  • legend (str, None) – Legend position. Not shown if set to None.
  • output (str) – Output filename.
Returns:

Return type:

None

species.plot.plot_mcmc module

Module for plotting MCMC results.

species.plot.plot_mcmc.plot_photometry(tag, filter_id, burnin=None, xlim=None, output='photometry.pdf')[source]

Function to plot the posterior distribution of the synthetic photometry.

Parameters:
  • tag (str) – Database tag with the MCMC samples.
  • filter_id (str) – Filter ID.
  • burnin (int, None) – Number of burnin steps to exclude. All samples are used if set to None.
  • xlim (tuple(float, float), None) – Axis limits. Automatically set if set to None.
  • output (strr) – Output filename.
Returns:

Return type:

None

species.plot.plot_mcmc.plot_posteriors(tag, burnin=None, title=None, offset=None, title_fmt='.2f', limits=None, output='posterior.pdf')[source]

Function to plot the posterior distributions.

Parameters:
  • tag (str) – Database tag with the MCMC samples.
  • burnin (int, None) – Number of burnin steps to exclude. All samples are used if set to None.
  • title (str, None) – Plot title.
  • offset (tuple(float, float), None) – Offset of the x- and y-axis label.
  • title_fmt (str) – Format of the median and error values.
  • limits (tuple(tuple(float, float), ), None) – Axis limits of all parameters. Automatically set if set to None.
  • output (str) – Output filename.
Returns:

Return type:

None

species.plot.plot_mcmc.plot_walkers(tag, nsteps=None, offset=None, output='walkers.pdf')[source]

Function to plot the step history of the walkers.

Parameters:
  • tag (str) – Database tag with the MCMC samples.
  • nsteps (int) – Number of steps.
  • offset (tuple(float, float)) – Offset of the x- and y-axis label.
  • output (str) – Output filename.
Returns:

Return type:

None

species.plot.plot_spectrum module

Module with a function for plotting spectra.

species.plot.plot_spectrum.plot_spectrum(boxes, filters=None, residuals=None, colors=None, xlim=None, ylim=None, scale=('linear', 'linear'), title=None, offset=None, legend='upper left', figsize=(7.0, 5.0), object_type='planet', quantity='flux', output='spectrum.pdf')[source]
Parameters:
  • boxes (list(species.core.box, )) – Boxes with data.
  • filters (list(str, ), None) – Filter IDs for which the transmission profile is plotted. Not plotted if set to None.
  • residuals (species.core.box.ResidualsBox, None) – Box with residuals of a fit. Not plotted if set to None.
  • colors (list(str, ), None) – Colors to be used for the different boxes. Note that a box with residuals requires a tuple with two colors (i.e., for the photometry and spectrum). Automatic colors are used if set to None.
  • xlim (tuple(float, float)) – Limits of the x-axis.
  • ylim (tuple(float, float)) – Limits of the y-axis.
  • scale (tuple(str, str)) – Scale of the axes (‘linear’ or ‘log’).
  • title (str) – Title.
  • offset (tuple(float, float)) – Offset for the label of the x- and y-axis.
  • legend (str, None) – Location of the legend.
  • figsize (tuple(float, float)) – Figure size.
  • object_type (str) – Object type (‘planet’ or ‘star’). With ‘planet’, the radius and mass are expressed in Jupiter units. With ‘star’, the radius and mass are expressed in solar units.
  • quantity (str) – The quantity of the y-axis (‘flux’ or ‘magnitude’).
  • output (str) – Output filename.
Returns:

None

Return type:

NoneType

Module contents