Filter¶
- class sedfitter.filter.Filter(name=None, central_wavelength=None, nu=None, response=None)¶
Bases:
object
A filter used to convolve SED models.
- Parameters:
- namestr
The name of the filter (typically short and with no spaces, such as
2K
or 2MASS K-band orI1
for IRAC 3.6 microns).- central_wavelength
Quantity
The central wavelength (in units of length)
- nu
Quantity
The frequencies at which the filter is defined.
- responsenumpy.ndarray
The relative response at the different frequencies. Note that this should already take into account the assumptions about whether this is the response per photon or energy, and any other assumptions about converting the SED to a monochromatic flux. See the documentation for more details.
Attributes Summary
The central or characteristic wavelength of the filter
The frequencies at which the filter is defined
The filter response
Methods Summary
Normalize so the integral over nu is 1
read
(filename)Read a filter from a file.
rebin
(nu_new)Re-bin the filter onto a new frequency grid
Attributes Documentation
- central_wavelength¶
The central or characteristic wavelength of the filter
- nu¶
The frequencies at which the filter is defined
- response¶
The filter response
Methods Documentation
- normalize()¶
Normalize so the integral over nu is 1
- classmethod read(filename)¶
Read a filter from a file.
This method assumes that the file contains a column with wavelengths (in micron) and the other column contains the response. It also assumes that the first line contains a header with the central wavelength (in microns), using the following syntax:
# wav = 1.25
- Parameters:
- filename: str
The name of the file containing the filter
- rebin(nu_new)¶
Re-bin the filter onto a new frequency grid
- Parameters:
- nu_new: np.ndarray
The new frequency grid
- Returns:
- filter: Filter
The binned filter