FilterSet

class sed_analysis_tools.sed_analysis_tools.FilterSet(*, list_files: List[str] | None = None, list_pivot_wavelengths: Quantity | None = None, list_filter_names: List[str] | None = None, dir_filter_transmission: str | None = None)

A class for managing and manipulating filter sets for astronomical observations.

Parameters:
  • list_files (Optional[List[str]], optional) – List of file paths to filter transmission tables, by default None.

  • list_pivot_wavelengths (Optional[u.Quantity], optional) – List of pivot wavelengths, by default None.

  • list_filter_names (Optional[List[str]], optional) – List of filter names to fetch from SVO Filter Profile Service, by default None.

  • dir_filter_transmission (Optional[str], optional) – Directory to save or retrieve filter transmission files, by default None.

Raises:

ValueError – If more than one of list_files, list_pivot_wavelengths, or list_filter_names is provided.

static calculate_pivot_wavelength(wavelength: Quantity, transmission: ndarray) Quantity

Calculate the pivot wavelength for a filter.

Parameters:
  • wavelength (u.Quantity) – Wavelengths of the filter.

  • transmission (np.ndarray) – Transmission values of the filter.

Returns:

Pivot wavelength.

Return type:

u.Quantity

plot_all_filters(ax: Axes | None = None, **kwargs)

Plot the transmission curves for all filters.

Parameters:
  • ax (Optional[plt.Axes], optional) – Matplotlib axis to plot on, by default None.

  • **kwargs – Additional keyword arguments for plot_filter.

static plot_filter(filter_table: QTable, ax: Axes | None = None, **kwargs)

Plot the transmission curve of a filter.

Parameters:
  • filter_table (QTable) – Filter table containing wavelength and transmission columns.

  • ax (Optional[plt.Axes], optional) – Matplotlib axis to plot on, by default None.

  • **kwargs – Additional keyword arguments for ax.plot.

sort_filters()

Sort filters by their pivot wavelengths in ascending order.

property x: ndarray

Logarithm of pivot wavelengths.

Returns:

Log10 of pivot wavelengths.

Return type:

np.ndarray