ska_sdp_instrumental_calibration.data_managers.uv_range module

class ska_sdp_instrumental_calibration.data_managers.uv_range.UVRange(uv_min, uv_max, unit, negate, min_inclusive, max_inclusive)[source]

Bases: object

Data container for a single UV range selection rule.

This class encapsulates the parameters defining a specific UV range, including boundaries, units, inclusivity, and negation logic. It is typically instantiated by UVRangeFilter rather than directly by the user.

uv_min: float

Minimum UV distance for the range.

uv_max: float

Maximum UV distance for the range.

unit: str

The unit of the range. Must be one of 'm', 'km', or 'kl'.

negate: bool

If True, the selection logic is inverted (i.e., select data outside the specified range).

min_inclusive: bool

If True, use inclusive comparison (>=) for the lower bound.

max_inclusive: bool

If True, use inclusive comparison (<=) for the upper bound.

predicate(uvdist, uvdist_kl)[source]

Evaluate the range condition against provided UV distances.

Applies the lower and upper bound checks, inclusivity rules, and negation logic to determine which points fall within the range.

Parameters:
  • uvdist (array_like) -- UV distance in meters.

  • uvdist_kl (array_like or None) -- UV distance in kilolambda. Required if self.unit is 'kl'.

Returns:

Boolean mask where True indicates the data satisfies the range criteria.

Return type:

array_like