across.client.apis

Submodules

Classes

Filter

Client for interacting with Filter resources in the Across API.

Instrument

Client for interacting with Instrument resources in the Across API.

Observation

Client for interacting with Observation resources in the Across API.

Observatory

Client for interacting with Observatory resources in the Across API.

Schedule

Client for interacting with Schedule resources in the Across API.

Telescope

Client for interacting with Telescope resources in the Across API.

VisibilityCalculator

Client for interacting with Visibility Calculator resources in the Across API.

Package Contents

class Filter(across_client: across.sdk.v1.api_client_wrapper.ApiClientWrapper)[source]

Client for interacting with Filter resources in the Across API.

Provides methods to retrieve single or multiple filters by ID, name, wavelength, or instrument information.

across_client
get(id: str) across.sdk.v1.Filter[source]

Retrieve a single Filter by ID.

Parameters:

id (str) – The unique identifier of the Filter to retrieve.

Returns:

The requested Filter object.

Return type:

sdk.Filter

get_many(name: str | None = None, covers_wavelength: float | None = None, instrument_name: str | None = None, instrument_id: str | None = None) list[across.sdk.v1.Filter][source]

Retrieve multiple filters filtered by optional criteria.

Parameters:
  • name (str | None, optional) – Filter by filter name.

  • covers_wavelength (float | none, optional) – Filter by filters that contain wavelength value.

  • instrument_name (str | None, optional) – Filter by telescinstrumentope name.

  • instrument_id (str | None, optional) – Filter by instrument ID.

Returns:

A list of filters matching the given filters.

Return type:

list[sdk.Filter]

class Instrument(across_client: across.sdk.v1.api_client_wrapper.ApiClientWrapper)[source]

Client for interacting with Instrument resources in the Across API.

Provides methods to retrieve single or multiple instrument by ID, name, instrument information, or creation date.

across_client
get(id: str) across.sdk.v1.Instrument[source]

Retrieve a single Instrument by ID.

Parameters:

id (str) – The unique identifier of the Instrument to retrieve.

Returns:

The requested Instrument object.

Return type:

sdk.Instrument

get_many(name: str | None = None, telescope_name: str | None = None, telescope_id: str | None = None, created_on: datetime.datetime | None = None) list[across.sdk.v1.Instrument][source]

Retrieve multiple instruments filtered by optional criteria.

Parameters:
  • name (str | None, optional) – Filter by instrument name.

  • telescope_name (str | None, optional) – Filter by telescope name.

  • telescope_id (str | None, optional) – Filter by telescope ID.

  • created_on (datetime | None, optional) – Filter by creation timestamp.

Returns:

A list of instruments matching the given filters.

Return type:

list[sdk.Instrument]

class Observation(across_client: across.sdk.v1.api_client_wrapper.ApiClientWrapper)[source]

Client for interacting with Observation resources in the Across API.

Provides methods to retrieve single or multiple observations by ID, name, observation information, or creation date.

across_client
get(id: str) across.sdk.v1.Observation[source]

Retrieve a single Observation by ID.

Parameters:

id (str) – The unique identifier of the Observation to retrieve.

Returns:

The requested Observation object.

Return type:

sdk.Observation

get_many(page: int | None = None, page_limit: int | None = None, external_id: str | None = None, schedule_ids: list[str | None] | None = None, observatory_ids: list[str] | None = None, telescope_ids: list[str] | None = None, instrument_ids: list[str] | None = None, status: across.sdk.v1.ObservationStatus | None = None, proposal: str | None = None, object_name: str | None = None, date_range_begin: datetime.datetime | None = None, date_range_end: datetime.datetime | None = None, bandpass_min: float | None = None, bandpass_max: float | None = None, bandpass_type: across.sdk.v1.WavelengthBandpass | across.sdk.v1.EnergyBandpass | across.sdk.v1.FrequencyBandpass | None = None, cone_search_ra: float | None = None, cone_search_dec: float | None = None, cone_search_radius: float | None = None, type: across.sdk.v1.ObservationType | None = None, depth_value: float | None = None, depth_unit: across.sdk.v1.DepthUnit | None = None) across.sdk.v1.PageObservation[source]

