vista.known_sources.known_sources.KnownSources

class vista.known_sources.known_sources.KnownSources(name)[source]

Base class for known sources like stars, planets, asteroids, satellites, etc.

It is expected that subclasses are implemented which contain groups of self-similar sources loaded together, i.e. an array of satellites, an array of stars, etc.

Parameters:

name (str) – unique name of the group of sources, stored in KnownSources.name. Examples: “GAIA stars”, “APASS stars”, “LEO satellites”

source_types

list of source types. Examples: [“star”, “star”, “star”], [“satellite”, “GEO satellite”, “LEO satellite”]

Type:

list[str]

source_names

list of unique names for all the sources

Type:

list[str]

__init__(name)[source]

Methods

__init__(name)

create_tracks(imagery)

Create a list of Tracks for the sources for the provided imagery.

get_geodetics(times)

Return an EarthLocation containing the positions of the sources at the provided time(s).

get_pixels(imagery, times)

Return the pixel positions of the source for the provided imagery and time(s).

__init__(name)[source]
get_geodetics(times)[source]

Return an EarthLocation containing the positions of the sources at the provided time(s). Subclasses should implement this function based on the source types and be sure to return the resulting EarthLocation in units of km

Parameters:

times (np.datetime64 | NDArray[np.datetime64] | astropy.time.Time) – Time or array of times for which to retrieve positions

Returns:

Astropy EarthLocation object containing geodetic coordinates in km

Return type:

EarthLocation

get_pixels(imagery, times)[source]

Return the pixel positions of the source for the provided imagery and time(s). Sources which are off-frame or behind the Earth have NaN locations

Parameters:
  • imagery (Imagery) – The imagery we want to project the source onto

  • times (np.datetime64, NDArray[np.datetime64], astropy.time.Time) – The time(s) to project at

Returns:

  • rows (NDArray) – Row coordinates of source positions in the frame(s)

  • cols (NDArray) – Column coordinates of source positions in the frame(s)

Return type:

Tuple[NDArray, NDArray]

create_tracks(imagery)[source]

Create a list of Tracks for the sources for the provided imagery. Ignores positions which are off-frame or behind the Earth. Sources which reappear after passing behind the Earth will therefore have multiple tracks

Parameters:

imagery (Imagery) – The imagery we want to create tracks for

Returns:

tracks – list of Track objects

Return type:

list[Tracks]