ACS Zeropoints Calculator¶
This module contains a class, Query
, that was implemented to provide
users with means to programmatically query the
ACS Zeropoints Calculator.
The API works by submitting requests to the
ACS Zeropoints Calculator referenced above and hence, it is only valid for ACS
specific instruments (HRC, SBC, or WFC).
The API can be used in two ways by specifying either a
(date, detector, filter)
combination or just a (date, detector)
combination. In the first case, the query
will return the zeropoint information for the specific filter and detector at
specified date. In the second case, the query will return the zeropoint
information for all the filters for the desired detector at the specified date.
In either case, the result will be an astropy.table.QTable
where each column
is an astropy.units.quantity.Quantity
object with the appropriate units attached.
Examples
Retrieve the zeropoint information for all the filters on 2016-04-01 for WFC:
>>> from acstools import acszpt
>>> date = '2016-04-01'
>>> detector = 'WFC'
>>> q = acszpt.Query(date=date, detector=detector)
>>> zpt_table = q.fetch()
>>> print(zpt_table)
FILTER PHOTPLAM PHOTFLAM STmag VEGAmag ABmag
Angstrom erg / (Angstrom cm2 s) mag(ST) mag mag(AB)
str6 float64 float64 float64 float64 float64
------ -------- ---------------------- ------- ------- -------
F435W 4329.2 3.148e-19 25.155 25.763 25.665
F475W 4746.2 1.827e-19 25.746 26.149 26.056
F502N 5023.0 5.259e-18 22.098 22.365 22.285
F550M 5581.5 3.99e-19 24.898 24.825 24.856
F555W 5360.9 1.963e-19 25.667 25.713 25.713
F606W 5922.0 7.811e-20 26.668 26.405 26.498
F625W 6312.0 1.188e-19 26.213 25.735 25.904
F658N 6584.0 1.97e-18 23.164 22.381 22.763
F660N 6599.4 5.156e-18 22.119 21.428 21.714
F775W 7693.2 9.954e-20 26.405 25.272 25.667
F814W 8045.0 7.046e-20 26.78 25.517 25.944
F850LP 9033.2 1.52e-19 25.945 24.332 24.858
F892N 8914.8 1.502e-18 23.458 21.905 22.4
Retrieve the zeropoint information for the F435W filter on 2016-04-01 for WFC:
>>> from acstools import acszpt
>>> date = '2016-04-01'
>>> detector = 'WFC'
>>> filt = 'F435W'
>>> q = acszpt.Query(date=date, detector=detector, filt=filt)
>>> zpt_table = q.fetch()
>>> print(zpt_table)
FILTER PHOTPLAM PHOTFLAM STmag VEGAmag ABmag
Angstrom erg / (Angstrom cm2 s) mag(ST) mag mag(AB)
------ -------- ---------------------- ------- ------- -------
F435W 4329.2 3.148e-19 25.155 25.763 25.665
Retrieve the zeropoint information for the F435W filter for WFC at multiple dates:
>>> from acstools import acszpt
>>> dates = ['2004-10-13', '2011-04-01', '2014-01-17', '2018-05-23']
>>> queries = []
>>> for date in dates:
... q = acszpt.Query(date=date, detector='WFC', filt='F435W')
... zpt_table = q.fetch()
... # Each object has a zpt_table attribute, so we save the instance
... queries.append(q)
>>> for q in queries:
... print(q.date, q.zpt_table['PHOTFLAM'][0], q.zpt_table['STmag'][0])
2004-10-13 3.074e-19 erg / (Angstrom cm2 s) 25.181 mag(ST)
2011-04-01 3.138e-19 erg / (Angstrom cm2 s) 25.158 mag(ST)
2014-01-17 3.144e-19 erg / (Angstrom cm2 s) 25.156 mag(ST)
2018-05-23 3.152e-19 erg / (Angstrom cm2 s) 25.154 mag(ST)
>>> type(queries[0].zpt_table['PHOTFLAM'])
astropy.units.quantity.Quantity