classify_scanning_speeds

sofia_redux.scan.integration.integration_numba_functions.classify_scanning_speeds(speeds, min_speed, max_speed, valid, strict)[source]

Classify scanning speeds.

Speeds will be classified as keep, cut, or flag. The valid frames will also be updated in-place if using the strict schema or if non-finite speeds are encountered.

Parameters:
speedsnumpy.ndarray (float)

The scanning speeds.

min_speedfloat

The minimum allowable scanning speed.

max_speedfloat

The maximum allowable scanning speed.

validnumpy.ndarray (bool)

An array marking a speed as invalid which will be ignored. Will be updated in-place if strict is True.

strictbool

If True, speeds outside the allowable range will be cut. If False, they will be flagged instead.

Returns:
keep, cut, flag3-tuple (numpy.ndarray (int))

The indices to keep, cut, or flag.