Filter Magnitude Calculator
Function to perform AB magnitude calculations in various filters.
Also defines TransmissionCurve class to store filter transmission curves.
- class filtermag.TransmissionCurve(filtername)
Class that defines transmission curve objects. Each transmission curve has a filter name and arrays of wavelengths and transmission (%) based on the transmission curve files in the repo. The dictionary
filter_dictcontains the file names for each filter.
- filtermag.filter_mag(wave_spectra, flux, filter)
Filter magnitude calculator
Calculate the filter magnitude for a spectrum provided by the user in a given filter.
- Parameters:
wave_spectra (array) – the wavelengths of the spectrum (in Angstroms)
flux (array) – the associated fluxes for the wavelengths (in erg s-1 cm-2 A-1)
filter (string) – the filter that magnitude will be calculated in, identified using a key in
filter_dict
- Returns:
filter magnitude for the spectrum
- Return type:
float
- filtermag.read_spectrum(filename)
Read SDSS spectrum from FITS
Function to read an SDSS spectrum from a FITS file.
- Parameters:
filename (string) – name of the FITS spectrum file
- Returns:
wavelength of the spectrum in Angstroms, flux of the spectrum in erg s-1 cm-2 A-1
- Return type:
array, array