Retrieve multiple observations filtered by optional criteria.

Parameters:
  • page (int | None) – Filter by pagination page

  • page_limit (int | None) – Filter by number of records per page

  • external_id (str | None) – Filter by an external identifier.

  • schedule_ids (list[str | None] | None) – Filter by one or more schedule IDs.

  • observatory_ids (list[str] | None) – Filter by one or more observatory IDs.

  • telescope_ids (list[str] | None) – Filter by one or more telescope IDs.

  • instrument_ids (list[str] | None) – Filter by one or more instrument IDs.

  • status (sdk.ObservationStatus | None) – Filter by observation status.

  • proposal (str | None) – Filter by proposal identifier or name.

  • object_name (str | None) – Filter by target object name.

  • date_range_begin (datetime | None) – Filter for observations starting on or after this date.

  • date_range_end (datetime | None) – Filter for observations ending on or before this date.

  • bandpass_min (float | None) – Minimum bandpass value (in the unit defined by bandpass_type).

  • bandpass_max (float | None) – Maximum bandpass value (in the unit defined by bandpass_type).

  • bandpass_type (sdk.WavelengthBandpass | sdk.EnergyBandpass | sdk.FrequencyBandpass | None) – Type of bandpass measurement (wavelength, energy, or frequency).

  • cone_search_ra (float | None) – Right Ascension (RA) for cone search, in degrees.

  • cone_search_dec (float | None) – Declination (Dec) for cone search, in degrees.

  • cone_search_radius (float | None) – Search radius for cone search, in degrees.

  • type (sdk.ObservationType | None) – Filter by observation type.

  • depth_value (float | None) – Sensitivity or depth threshold value.

  • depth_unit (sdk.DepthUnit | None) – Unit for depth_value.

Returns:

A list of observations matching the given filters.

Return type:

list[sdk.Observation]

class Observatory(across_client: across.sdk.v1.api_client_wrapper.ApiClientWrapper)[source]

Client for interacting with Observatory resources in the Across API.

Provides methods to retrieve single or multiple observatories by ID, name, type, telescope information, ephemeris type, or creation date.

across_client
get(id: str) across.sdk.v1.Observatory[source]

Retrieve a single Observatory by ID.

Parameters:

id (str) – The unique identifier of the observatory to retrieve.

Returns:

The requested observatory object.

Return type:

sdk.Observatory

get_many(name: str | None = None, type: across.sdk.v1.ObservatoryType | None = None, telescope_name: str | None = None, telescope_id: str | None = None, ephemeris_type: list[across.sdk.v1.EphemerisType] | None = None, created_on: datetime.datetime | None = None) list[across.sdk.v1.Observatory][source]

Retrieve multiple observatories filtered by optional criteria.

Parameters:
  • name (str | None, optional) – Filter by observatory name.

  • type (sdk.ObservatoryType | None, optional) – Filter by observatory type.

  • telescope_name (str | None, optional) – Filter by telescope name.

  • telescope_id (str | None, optional) – Filter by telescope ID.

  • ephemeris_type (list[sdk.EphemerisType] | None, optional) – Filter by one or more ephemeris types.

  • created_on (datetime | None, optional) – Filter by creation timestamp.

Returns:

A list of observatories matching the given filters.

Return type:

list[sdk.Observatory]

class Schedule(across_client: across.sdk.v1.api_client_wrapper.ApiClientWrapper)[source]

Client for interacting with Schedule resources in the Across API.

Provides methods to retrieve single or multiple schedules by ID, name, instrument information, or creation date.

across_client
get(id: str) across.sdk.v1.Schedule[source]

Retrieve a single Schedule by ID.

Parameters:

id (str) – The unique identifier of the Schedule to retrieve.

Returns:

The requested Schedule object.

Return type:

sdk.Schedule

