vista.algorithms.tracks.extraction.TrackExtraction

class vista.algorithms.tracks.extraction.TrackExtraction(track, imagery, chip_radius, background_radius, ignore_radius, threshold_deviation, annulus_shape='circular', search_radius=None, update_centroids=False, max_centroid_shift=inf)[source]

Extract image chips and detect signal pixels around track points.

For each track point, this algorithm: 1. Extracts a square image chip of specified diameter 2. Detects signal pixels using CFAR-like thresholding 3. Computes local noise standard deviation from background annulus 4. Optionally updates track coordinates to weighted centroid of signal blob

Parameters:
  • track (Track) – Track object containing trajectory points

  • imagery (Imagery) – Imagery object to extract chips from

  • chip_radius (int) – Radius of square chips to extract (in pixels). Total chip diameter will be 2*radius + 1

  • background_radius (int) – Outer radius for background noise calculation (pixels)

  • ignore_radius (int) – Inner radius to exclude from background (guard region, pixels)

  • threshold_deviation (float) – Number of standard deviations above mean for signal detection

  • annulus_shape (str, optional) – Shape of the annulus (‘circular’ or ‘square’), by default ‘circular’

  • search_radius (int, optional) – When specified, only keep signal blobs that have at least one pixel within the central search region of this radius. By default None (keep all blobs)

  • update_centroids (bool, optional) – If True, update track coordinates to signal blob centroids, by default False

  • max_centroid_shift (float, optional) – Maximum allowed centroid shift in pixels. Points with larger shifts are not updated. By default np.inf (no limit)

name

Algorithm name (“Track Extraction”)

Type:

str

chip_diameter

Computed chip diameter (2 * chip_radius + 1)

Type:

int

__call__()[source]

Process all track points and return extraction results

Returns:

Dictionary with keys: - ‘chips’: NDArray with shape (n_points, diameter, diameter) - ‘signal_masks’: boolean NDArray with shape (n_points, diameter, diameter) - ‘noise_stds’: NDArray with shape (n_points,) - ‘updated_rows’: NDArray with shape (n_points,) - ‘updated_columns’: NDArray with shape (n_points,)

Return type:

dict

Notes

  • Chips near image edges are padded with np.nan values

  • Signal detection threshold: pixel > mean + threshold_deviation * std

  • Only the largest connected signal blob is used for centroid calculation

  • Centroid updates respect max_centroid_shift constraint

__init__(track, imagery, chip_radius, background_radius, ignore_radius, threshold_deviation, annulus_shape='circular', search_radius=None, update_centroids=False, max_centroid_shift=inf)[source]

Methods

__init__(track, imagery, chip_radius, ...[, ...])

Attributes

name = 'Track Extraction'
__init__(track, imagery, chip_radius, background_radius, ignore_radius, threshold_deviation, annulus_shape='circular', search_radius=None, update_centroids=False, max_centroid_shift=inf)[source]
__call__()[source]

Process all track points and extract chips with signal detection.

Returns:

Dictionary containing: - ‘chips’: Image chips array (n_points, diameter, diameter) - ‘signal_masks’: Signal pixel masks (n_points, diameter, diameter) - ‘noise_stds’: Noise standard deviations (n_points,) - ‘updated_rows’: Updated row coordinates (n_points,) - ‘updated_columns’: Updated column coordinates (n_points,)

Return type:

dict