empyrean.ObservationResults

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

Bases: Table

Per-observation OD results — full upstream surface.

Mirrors scott::results::ObservationResult field-for-field. Use obs_id to cross-match a row back to its source ADES observation. Null values mark stats that weren’t computed for the call type (e.g. evaluate doesn’t run rejection or influence diagnostics, so those fields come back null / rejection_reason="not_evaluated").

All angular quantities are in arcseconds; track_position_angle_deg is in degrees (East of North).

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.

null_mask()

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

nulls(size, **kwargs)

Create a table with nulls.

rejected_only()

Rows with selected == False (rejected — see rejection_reason for which layer dropped them).

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(obs_codes)

Rows from one or more MPC observatory codes.

selected_only()

Rows with selected == True (used in the fit).

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)

worst_chi2([n])

Top-n rows by chi2, descending.

Attributes

along_track

Along-track residual (arcsec).

along_track_error

Along-track 1-σ uncertainty (arcsec).

ast_cat

Star catalog used for astrometric reduction (ADES astCat).

chi2

Mahalanobis χ².

cooks_distance

Cook's distance.

cross_track

Cross-track residual (arcsec).

cross_track_error

Cross-track 1-σ uncertainty (arcsec).

dec_residual

Dec residual O−C (arcsec).

dof

Degrees of freedom (number of non-NaN residual dimensions).

epoch_mjd_tdb

Observation epoch (MJD TDB).

fractional_information

Fractional Fisher-information contribution f_i = tr(N⁻¹ I_i).

leverage

Scalar leverage h_ii ∈ [0, 2].

obs_code

MPC observatory code.

obs_id

ADES obsID (or scott auto-assigned) — cross-match key.

probability

χ² survival probability.

ra_residual

RA·cos(Dec) residual O−C (arcsec).

rejection_criterion

The criterion value (χ², Cook's D, ...) tested against the threshold.

rejection_effective_threshold

Effective threshold for adaptive rejection (Layer 3).

rejection_information_loss

D-optimality information loss from removing this observation.

rejection_reason

accepted / chi_squared / sigma_clip / cooks_distance / adaptive / unsupported_observatory / cmc2003 / radar_observations_unsupported / occultation_observations_unsupported / outside_arc / not_evaluated.

rejection_threshold

Static threshold the criterion was compared against.

residual_cov_corr

RA-Dec correlation coefficient (dimensionless, [-1, 1]).

residual_cov_dec

Combined obs+predicted Dec variance (arcsec²).

residual_cov_ra

Combined obs+predicted RA·cos(Dec) variance (arcsec²).

rms_combined_arcsec

rmsra2+rmsdec2\sqrt{\mathrm{rms}_\text{ra}^2 + \mathrm{rms}_\text{dec}^2} — convenience for callers that want a single per-table RMS figure rather than the RA / Dec split.

schema

selected

True = used in fit.

track_position_angle_deg

Position angle of sky motion (deg, East of North).

table

Parameters:
  • table (Table)

  • kwargs (AttributeValueType)

obs_id

ADES obsID (or scott auto-assigned) — cross-match key.

obs_code

MPC observatory code.

ast_cat

Star catalog used for astrometric reduction (ADES astCat).

epoch_mjd_tdb

Observation epoch (MJD TDB).

ra_residual

RA·cos(Dec) residual O−C (arcsec).

dec_residual

Dec residual O−C (arcsec).

chi2

Mahalanobis χ². NaN if combined covariance unavailable.

dof

Degrees of freedom (number of non-NaN residual dimensions).

probability

χ² survival probability.

selected

True = used in fit.

residual_cov_ra

Combined obs+predicted RA·cos(Dec) variance (arcsec²).

residual_cov_dec

Combined obs+predicted Dec variance (arcsec²).

residual_cov_corr

RA-Dec correlation coefficient (dimensionless, [-1, 1]).

rejection_reason

accepted / chi_squared / sigma_clip / cooks_distance / adaptive / unsupported_observatory / cmc2003 / radar_observations_unsupported / occultation_observations_unsupported / outside_arc / not_evaluated. Mirrors scott::rejection::RejectionReason snake-cased.

Type:

One of

rejection_criterion

The criterion value (χ², Cook’s D, …) tested against the threshold.

rejection_threshold

Static threshold the criterion was compared against.

rejection_effective_threshold

Effective threshold for adaptive rejection (Layer 3).

rejection_information_loss

D-optimality information loss from removing this observation.

cooks_distance

Cook’s distance.

leverage

Scalar leverage h_ii ∈ [0, 2].

fractional_information

Fractional Fisher-information contribution f_i = tr(N⁻¹ I_i).

along_track

Along-track residual (arcsec). Null if no sky-motion rates.

cross_track

Cross-track residual (arcsec). Null if no sky-motion rates.

along_track_error

Along-track 1-σ uncertainty (arcsec).

cross_track_error

Cross-track 1-σ uncertainty (arcsec).

track_position_angle_deg

Position angle of sky motion (deg, East of North).

selected_only()[source]

Rows with selected == True (used in the fit).

Return type:

ObservationResults

rejected_only()[source]

Rows with selected == False (rejected — see rejection_reason for which layer dropped them).

Return type:

ObservationResults

select_station(obs_codes)[source]

Rows from one or more MPC observatory codes.

Return type:

ObservationResults

Parameters:

obs_codes (str | list[str])

worst_chi2(n=10)[source]

Top-n rows by chi2, descending. NaN χ² rows sort last (they’re left-overs of the not-evaluated path).

Return type:

ObservationResults

Parameters:

n (int)

property rms_combined_arcsec: float

rmsra2+rmsdec2\sqrt{\mathrm{rms}_\text{ra}^2 + \mathrm{rms}_\text{dec}^2} — convenience for callers that want a single per-table RMS figure rather than the RA / Dec split.

schema: ClassVar[Schema] = obs_id: large_string not null obs_code: large_string not null ast_cat: large_string epoch_mjd_tdb: double not null ra_residual: double not null dec_residual: double not null chi2: double not null dof: int32 not null probability: double not null selected: bool not null residual_cov_ra: double residual_cov_dec: double residual_cov_corr: double rejection_reason: large_string not null rejection_criterion: double rejection_threshold: double rejection_effective_threshold: double rejection_information_loss: double cooks_distance: double leverage: double fractional_information: double along_track: double cross_track: double along_track_error: double cross_track_error: double track_position_angle_deg: double