Working with Filters¶
Python-FSPS provides simple access to FSPS’s filter set.
To find what filters are available, use fsps.find_filter()
or fsps.list_filters()
(see also Table of FSPS Filters).
fsps.get_filter()
is used to get a fsps.filters.Filter
instance, which in turn provides properties such as the filter’s transmission curve, Solar absolute magnitude, and effective wavelength.
Example¶
>>> import fsps
>>> fsps.find_filter('sdss')
['sdss_u', 'sdss_g', 'sdss_i', 'sdss_r', 'sdss_z']
>>> g = fsps.get_filter('sdss_g')
>>> g.msun_ab
5.12
>>> g.lambda_eff
4702.5
API Reference¶
- fsps.find_filter(band)¶
Find the FSPS name for a filter.
Usage:
>>> import fsps >>> fsps.find_filter("F555W") ['wfpc2_f555w', 'wfc_acs_f555w']
- Parameters:
band – Something like the name of the band.
- fsps.list_filters()¶
Returns a list of all FSPS filter names.
Filters are sorted by their FSPS index.
- fsps.get_filter(name)¶
Returns the
fsps.filters.Filter
instance associated with the filter name.- Parameters:
name – Name of the filter, as found with
find_filter()
.
- class fsps.filters.Filter(index, name, fullname)¶
- property lambda_eff¶
Effective wavelength of Filter, in Angstroms.
- property msun_ab¶
Solar absolute magnitude in Filter, AB zeropoint.
- property msun_vega¶
Solar absolute magnitude in Filter, VEGAMAG zeropoint.
- property transmission¶
Returns filter transmission: a tuple of wavelength (Angstroms) and an un-normalized transmission arrays.