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_luminosities) 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.

photometry

Quantity instance representing photometry data.

Type:

Quantity

photo_luminosities

Quantity instance representing photometry data in the rest frame.

Type:

Quantity

photo_fluxes

Quantity instance representing photometry data in the observer frame.

Type:

Quantity

filters

The FilterCollection used to produce the photometry.

Type:

FilterCollection

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.

keys()[source]

Enable dict.keys() behaviour.

Returns:

list

A list of filter codes.

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

values()[source]

Enable dict.values() behaviour.

Returns:

dict_values

A dict_values object containing the photometry.

Examples using synthesizer.photometry.PhotometryCollection

Generate parametric observed SED

Generate parametric observed SED

Generate parametric galaxy SED

Generate parametric galaxy SED