across.tools.visibility.joint_visibility

Attributes

T

Classes

JointVisibility

Computes joint visibility windows between multiple instruments.

Functions

compute_joint_visibility(visibilities, instrument_ids)

Compute joint visibility windows for any number of instrument Visibilities.

Module Contents

T[source]
class JointVisibility(/, **data)[source]

Bases: across.tools.visibility.base.Visibility, Generic[T]

Computes joint visibility windows between multiple instruments.

This class takes a list of Visibility objects with identical timestamp grids and computes the intersection of their visibility periods.

Parameters:
  • visibilities (list[T]) – List of Visibility or Visibility child objects with identical timestamp grids.

  • instrument_ids (list[UUID]) – List of IDs of the instruments belonging to the Visibility objects.

visibilities: list[T] = None[source]
instrument_ids: list[uuid.UUID] = None[source]
step_size: across.tools.core.schemas.AstropyTimeDelta = None[source]
begin: across.tools.core.schemas.AstropyDateTime = None[source]
end: across.tools.core.schemas.AstropyDateTime = None[source]
observatory_name: str = None[source]
classmethod validate_parameters(values)[source]

Validate and synchronize coordinate, begin/end, and step size values. This method ensures that all the input Visibility objects have the same coordinates, begin and end times, and step sizes. If any of these values differ between Visibilities, a ValueError is raised. When these equalities have been validated, this method runs the base Visibility validate_parameters method to validate other parameter values.

_constraint(i)[source]

For a given index, return the constraint from the first visibility that is actually constrained.

_get_id(i)[source]

For a given index, find the observatory ID of the first visibility that is constrained.

_get_name(i)[source]

For a given index, get the name of the first instrument that is constrained.

prepare_data()[source]

Compute joint visibility by ANDing all inconstraint arrays.

Raises:

ValueError – If visibilities list is empty or if visibilities have different timestamp grids.

_merge_computed_values()[source]

Abstract method to merge computed values from constraints.

plot(fig=None, offset=0, width=700, height=1000)[source]

Method to visualize joint visibility windows using plotly. Plots the individual instrument visibility windows and the regions of joint visibility on one figure. Calls the across-tools plotting core functionality and configures the plot layout to user specifications.

Parameters:
  • fig (go.Figure, optional) – An existing plotly figure to add to, by default None

  • offset (int | float, optional) – The x-axis offset to plot new visibility windows, by default 0

  • width (int, optional) – The width of the plot, in pixels. Defaults to 700.

  • height (int, optional) – The height of the plot, in pixels. Defaults to 1000.

Returns:

The plotly figure containing the footprint plot

Return type:

go.Figure

compute_joint_visibility(visibilities, instrument_ids, min_vis=0)[source]

Compute joint visibility windows for any number of instrument Visibilities. Assumes that the visibilities are in the same order as instrument_ids.

Parameters:
  • visibilities (list[T]) – List of Visibility objects or children objects of Visibility.

  • instrument_ids (list[UUID]) – List of IDs of the instruments belonging to the Visibility objects.

  • min_vis (int, optional) – Minimum visibility duration in seconds for a window to be included. Default is 0.

Returns:

List of VisibilityWindows capturing joint visibility between all inputted instruments.

Return type:

list[VisibilityWindow]