exosim.tasks.detector.addGainDrift#

Classes#

AddGainDrift

It adds a gain noise map to the array.

Module Contents#

class AddGainDrift[source]#

Bases: exosim.tasks.task.Task

It adds a gain noise map to the array.

The gain Drift is modeled as a polynomial model for a spectral and time dependent modulation.

Notes

This is a default class with standardised inputs and outputs. The user can load this class and overwrite the “model” method to implement a custom Task to replace this.

execute()[source]#

Class execution. It runs on call and executes all the task actions returning the outputs. It requires the input with correct keywords

model(subexposures, parameters, output=None)[source]#

Apply a gain drift model to the subexposures.

This method models the gain drift as a polynomial trend based on time and wavelength.

Parameters:
  • subexposures (Signal) – Sub-exposures cached signal.

  • parameters (dict) –

    A dictionary containing parameters for the noise model. Expected keys and sub-keys include: - ‘readout’: dict with ‘readout_frequency’ - ‘detector’: dict with keys ‘gain_w0’, ‘gain_f0’, ‘gain_coeff_order_t’,

    ’gain_coeff_t_min’, ‘gain_coeff_t_max’, ‘gain_coeff_order_w’, ‘gain_coeff_w_min’, and ‘gain_coeff_w_max’.

  • integration_times (np.ndarray) – Sub-exposures integration times.

  • output (Optional[Output]) – Output file to write information, defaults to None.

Returns:

This method does not return a value but updates the subexposures dataset with applied gain noise.

Return type:

None

Notes

The method computes Brownian noise based on the frequency parameters in ‘parameters’ and applies a polynomial trend to it. The trend’s coefficients are randomly generated within specified ranges. The resulting gain noise is then rebinned and applied to the subexposures.