In the standard case a dark current measurement is precedes and follows a scan with the same gain and reset settings. The medians of this dark current measurements are used and applied to the scan data by linear interpolation.
Also, the actual dark is subtracted from the dark current itself. In
some cases (old AOTs or to many bad data during dark current measurement)
only one valid dark current measurement is taken for subtraction.
The square data of the `standard deviation of the slope', as given in the SPD are collected for the valid data of a dark current block:
Where N is the number of slopes in the dark current block.
After computing the median from the dark current block data a number suited
for error propagation (delta_med) is returned:
total_number : total number of valid data points during dark blockindex : ordered indices of dark current data block
dark : ordered array of slopes during dark current measurement
err_med : a width value which is used for error propagation (error of the MEDIAN)
This calculation is done for every dark current block.
The error returned from the MEDIAN calculation and the error of the dark
current block themself are combined to:
For the dark current block data itself the error is computed for each slope
as:
For the scan data the flux and error for a reset interval is computed:
err_out_data : new computed errorerr_block : median of dark current data block before scan (equation 19)
err_block : median of dark current data block after scan (equation 19)
: error given with the input data (pipeline )
ac_time : ITK of slope
time : ITK of dark current measurement before scan
time : ITK of dark current measurement after scan