ACS Zeropoints Calculator

This module contains a class, Query, that was implemented to provide users with means to programmatically query the ACS Zeropoints Calculator API. This class works by submitting requests directly to the AWS API, which also handles the requests from the above web address. 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 of the WFC filters on 2016-04-01:

>>> from acstools import acszpt
>>> q = acszpt.Query(date="2016-04-01", detector="WFC")
>>> zpt_table = q.fetch()
>>> print(zpt_table)
Filter PHOTLAM             PHOTFLAM            STmag  VEGAmag  ABmag
       Angstrom erg / (Angstrom cm2 electron) mag(ST)   mag   mag(AB)
------ -------- ----------------------------- ------- ------- -------
 F435W   4329.9                    3.1858e-19  25.142  25.767  25.652
 F475W   4747.0                     1.845e-19  25.735  26.151  26.045
 F502N   5023.0                    5.2934e-18  22.091  22.367  22.278
 F550M   5581.5                    4.0186e-19   24.89  24.825  24.848
 F555W   5361.0                    1.9798e-19  25.658  25.714  25.704
 F606W   5921.9                    7.8774e-20  26.659  26.402  26.489
 F625W   6311.8                     1.198e-19  26.204  25.728  25.895
 F658N   6584.0                    1.9976e-18  23.149  22.378  22.748
 F660N   6599.4                    5.2219e-18  22.105  21.414    21.7
 F775W   7693.5                    1.0033e-19  26.396   25.26  25.658
 F814W   8045.5                     7.092e-20  26.773  25.506  25.937
F850LP   9031.5                    1.5313e-19  25.937  24.323  24.851
 F892N   8914.8                    1.5105e-18  23.452  21.892  22.394

Retrieve the zeropoint information for the WFC/F435W filter on 2016-04-01:

>>> from acstools import acszpt
>>> q = acszpt.Query(date="2016-04-01", detector="WFC", filt="F435W")
>>> zpt_table = q.fetch()
>>> print(zpt_table)
Filter PHOTLAM             PHOTFLAM            STmag  VEGAmag  ABmag
       Angstrom erg / (Angstrom cm2 electron) mag(ST)   mag   mag(AB)
------ -------- ----------------------------- ------- ------- -------
 F435W   4329.9                    3.1858e-19  25.142  25.767  25.652

Retrieve the zeropoint information for the WFC/F435W filter on 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.1111e-19 erg / (Angstrom cm2 electron) 25.168 mag(ST)
2011-04-01 3.1766e-19 erg / (Angstrom cm2 electron) 25.145 mag(ST)
2014-01-17 3.1817e-19 erg / (Angstrom cm2 electron) 25.143 mag(ST)
2018-05-23 3.1897e-19 erg / (Angstrom cm2 electron) 25.141 mag(ST)
>>> type(queries[0].zpt_table['PHOTFLAM'])
astropy.units.quantity.Quantity

Classes

ACSZeropointQueryError

Class used for raising exceptions with API Gateway post requests.

Query(date, detector[, filt])

Class used to interface with the ACS Zeropoints Calculator API.