get_many(page: int | None = None, page_limit: int | None = None, date_range_begin: datetime.datetime | None = None, date_range_end: datetime.datetime | None = None, status: across.sdk.v1.ScheduleStatus | None = None, external_id: str | None = None, fidelity: across.sdk.v1.ScheduleFidelity | None = None, created_on: datetime.datetime | None = None, observatory_ids: list[str | None] | None = None, observatory_names: list[str | None] | None = None, telescope_ids: list[str | None] | None = None, telescope_names: list[str | None] | None = None, name: str | None = None, include_observations: bool | None = None) across.sdk.v1.PageSchedule[source]
Retrieve all unique schedules filtered by optional criteria.
  • unique is defined as the most-recently submitted schedule per

telescope in a specified date-range

Parameters:
  • page (int | None, optional) – Page number for paginated results.

  • page_limit (int | None, optional) – Maximum number of results to return per page.

  • date_range_begin (datetime | None, optional) – Filter for schedules starting on or after this date.

  • date_range_end (datetime | None, optional) – Filter for schedules ending on or before this date.

  • status (sdk.ScheduleStatus | None, optional) – Filter by schedule status.

  • external_id (str | None, optional) – Filter by external identifier.

  • fidelity (sdk.ScheduleFidelity | None, optional) – Filter by schedule fidelity level.

  • created_on (datetime | None, optional) – Filter by creation timestamp.

  • observatory_ids (list[str | None] | None, optional) – Filter by one or more observatory IDs.

  • observatory_names (list[UUID | None] | None, optional) – Filter by one or more observatory names.

  • telescope_ids (list[str | None] | None, optional) – Filter by one or more telescope IDs.

  • telescope_names (list[str | None] | None, optional) – Filter by one or more telescope names.

  • name (str | None, optional) – Filter by schedule name.

  • include_observations (bool | None, optional) – Include observations in returned schedules (defaults to False)

Returns:

A paginated collection of schedules matching the given filters.

Return type:

sdk.PageSchedule

get_history(page: int | None = None, page_limit: int | None = None, date_range_begin: datetime.datetime | None = None, date_range_end: datetime.datetime | None = None, status: across.sdk.v1.ScheduleStatus | None = None, external_id: str | None = None, fidelity: across.sdk.v1.ScheduleFidelity | None = None, created_on: datetime.datetime | None = None, observatory_ids: list[str | None] | None = None, observatory_names: list[str | None] | None = None, telescope_ids: list[str | None] | None = None, telescope_names: list[str | None] | None = None, name: str | None = None, include_observations: bool | None = None) across.sdk.v1.PageSchedule[source]

Retrieve all schedules filtered by optional criteria.

Parameters:
  • page (int | None, optional) – Page number for paginated results.

  • page_limit (int | None, optional) – Maximum number of results to return per page.

  • date_range_begin (datetime | None, optional) – Filter for schedules starting on or after this date.

  • date_range_end (datetime | None, optional) – Filter for schedules ending on or before this date.

  • status (sdk.ScheduleStatus | None, optional) – Filter by schedule status.

  • external_id (str | None, optional) – Filter by external identifier.

  • fidelity (sdk.ScheduleFidelity | None, optional) – Filter by schedule fidelity level.

  • created_on (datetime | None, optional) – Filter by creation timestamp.

  • observatory_ids (list[str | None] | None, optional) – Filter by one or more observatory IDs.

  • observatory_names (list[str | None] | None, optional) – Filter by one or more observatory names.

  • telescope_ids (list[str | None] | None, optional) – Filter by one or more telescope IDs.

  • telescope_names (list[str | None] | None, optional) – Filter by one or more telescope names.

  • name (str | None, optional) – Filter by schedule name.

  • include_observations (bool | None, optional) – Include observations in returned schedules (defaults to False)

Returns:

A paginated collection of schedules matching the given filters.

Return type:

sdk.PageSchedule

post(schedule: across.sdk.v1.ScheduleCreate) str[source]

Creates a schedule in the across api.

Parameters:

schedule (sdk.ScheduleCreate) –

a ScheduleCreate object with the following arguments:

telescope_id: StrictStr, name: StrictStr, date_range: DateRange, status: ScheduleStatus, external_id: StrictStr | None, fidelity: ScheduleFidelity | None, observations: List[ObservationCreate]

Returns:

schedule_id (str | uuid)

model id for the newly created schedule

