adam_core.observers.observers module¶
- class adam_core.observers.observers.ObservatoryParallaxCoefficients(table: Table, **kwargs: int | float | str)[source]¶
Bases:
Table- code¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- longitude¶
A column for storing 64-bit floating point numbers.
- cos_phi¶
A column for storing 64-bit floating point numbers.
- sin_phi¶
A column for storing 64-bit floating point numbers.
- name¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- lon_lat() tuple[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]][source]¶
Return the longitude and latitude of the observatories in degrees.
This is only valid for Earth-based observatories.
- Returns:
longitude (np.ndarray) – The longitude of the observatories in degrees. In the range -180 to 180 degrees, with positive values east of the prime meridian.
latitude (np.ndarray) – The latitude of the observatories in degrees. In the range -90 to 90 degrees, with positive values north of the equator.
- timezone() ndarray[tuple[Any, ...], dtype[str_]][source]¶
Return the timezone of the observatories in hours.
- Returns:
timezone – The timezone of the observatories in hours.
- Return type:
np.ndarray
- schema: ClassVar[pa.Schema] = code: large_string not null longitude: double not null cos_phi: double not null sin_phi: double not null name: large_string not null¶
- class adam_core.observers.observers.Observers(table: Table, **kwargs: int | float | str)[source]¶
Bases:
Table- code¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- coordinates¶
A column which represents an embedded quivr table.
- Parameters:
table_type – The type of the table to embed.
nullable – Whether the column can contain null values.
metadata – A dictionary of metadata to attach to the column.
- classmethod from_codes(codes: list | ndarray[tuple[Any, ...], dtype[str_]] | Array, times: Timestamp) Self[source]¶
Create an Observers table from a list of codes and times. The codes and times do not need to be unique and are assumed to belong to each other in an element-wise fashion. The observer state will be calculated correctly matched to the input times and replicated for duplicate times.
- Parameters:
- Returns:
observers – The observer and its state at each time.
- Return type:
~adam_core.observers.observers.Observers (N)
- classmethod from_code(code: str | OriginCodes, times: Timestamp) Self[source]¶
Instantiate an Observers table with a single code and multiple times. Times do not need to be unique. The observer state will be calculated for each time and correctly matched to the input times and replicated for duplicate times.
To load multiple codes, use from_code and then concatenate the tables.
Note that NAIF origin codes may not be supported by ~adam_core.propagator.Propagator classes such as PYOORB.
- Parameters:
code (Union[str, OriginCodes]) – MPC observatory code or NAIF origin code for which to find the states.
times (Timetamp (N)) – Epochs for which to find the observatory locations.
- Returns:
observers – The observer and its state at each time.
- Return type:
~adam_core.observers.observers.Observers (N)
Examples
>>> import numpy as np >>> from adam_core.time import Timestamp >>> from adam_core.observers import Observers >>> times = Timestamp.from_mjd(np.arange(59000, 59000 + 100), scale="tdb") >>> observers = Observers.from_code("X05", times)
- iterate_codes()[source]¶
Iterate over the codes in the Observers table.
- Yields:
code (str) – The code for observer.
observers (~adam_core.observers.observers.Observers) – The Observers table for this observer.
- schema: ClassVar[pa.Schema] = code: large_string not null coordinates: struct<x: double, y: double, z: double, vx: double, vy: double, vz: double, time: struct<days: int64 (... 106 chars omitted) child 0, x: double child 1, y: double child 2, z: double child 3, vx: double child 4, vy: double child 5, vz: double child 6, time: struct<days: int64, nanos: int64> child 0, days: int64 child 1, nanos: int64 child 7, covariance: struct<values: large_list<item: double>> child 0, values: large_list<item: double> child 0, item: double child 8, origin: struct<code: large_string> child 0, code: large_string¶
- table: pa.Table¶