guider_cds

jwst.guider_cds.guider_cds.guider_cds(model, gain_model, readnoise_model)[source]

Calculate the count rate for each pixel in all integrations.

For each integration in a given FGS guider dataset whose mode is ACQ1, ACQ2, or TRACK, the count rate is the last group minus the first group, divided by the effective integration time. If the mode is ID, the last group minus the first group is calculated for both integrations; the count rate is then given by the minimum of these two values for each pixel, divided by the group time. For the FINEGUIDE mode, the count rate is the average of the last 4 groups minus the average of the first 4 groups, divided by the group time. The variances are calculated using gain and read noise values obtained from reference files if possible, otherwise, default representative constant values are used. From the variances the ERR array is calculated.

Parameters:
modelGuiderRawModel

Input data model

gain_modelGainModel

Gain for all pixels

readnoise_modelReadnoiseModel

Readnoise for all pixels

Returns:
new_modelGuiderCalModel

Output data model