post_many(schedules: across.sdk.v1.ScheduleCreateMany) list[str][source]

Creates many schedules in the across api.

Parameters:

schedules (sdk.ScheduleCreateMany) –

a ScheduleCreateMany object with the following arguments:

schedules: list[sdk.ScheduleCreate]

Returns:

list[str]

model ids for the newly created schedules

class Telescope(across_client: across.sdk.v1.api_client_wrapper.ApiClientWrapper)[source]

Client for interacting with Telescope resources in the Across API.

Provides methods to retrieve single or multiple telescopes by ID, name, instrument information, or creation date.

across_client
get(id: str) across.sdk.v1.Telescope[source]

Retrieve a single Telescope by ID.

Parameters:

id (str) – The unique identifier of the Telescope to retrieve.

Returns:

The requested Telescope object.

Return type:

sdk.Telescope

get_many(name: str | None = None, observatory_id: str | None = None, observatory_name: str | None = None, instrument_name: str | None = None, instrument_id: str | None = None, created_on: datetime.datetime | None = None, include_filters: bool | None = None, include_footprints: bool | None = None) list[across.sdk.v1.Telescope][source]

Retrieve multiple telescopes filtered by optional criteria.

Parameters:
  • name (str | None, optional) – Filter by telescope name.

  • observatory_id (str | None, optional) – Filter by observatory ID.

  • observatory_name (str | None, optional) – Filter by observatory name.

  • instrument_name (str | None, optional) – Filter by instrument name.

  • instrument_id (str | None, optional) – Filter by instrument ID.

  • created_on (datetime | None, optional) – Filter by creation timestamp.

  • include_filters (bool | None, optional) – Include telescope instrument filters with the returned values (defaults to False)

  • include_footprints (bool | None, optional) – Include telescope instrument footprints with the returned values (defaults to False)

Returns:

A list of telescopes matching the given filters.

Return type:

list[sdk.Telescope]

class VisibilityCalculator(across_client: across.sdk.v1.api_client_wrapper.ApiClientWrapper)[source]

Client for interacting with Visibility Calculator resources in the Across API.

Provides methods to calculate individual instrument visibility windows by instrument ID.

across_client
calculate_windows(instrument_id: str, ra: float | int, dec: float | int, date_range_begin: datetime.datetime, date_range_end: datetime.datetime, hi_res: bool | None = None, min_visibility_duration: int | None = None) across.sdk.v1.VisibilityResult[source]

Retrieve visibility windows for a target and a single instrument.

Parameters:
  • instrument_id (str) – The unique identifier of the instrument in the ACROSS core-server.

  • ra (float | int) – The Right Ascension of the target.

  • dec (float | int) – The Declination of the target.

  • date_range_begin (datetime) – The beginning of the date range to calculate the visibility windows.

  • date_range_end (datetime) – The end of the date range to calculate the visibility windows.

  • hi_res (bool | None, optional) – Flag to calculate high resolution windows (default is False)

  • min_visibility_duration (int | None, optional) – The minimum duration visibility windows to return, in seconds (default is 0).

Returns:

The requested visibility windows.

Return type:

sdk.VisibilityResult

calculate_joint_windows(instrument_ids: list[str | None], ra: float | int, dec: float | int, date_range_begin: datetime.datetime, date_range_end: datetime.datetime, hi_res: bool | None = None, min_visibility_duration: int | None = None) across.sdk.v1.JointVisibilityResult[source]

Retrieve joint visibility windows for a target and multiple instruments.

Parameters:
  • instrument_ids (list[str]) – List of unique identifiers of the instruments in the ACROSS core-server.

  • ra (float | int) – The Right Ascension of the target.

  • dec (float | int) – The Declination of the target.

  • date_range_begin (datetime) – The beginning of the date range to calculate the visibility windows.

  • date_range_end (datetime) – The end of the date range to calculate the visibility windows.

  • hi_res (bool | None, optional) – Flag to calculate high resolution windows (default is False)

  • min_visibility_duration (int | None, optional) – The minimum duration visibility windows to return, in seconds (default is 0).

Returns:

The requested visibility windows.

Return type:

sdk.VisibilityResult