synthesizer.photometry¶
A module for working with photometry derived from an Sed.
This module contains a single class definition which acts as a container for photometry data. It should never be directly instantiated, instead internal methods that calculate photometry (e.g. Sed.get_photo_lnu) return an instance of this class.
Classes
- class synthesizer.photometry.PhotometryCollection(filters, **kwargs)[source]¶
A container for photometry data.
This represents a collection of photometry values and provides unit association and plotting functionality.
This is a utility class returned by functions elsewhere. Although not an issue if it is this should never really be directly instantiated.
- filters¶
The FilterCollection used to produce the photometry.
- Type:
- filter_codes¶
List of filter codes.
- Type:
list
- _look_up¶
A dictionary for easy access to photometry values using filter codes.
- Type:
dict
- items()[source]¶
Enable dict.items() behaviour.
- Returns:
- dict_items
A dict_items object containing the filter codes and photometry.
- plot_photometry(fig=None, ax=None, show=False, ylimits=(), xlimits=(), marker='+', figsize=(3.5, 5))[source]¶
Plot the photometry alongside the filter curves.
- Parameters:
fig (matplotlib.figure.Figure, optional) – A pre-existing Matplotlib figure. If None, a new figure will be created.
ax (matplotlib.axes._axes.Axes, optional) – A pre-existing Matplotlib axes. If None, new axes will be created.
show (bool, optional) – If True, the plot will be displayed.
ylimits (tuple, optional) – Tuple specifying the y-axis limits for the plot.
xlimits (tuple, optional) – Tuple specifying the x-axis limits for the plot.
marker (str, optional) – Marker style for the photometry data points.
figsize (tuple, optional) – Tuple specifying the size of the figure.
- Returns:
The Matplotlib figure and axes used for the plot.
- Return type:
tuple
Examples using synthesizer.photometry.PhotometryCollection
¶
Generate parametric observed SED
Generate parametric galaxy SED