The Spanish Virtual Observatory (SVO) Filter Profile Service is a great resource for homogenized photometric filter curves and metadata. With svo_filters, I tried to create a lightweight and flexible package to incorporate these filters into Python applications.
Install in the usual fashion with
pip install svo_filters
or via Github with
git clone https://github.com/hover2pi/svo_filters.git
cd svo_filters
python setup.py install
Then import like so
In [2]:
from svo_filters import svo
The actual filters are stored locally as XML files and can be viewed with
In [3]:
svo.filters()
Out[3]:
<Table masked=True length=107>
Band CalibrationReference FWHM Facility FilterProfileService MagSys PhotCalID PhotSystem ProfileReference WavelengthCen WavelengthEff WavelengthMax WavelengthMean WavelengthMin WavelengthPeak WavelengthPhot WavelengthPivot WavelengthUCD WavelengthUnit WidthEff ZeroPoint ZeroPointType ZeroPointUnit filterID n_bins n_pixels path pixels_per_bin refs wl_max wl_min Instrument Comments DetectorType
str91 str86 float64 str91 str91 str91 str91 str91 str91 float64 float64 float64 float64 float64 float64 float64 float64 str91 str91 float64 str91 str91 str91 str91 float64 float64 str91 float64 str91 float64 float64 str91 str91 float64
2MASS.H http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2003AJ....126.1090C&db_key=AST 0.26096 2MASS ivo://svo/fps Vega 2MASS/2MASS.H/Vega 2MASS http://www.ipac.caltech.edu/2mass/releases/allsky/doc/sec6_4a.html 1.64872 1.662 1.8231 1.662 1.47874 1.671 1.64238 1.64949 em.wl um 0.25094 1.1113698753332439e-10 Pogson erg / (Angstrom cm2 s) 2MASS/2MASS.H 1.0 58.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/2MASS.H 58.0 ['AST'] 1.8231 1.47874 -- -- --
2MASS.J http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2003AJ....126.1090C 0.21491 2MASS ivo://svo/fps Vega 2MASS/2MASS.J/Vega 2MASS http://www.ipac.caltech.edu/2mass/releases/allsky/doc/sec6_4a.html#rsr 1.23906 1.235 1.4068 1.235 1.08065 1.326 1.23209 1.23931 em.wl um 0.16241 3.133106119110296e-10 Pogson erg / (Angstrom cm2 s) 2MASS/2MASS.J 1.0 107.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/2MASS.J 107.0 ['2003AJ....126.1090C'] 1.4068 1.08065 -- -- --
2MASS.Ks http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2003AJ....126.1090C 0.27846 2MASS ivo://svo/fps Vega 2MASS/2MASS.Ks/Vega 2MASS http://www.ipac.caltech.edu/2mass/releases/allsky/doc/sec6_4a.html#rsr 2.1634 2.159 2.35524 2.159 1.95437 2.263 2.15577 2.16386 em.wl um 0.26189 4.2885552489626795e-11 Pogson erg / (Angstrom cm2 s) 2MASS/2MASS.Ks 1.0 76.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/2MASS.Ks 76.0 ['2003AJ....126.1090C'] 2.35524 1.95437 -- -- --
ACS_HRC.F435W -- 0.08852 HST ivo://svo/fps Vega HST/ACS_HRC.F435W/Vega ACS_HRC http://www.stsci.edu/hst/acs/analysis/zeropoints 0.43573 0.43315 0.48613 0.43434 0.3599 0.47601 0.43506 0.43327 em.wl um 0.07602 6.3846394495943405e-09 Pogson erg / (Angstrom cm2 s) HST/ACS_HRC.F435W 1.0 2163.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/ACS_HRC.F435W 2163.0 [] 0.48613 0.3599 ACS -- --
ACS_HRC.F555W -- 0.123 HST ivo://svo/fps Vega HST/ACS_HRC.F555W/Vega ACS_HRC http://www.stsci.edu/hst/acs/analysis/zeropoints 0.54107 0.53271 0.62049 0.53919 0.45867 0.54998 0.53507 0.53798 em.wl um 0.11018 3.82955756705008e-09 Pogson erg / (Angstrom cm2 s) HST/ACS_HRC.F555W 1.0 2833.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/ACS_HRC.F555W 2833.0 [] 0.62049 0.45867 ACS -- --
ACS_HRC.F658N -- 0.0072 HST ivo://svo/fps Vega HST/ACS_HRC.F658N/Vega ACS_HRC http://www.stsci.edu/hst/acs/analysis/zeropoints 0.6584 0.65861 0.66594 0.6584 0.65099 0.6592 0.65862 0.6584 em.wl um 0.00747 1.7755279808560669e-09 Pogson erg / (Angstrom cm2 s) HST/ACS_HRC.F658N 1.0 189.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/ACS_HRC.F658N 189.0 [] 0.66594 0.65099 ACS -- --
ACS_HRC.F775W -- 0.15151 HST ivo://svo/fps Vega HST/ACS_HRC.F775W/Vega ACS_HRC http://www.stsci.edu/hst/acs/analysis/zeropoints 0.77574 0.76246 0.86307 0.77022 0.68014 0.73803 0.76489 0.76897 em.wl um 0.12992 1.3016053164718504e-09 Pogson erg / (Angstrom cm2 s) HST/ACS_HRC.F775W 1.0 2784.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/ACS_HRC.F775W 2784.0 [] 0.86307 0.68014 ACS -- --
ACS_HRC.F850LP -- 0.15317 HST ivo://svo/fps Vega HST/ACS_HRC.F850LP/Vega ACS_HRC http://www.stsci.edu/hst/acs/analysis/zeropoints 0.91103 0.91184 1.09465 0.91944 0.80151 0.90096 0.915 0.91778 em.wl um 0.1552 8.05183794111089e-10 Pogson erg / (Angstrom cm2 s) HST/ACS_HRC.F850LP 1.0 3105.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/ACS_HRC.F850LP 3105.0 [] 1.09465 0.80151 ACS -- --
Cousins.I -- 0.10937 -- ivo://svo/fps Vega Generic/Cousins.I/Vega Cousins http://ulisse.pd.astro.it/Astro/ADPS/Systems/Sys_093/index_093.html 0.78694 0.78292 0.90006 0.78856 0.70665 0.765 0.78468 0.78764 em.wl um 0.10111 1.2023352736450864e-09 Pogson erg / (Angstrom cm2 s) Generic/Cousins.I 1.0 43.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/Cousins.I 43.0 [] 0.90006 0.70665 -- -- --
Cousins.R -- 0.15165 -- ivo://svo/fps Vega Generic/Cousins.R/Vega Cousins http://ulisse.pd.astro.it/Astro/ADPS/Systems/Sys_093/index_093.html 0.64718 0.6358 0.795 0.64694 0.55 0.6 0.63931 0.64509 em.wl um 0.13811 2.2455983575940744e-09 Pogson erg / (Angstrom cm2 s) Generic/Cousins.R 1.0 53.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/Cousins.R 53.0 [] 0.795 0.55 -- -- --
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
WFC3_UVIS2.F850LP -- 0.1168 HST ivo://svo/fps Vega HST/WFC3_UVIS2.F850LP/Vega WFC3 http://www.stsci.edu/hst/wfc3/documents/handbooks/currentIHB/ 0.90823 0.91246 1.09224 0.91781 0.82505 0.88218 0.91474 0.9166 em.wl um 0.1182 8.068639909681385e-10 Pogson erg / (Angstrom cm2 s) HST/WFC3_UVIS2.F850LP 1.0 1711.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WFC3_UVIS2.F850LP 1711.0 [] 1.09224 0.82505 WFC3 /> --
WFPC2.F336W -- 0.04909 HST ivo://svo/fps Vega HST/WFPC2.f336w/Vega -- http://www.stsci.edu/hst/wfpc2/analysis/filters.html 0.33271 0.33293 0.37903 0.33355 0.29565 0.3448 0.33368 0.33317 em.wl um 0.04924 3.291718270769144e-09 Pogson erg / (Angstrom cm2 s) HST/WFPC2.f336w 1.0 404.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WFPC2.F336W 404.0 [] 0.37903 0.29565 WFPC2 -- --
WFPC2.F439W -- 0.07058 HST ivo://svo/fps Vega HST/WFPC2.f439w/Vega -- http://www.stsci.edu/hst/wfpc2/analysis/filters.html 0.43175 0.42913 0.47581 0.43061 0.38935 0.4176 0.43003 0.43015 em.wl um 0.061 6.7906234368351585e-09 Pogson erg / (Angstrom cm2 s) HST/WFPC2.f439w 1.0 420.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WFPC2.F439W 420.0 [] 0.47581 0.38935 WFPC2 -- --
WFPC2.F656N -- 0.00285 HST ivo://svo/fps Vega HST/WFPC2.f656n/Vega -- http://www.stsci.edu/hst/wfpc2/analysis/filters.html 0.65641 0.65637 0.65874 0.65638 0.65384 0.6562 0.65637 0.65638 em.wl um 0.00283 1.5071375295016861e-09 Pogson erg / (Angstrom cm2 s) HST/WFPC2.f656n 1.0 26.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WFPC2.F656N 26.0 [] 0.65874 0.65384 WFPC2 -- --
WFPC2.F814W -- 0.25562 HST ivo://svo/fps Vega HST/WFPC2.f814w/Vega -- http://www.stsci.edu/hst/wfpc2/analysis/filters.html 0.83589 0.81864 1.00426 0.83695 0.69476 0.8386 0.82544 0.83357 em.wl um 0.2501 1.0611475122615156e-09 Pogson erg / (Angstrom cm2 s) HST/WFPC2.f814w 1.0 1513.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WFPC2.F814W 1513.0 [] 1.00426 0.69476 WFPC2 -- --
Wircam.Y -- 0.11053 CFHT ivo://svo/fps Vega CFHT/Wircam.Y/Vega Wircam http://cfht.hawaii.edu/Instruments/Filters/wircam.html 1.02535 1.02213 1.1134 1.02588 0.9386 1.0322 1.02328 1.0253 em.wl um 0.10842 5.949435587748138e-10 Pogson erg / (Angstrom cm2 s) CFHT/Wircam.Y 1.0 875.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/Wircam.Y 875.0 [] 1.1134 0.9386 Wircam -- --
WISE.W1 http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/figures/sec4_3gt4.gif 0.63579 WISE ivo://svo/fps Vega WISE/WISE.W1/Vega WISE http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/sec4_3g.html#WISEZMA 3.46552 3.3526 3.87239 3.3526 2.7541 3.48 3.3387 3.3897 em.wl um 0.66264 8.256082039570161e-12 Pogson erg / (Angstrom cm2 s) WISE/WISE.W1 1.0 141.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WISE.W1 141.0 ['http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/figures/sec4_3gt4.gif'] 3.87239 2.7541 -- -- --
WISE.W2 http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/figures/sec4_3gt4.gif 1.10732 WISE ivo://svo/fps Vega WISE/WISE.W2/Vega WISE http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/sec4_3g.html#WISEZMA 4.6443 4.6028 5.34136 4.6028 3.96333 4.93 4.58694 4.64064 em.wl um 1.04227 2.4308982979229142e-12 Pogson erg / (Angstrom cm2 s) WISE/WISE.W2 1.0 168.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WISE.W2 168.0 ['http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/figures/sec4_3gt4.gif'] 5.34136 3.96333 -- -- --
WISE.W3 http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/figures/sec4_3gt4.gif 6.2758 WISE ivo://svo/fps Vega WISE/WISE.W3/Vega WISE http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/sec4_3g.html#WISEZMA 13.21564 11.5608 17.26134 11.5608 7.44304 14.46 11.30813 12.56755 em.wl um 5.50557 7.104734271598481e-14 Pogson erg / (Angstrom cm2 s) WISE/WISE.W3 1.0 1122.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WISE.W3 1122.0 ['http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/figures/sec4_3gt4.gif'] 17.26134 7.44304 -- -- --
WISE.W4 http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/figures/sec4_3gt4.gif 4.73973 WISE ivo://svo/fps Vega WISE/WISE.W4/Vega WISE http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/sec4_3g.html#WISEZMA 22.22288 22.0883 27.91072 22.0883 19.52008 21.62 22.02311 22.31427 em.wl um 4.10168 5.138758584844504e-15 Pogson erg / (Angstrom cm2 s) WISE/WISE.W4 1.0 897.0 /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WISE.W4 897.0 ['http://wise2.ipac.caltech.edu/docs/release/prelim/expsup/figures/sec4_3gt4.gif'] 27.91072 19.52008 -- -- --
To load a filter object, just pass the band name to the Filter class. We can then view the metadata and see a plot!
In [37]:
H_band = svo.Filter('2MASS.H')
H_band.info()
H_band.plot()
Attributes Values
-------------------- --------------------------------------------------------------------------------------
Band H
CalibrationReference http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2003AJ....126.1090C&db_key=AST
Facility 2MASS
FilterProfileService ivo://svo/fps
MagSys Vega
PhotCalID 2MASS/2MASS.H/Vega
PhotSystem 2MASS
ProfileReference http://www.ipac.caltech.edu/2mass/releases/allsky/doc/sec6_4a.html
ext_vector 0.327
filterID 2MASS/2MASS.H
fwhm 0.26096 um
n_bins 1
name 2MASS.H
path /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/2MASS.H
pixels_per_bin 58
refs ['AST']
wave_center 1.64872 um
wave_eff 1.662 um
wave_max 1.8231 um
wave_mean 1.662 um
wave_min 1.47874 um
wave_peak 1.671 um
wave_phot 1.64238 um
wave_pivot 1.64949 um
width_eff 0.25094 um
zp 1.1113698753332439e-10 erg / (Angstrom cm2 s)
The actual relative spectral response curve is stored as an array of the wavelength and throughput.
In [38]:
H_band.rsr.shape
Out[38]:
(2, 58)
Filters can also be binned arbitrarily, for use with grisms. We can pass integers to the n_bins or n_channels arguments to specify the number of wavelength bins or channels per bin, respectively.
In [39]:
G141 = svo.Filter('WFC3_IR.G141', n_bins=15)
G141.info()
G141.plot()
Bandpass trimmed to 1.04039 um - 1.77466 um
15 bins of 634 pixels each.
Attributes Values
-------------------- --------------------------------------------------------------------------------------
Comments />
Facility HST
FilterProfileService ivo://svo/fps
Instrument WFC3
MagSys Vega
PhotCalID HST/WFC3_IR.G141/Vega
PhotSystem WFC3
ProfileReference http://www.stsci.edu/hst/wfc3/documents/handbooks/currentIHB/
ext_vector 0
filterID HST/WFC3_IR.G141
fwhm 0.57288 um
n_bins 15
name WFC3_IR.G141
path /Users/jfilippazzo/Documents/Modules/svo_filters/svo_filters/data/filters/WFC3_IR.G141
pixels_per_bin 634
refs []
wave_center 1.38902 um
wave_eff 1.32829 um
wave_max 1.77466 um
wave_mean 1.39879 um
wave_min 1.04039 um
wave_peak 1.48039 um
wave_phot 1.3481 um
wave_pivot 1.38869 um
width_eff 0.52172 um
zp 2.2612502006498423e-10 erg / (Angstrom cm2 s)
Now we can apply the filter to a spectrum like so:
In [41]:
# Get the filter object
G141 = svo.Filter('WFC3_IR.G141', n_bins=15)
# Get a spectrum
file = resource_filename('svo_filters', 'data/spectra/vega.txt')
spec = np.genfromtxt(file, unpack=True)
spec = [i[(spec[0] > 0.9) & (spec[0] < 1.9)] for i in spec]
# Applyt the filter
filtered = G141.apply(spec, plot=True)
Bandpass trimmed to 1.04039 um - 1.77466 um
15 bins of 634 pixels each.
Filters are fun!
Content source: hover2pi/svo_filters
Similar notebooks: