The gain is the conversion factor between the signal in ADU's supplied by
the readout electronics and the detected number of photons (in units
e-
For most instruments default gain values have been determined and are in
the system, so it is usually not necessary to make your own values. The
class used to store the gain in the database is called GainLinearity. Existing gain values can be obtained for example with this
query from the awe prompt (fill in the appropriate instrument, observing
date and chip):
There is a recipe to use the 20 domeflats to determine the gain. The
recipe can be used like this:
1.1.2 Deriving the gain
awe> q = (GainLinearity.instrument.name == 'OMEGACAM') & \
(GainLinearity.template.start > datetime.datetime(2014,7,2)) & \
(GainLinearity.template.start < datetime.datetime(2014,7,4))
awe> print(q[0].template.start, q[0].gain)
2014-07-03 12:35:56 2.49576806277451
awe> task = GainTask(instrument='OMEGACAM', template='2014-07-03 12:35:56',
chip='ESO_CCD_#65')
awe> task.execute()