empyrean.ADESObservations

class ADESObservations(table, **kwargs)[source]

Bases: Table

ADES optical observations — full schema.

Every named PSV column round-trips losslessly across the Python ↔ wrapper ↔ C ABI boundary. The class name signals that the schema is the MPC ADES astrometric data exchange standard, not a generic observations record.

Methods

__init__(table, **kwargs)

apply_mask(mask)

Return a new table with rows filtered to match a boolean mask.

as_column([nullable, metadata])

Embed the Table as a column in another Table.

attributes()

Return a dictionary of the table's attributes.

chunk_counts()

Returns the number of discrete memory chunks that make up each of the Table's underlying arrays.

column(column_name)

Returns the column with the given name as a raw pyarrow ChunkedArray.

drop_duplicates([subset, keep])

Drop duplicate rows from a ~quivr.Table.

empty(**kwargs)

Create an empty instance of the table.

flattened_table()

Completely flatten the Table's underlying Arrow table, taking into account any nested structure, and return the data table itself.

fragmented()

Returns true if the Table has any fragmented arrays.

from_csv(input_file[, validate])

Read a table from a CSV file.

from_dataframe(df[, validate])

Load a DataFrame into the Table.

from_feather(path[, validate])

Read a table from a Feather file.

from_flat_dataframe(df[, validate])

Load a flattened DataFrame into the Table.

from_kwargs([validate, permit_nulls])

Create a Table instance from keyword arguments.

from_parquet(path[, memory_map, ...])

Read a table from a Parquet file.

from_pyarrow(table[, validate, permit_nulls])

Create a new table from a pyarrow Table.

invalid_mask()

Return a boolean mask indicating which rows are invalid.

is_valid()

Validate the table against the schema.

n_oppositions([gap_days])

Count of distinct apparitions, defined as 1 + (number of consecutive-observation gaps exceeding ``gap_days)``.

null_mask()

Return a boolean mask indicating which rows of the entire table are null.

nulls(size, **kwargs)

Create a table with nulls.

select(column_name, value)

Select from the table by exact match, returning a new Table which only contains rows for which the value in column_name equals value.

select_station(codes)

Rows from one or more MPC observatory codes (the stn column).

separate_invalid()

Separates rows that have invalid data from those that have valid data.

set_column(name, data)

Return a copy of the table with a particular column replaced with new data.

sort_by(by)

Sorts the Table by the given column name (or multiple columns).

take(row_indices)

Return a new Table with only the rows at the given indices.

to_csv(path[, attribute_columns])

Write the table to a CSV file.

to_dataframe([flatten, attr_handling])

Returns self as a pandas DataFrame.

to_feather(path, **kwargs)

Write the table to a Feather file.

to_parquet(path, **kwargs)

Write the table to a Parquet file.

to_structarray()

Returns self as a StructArray.

unique_indices([subset, keep])

Get the indices of the first or last occurrence of each unique row in the table.

validate()

Validate the table against the schema, raising an exception if invalid.

where(expr)

Return a new table with rows filtered to match an expression.

with_table(table)

Attributes

ast_cat

A column for storing large strings (over 231 bytes long).

band

A column for storing large strings (over 231 bytes long).

ctr

A column for storing 64-bit floating point numbers.

dec

A column for storing 64-bit floating point numbers.

exp

A column for storing 64-bit floating point numbers.

log_snr

A column for storing 64-bit floating point numbers.

mag

A column for storing 64-bit floating point numbers.

mode

A column for storing large strings (over 231 bytes long).

n_stars

A column for storing 32-bit integers.

notes

A column for storing large strings (over 231 bytes long).

obs_id

A column for storing large strings (over 231 bytes long).

obs_sub_id

A column for storing large strings (over 231 bytes long).

obs_time

A column for storing large strings (over 231 bytes long).

perm_id

A column for storing large strings (over 231 bytes long).

phot_ap

A column for storing 64-bit floating point numbers.

phot_cat

A column for storing large strings (over 231 bytes long).

pos1

A column for storing 64-bit floating point numbers.

pos2

A column for storing 64-bit floating point numbers.

pos3

A column for storing 64-bit floating point numbers.

prog

A column for storing large strings (over 231 bytes long).

prov_id

A column for storing large strings (over 231 bytes long).

ra

A column for storing 64-bit floating point numbers.

remarks

A column for storing large strings (over 231 bytes long).

rms_corr

A column for storing 64-bit floating point numbers.

rms_dec

A column for storing 64-bit floating point numbers.

rms_fit

A column for storing 64-bit floating point numbers.

rms_mag

A column for storing 64-bit floating point numbers.

rms_ra

A column for storing 64-bit floating point numbers.

schema

seeing

A column for storing 64-bit floating point numbers.

stn

A column for storing large strings (over 231 bytes long).

sys

A column for storing large strings (over 231 bytes long).

time_span_days

Arc length in days, max(obs_time) − min(obs_time).

trk_id

A column for storing large strings (over 231 bytes long).

trk_sub

A column for storing large strings (over 231 bytes long).

table

Parameters:
  • table (Table)

  • kwargs (AttributeValueType)

perm_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

prov_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

trk_sub

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

obs_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

obs_sub_id

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

trk_id

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.

prog

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

sys

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

ctr

A column for storing 64-bit floating point numbers.

pos1

A column for storing 64-bit floating point numbers.

pos2

A column for storing 64-bit floating point numbers.

pos3

A column for storing 64-bit floating point numbers.

obs_time

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

ra

A column for storing 64-bit floating point numbers.

dec

A column for storing 64-bit floating point numbers.

rms_ra

A column for storing 64-bit floating point numbers.

rms_dec

A column for storing 64-bit floating point numbers.

rms_corr

A column for storing 64-bit floating point numbers.

ast_cat

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

mag

A column for storing 64-bit floating point numbers.

rms_mag

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.

phot_cat

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

phot_ap

A column for storing 64-bit floating point numbers.

log_snr

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.

rms_fit

A column for storing 64-bit floating point numbers.

n_stars

A column for storing 32-bit integers.

notes

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

remarks

A column for storing large strings (over 231 bytes long). Large string data is stored in variable-length chunks.

select_station(codes)[source]

Rows from one or more MPC observatory codes (the stn column).

Return type:

ADESObservations

Parameters:

codes (str | list[str])

property time_span_days: float

Arc length in days, max(obs_time) − min(obs_time). Empty / single-row tables return 0.0.

n_oppositions(gap_days=90.0)[source]

Count of distinct apparitions, defined as 1 + (number of consecutive-observation gaps exceeding ``gap_days)``.

90-day default matches scott’s ODConfig.opposition_gap_days and the conventional planetary-science threshold for Sun-synodic visibility windows. Empty tables return 0; single-row tables return 1.

Return type:

int

Parameters:

gap_days (float)

schema: ClassVar[Schema] = perm_id: large_string prov_id: large_string trk_sub: large_string obs_id: large_string obs_sub_id: large_string trk_id: large_string stn: large_string not null mode: large_string prog: large_string sys: large_string ctr: double pos1: double pos2: double pos3: double obs_time: large_string not null ra: double not null dec: double not null rms_ra: double rms_dec: double rms_corr: double ast_cat: large_string mag: double rms_mag: double band: large_string phot_cat: large_string phot_ap: double log_snr: double seeing: double exp: double rms_fit: double n_stars: int32 notes: large_string remarks: large_string