ACS Photometric CTE

The ACS Photometric CTE API is a programmatic interface for the ACS Photometric CTE Webtool. The API is a cloud-based service that employs a serverless approach on AWS with API Gateway and Lambda to compute the photometric CTE corrections using the model described in ACS ISR 2012-05. The model corrects ACS/WFC aperture photometry extracted from FLT images for CTE losses using the most recent formula described in Chiaberge’s ISR 2012-05. It is only calibrated for photometry obtained after SM4 in May 2009. For pre-SM4 data, please see Chiaberge et al. 2009 (ISR 2009-01), or use pixel-based CTE-corrected files obtained from MAST. Currently, only 3 and 5 pixel aperture radii are supported. The model is designed to compute the CTE losses as a function of the number of Y transfers, sky background, source flux, and observation date.

Usage Guidelines

As this service is hosted on AWS, there are some guidelines that should be followed when utilizing this tool. For each call to correct_photometry(), AWS will assemble the compute resources, install the software, compute the CTE corrections, send the result back, and then terminate all resources. Hence, users should try to process as many sources as they can in a single function call. Testing has shown that the optimal number is < 25000, but the service can handle as many as 150,000 sources in a single request.


In this example, we get the CTE corrected FLT photometry for a list of 1000 sources. For each parameter, we generate 1000 random values in the interval [0, 1) and then scale each value to be in the typical range. We use arbitray values for the fluxes, local sky backgrounds, and MJD. We assume a radius of 3 pixels was used to compute the aperture photometry. For the ACS/WFC CCD chips, the maximum number of Y transfers is 2048 and so we scale by 2048.

>>> import numpy as np
>>> from acstools import acsphotcte
>>> n_sample = 1000
>>> ytransfers = 2048 * np.random.random(size=n_sample)
>>> fluxes = 20000*np.random.random(size=n_sample)
>>> magnitudes = -2.5 * np.log10(fluxes)
>>> print(magnitudes[:5])
[-10.75088228  -9.56321561 -10.10571966  -9.01893015 -10.48463087]
>>> local_skys = 80*np.random.random(size=n_sample)
>>> mjd = 59341.
>>> radius = 3.
>>> photctecalc = acsphotcte.PhotCTEAPI()
>>> cte_corrected_magnitudes = photctecalc.correct_photometry(
...    radius=radius,
...    ytransfers=ytransfers,
...    mjd=mjd,
...    local_skys=local_skys,
...    fluxes=fluxes
>>> print(cte_corrected_magnitudes[:5])
[-10.85516545  -9.68284332 -10.11060704  -9.11828746 -10.4918177 ]



Convenience class for handling queries to ACS Photometric CTE API.