add_frame_parms

sofia_redux.scan.filters.filters_numba_functions.add_frame_parms(rejected, points, weights, frame_valid, modeling_frame, frame_parms, sample_flags, channel_indices)[source]

Add to the frame dependents based on the rejected signal.

Each frame dependent value (fp) is updated by:

fp = fp + increment

where:

increment = w * dp dp = sum_{channels}(rejected / points)

and w is the frame weights (weights). Only valid samples (frame/channel combination will be updated or considered during the operation. A valid sample must consist of a valid non-modeling frame with nonzero frame weight, and a zero valued sample flag.

Parameters:
rejectednumpy.ndarray (float)

The rejected filter sum. An array of shape (n_channels,).

pointsnumpy.ndarray (float)

The relative weight sum over frames for each channel. An array of shape (n_channels,).

weightsnumpy.ndarray (float)

The relative frame weights as an array of shape (n_frames,).

frame_validnumpy.ndarray (bool)

A boolean mask where False excludes a given frame from all calculations or updates.

modeling_framenumpy.ndarray (bool)

A boolean mask where True excludes a given frame from all calculations or updates.

frame_parmsnumpy.ndarray (float)

The frame_parms to update. An array of shape (nt,) where nt is the ceiled power of 2 number of frames.

sample_flagsnumpy.ndarray (int)

An array of shape (n_frames, all_channels) where non-zero flagged samples are excluded from the calculation.

channel_indicesnumpy.ndarray (int)

The channel indices mapping all_channels onto n_channels.

Returns:
None