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]¶
Return a tuple of both the filter codes and photometry.
- Returns:
- dict_items
A dict_items object containing the filter codes and photometry.
- keys()[source]¶
Return the filter codes (keys) of the photometry.
- Returns:
- list
A list of filter codes.
- property ndim¶
Return the number of dimensions of the photometry array.
- Returns:
- int
The number of dimensions of the photometry array.
- 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
- select(*filter_codes)[source]¶
Return a PhotometryCollection with only the specified filters.
- Parameters:
filter_codes (list, string) – The filter codes of the desired photometry.
- property shape¶
Return the shape of the photometry array.
- Returns:
- tuple
The shape of the photometry array.