adam_core.observations.ades module¶
- class adam_core.observations.ades.ObservatoryObsContext(mpcCode: str, name: str | None = None)[source]¶
Bases:
object
- class adam_core.observations.ades.SubmitterObsContext(name: str, institution: str | None = None)[source]¶
Bases:
object
- class adam_core.observations.ades.TelescopeObsContext(design: str, aperture: float, detector: str, name: str | None = None, fRatio: float | None = None, filter: str | None = None, arraySize: str | None = None, pixelSize: float | None = None)[source]¶
Bases:
object
- class adam_core.observations.ades.SoftwareObsContext(astrometry: str | None = None, fitOrder: str | None = None, photometry: str | None = None, objectDetection: str | None = None)[source]¶
Bases:
object
- class adam_core.observations.ades.ObsContext(observatory: adam_core.observations.ades.ObservatoryObsContext, submitter: adam_core.observations.ades.SubmitterObsContext, observers: list[str], measurers: list[str], telescope: adam_core.observations.ades.TelescopeObsContext, software: adam_core.observations.ades.SoftwareObsContext | None = None, coinvestigators: list[str] | None = None, collaborators: list[str] | None = None, fundingSource: str | None = None, comments: list[str] | None = None)[source]¶
Bases:
object- observatory: ObservatoryObsContext¶
- submitter: SubmitterObsContext¶
- telescope: TelescopeObsContext¶
- software: SoftwareObsContext | None = None¶
- class adam_core.observations.ades.ADESObservations(table: Table, **kwargs: int | float | str)[source]¶
Bases:
Table- permID¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- provID¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- trkSub¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- obsSubID¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- obsTime¶
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.
- rmsTime¶
A column for storing 64-bit floating point numbers.
- ra¶
A column for storing 64-bit floating point numbers.
- dec¶
A column for storing 64-bit floating point numbers.
- rmsRACosDec¶
A column for storing 64-bit floating point numbers.
- rmsDec¶
A column for storing 64-bit floating point numbers.
- rmsCorr¶
A column for storing 64-bit floating point numbers.
- mag¶
A column for storing 64-bit floating point numbers.
- rmsMag¶
A column for storing 64-bit floating point numbers.
- band¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- stn¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- mode¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- astCat¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- photCat¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- logSNR¶
A column for storing 64-bit floating point numbers.
- seeing¶
A column for storing 64-bit floating point numbers.
- exp¶
A column for storing 64-bit floating point numbers.
- remarks¶
A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.
- schema: ClassVar[pa.Schema] = permID: large_string provID: large_string trkSub: large_string obsSubID: large_string obsTime: struct<days: int64, nanos: int64> child 0, days: int64 child 1, nanos: int64 rmsTime: double ra: double not null dec: double not null rmsRACosDec: double rmsDec: double rmsCorr: double mag: double rmsMag: double band: large_string stn: large_string not null mode: large_string not null astCat: large_string not null photCat: large_string logSNR: double seeing: double exp: double remarks: large_string¶
- adam_core.observations.ades.ADES_to_string(observations: ADESObservations, obs_contexts: dict[str, ObsContext], seconds_precision: int = 3, columns_precision: dict[str, int] = {'dec': 9, 'exp': 2, 'logSNR': 2, 'mag': 4, 'ra': 9, 'rmsCorr': 8, 'rmsDec': 5, 'rmsMag': 4, 'rmsRACosDec': 5, 'seeing': 2}) str[source]¶
Write ADES observations to a string.
- Parameters:
observations (ADESObservations) – The observations to write to a string.
obs_contexts (dict[str, ObsContext]) – A dictionary of observatory codes and their corresponding ObsContexts to use as the context headers for the different observatory codes in the observations.
seconds_precision (int, optional) – The precision to use for the seconds in the obsTime field, by default 3.
columns_precision (dict[str, int], optional) –
A dictionary of column names and their corresponding precision to use when writing the observations to the file, by default {
”ra”: 8, “dec”: 8, “rmsRACosDec”: 4, “rmsDec”: 4, “mag”: 2, “rmsMag”: 2,
} The MPC enforces strict limits on these and submitters may need permission to send high-precision data.
- Returns:
ades_string – The ADES observations as a string.
- Return type:
- adam_core.observations.ades.ADES_string_to_tables(ades_string: str) Tuple[dict[str, ObsContext], ADESObservations][source]¶
Parse an ADES format string into ObsContext and ADESObservations objects.
- Parameters:
ades_string (str) – The ADES format string to parse.
- Returns:
A tuple containing: - A dictionary mapping observatory codes to their ObsContext objects - An ADESObservations table containing the observations
- Return type: