search_corners

sofia_redux.scan.integration.integration_numba_functions.search_corners(sample_coordinates, valid_frames, channel_indices, sample_flags, skip_flag)[source]

Return the x, y range of sample coordinates.

Invalid sample coordinates (e.g. NaN) will flag a sample as SAMPLE_SKIP.

Parameters:
sample_coordinatesnumpy.ndarray (float)

The sample (x, y) coordinates of shape (2, n_frames, n_channels).

valid_framesnumpy.ndarray (bool)

A boolean mask of shape (n_frames,) where False excludes a frame from all calculations.

channel_indicesnumpy.ndarray (int)

An array of shape (n_channels,) mapping n_channels onto all_channels.

sample_flagsnumpy.ndarray (int)

An array containing the sample flags of shape (n_frames, all_channels).

skip_flagint

The integer flag that will flag a sample if it’s sample coordinate is invalid.

Returns:
map_rangenumpy.ndarray (float)

An array of shape (4,) containing [min(x), min(y), max(x), max(y)].