correct_for_gain

sofia_redux.scan.custom.fifi_ls.info.info.correct_for_gain(data, frame_valid, frame_gains, sync_gains, channel_flags, sample_flags, source_blank_flag)[source]

Use the calculated gains from the scan reduction to normalize data.

Parameters:
datanumpy.ndarray (float)

The frame data to be corrected of shape (n_frames, n_channels). Updated in-place.

frame_validnumpy.ndarray (bool)

A boolean mask of shape (n_frames,) where False indicates that a particular frame is invalid and should not be included.

frame_gainsnumpy.ndarray (float)

The frame gains as calculated by the scan reduction of shape (n_frames,).

sync_gainsnumpy.ndarray (float)

The channel gains as calculated by the scan reduction of shape (n_channels,).

channel_flagsnumpy.ndarray (int)

An array of channel flags of shape (n_channels,) where any nonzero value indicates that there is some problem with the calculated gain value or channel properties, and that it should not be included in the corrected data.

sample_flagsnumpy.ndarray (int)
source_blank_flag
Returns: