Observations
py_outfit.observations.Observations
Read-only Python view over a single trajectory (list of astrometric observations).
Highlights
- Vector exports:
to_numpy()andto_list() - Row access / iteration:
__getitem__,__iter__ - Pretty display helpers:
show(...)– compact, fixed-width tabletable_wide(...)– diagnostic table with JD, radians, distances (AU)table_iso(...)– timestamp-centric (ISO TT / ISO UTC)*_with_env(env, ...)– same as above, but resolves observer names usingPyOutfit
to_numpy
to_numpy() -> tuple[
NDArray[float64],
NDArray[float64],
NDArray[float64],
NDArray[float64],
NDArray[float64],
]
Export arrays to NumPy (rad / days).
| RETURNS | DESCRIPTION |
|---|---|
tuple[ndarray, ndarray, ndarray, ndarray, ndarray]
|
Five 1D arrays of dtype float64:
|
to_list
Return a Python list of observation tuples.
| RETURNS | DESCRIPTION |
|---|---|
list[tuple[float, float, float, float, float]]
|
Each tuple is |
show
Render a compact, fixed-width table.
| PARAMETER | DESCRIPTION |
|---|---|
sorted
|
Sort rows by MJD(TT) ascending (default: False).
TYPE:
|
sec_prec
|
Fractional digits for sexagesimal seconds (default: 3).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Formatted table. |
show_with_env
show_with_env(env: PyOutfit, *, sorted: bool = False, sec_prec: int = 3) -> str
Compact table, resolving observer names via env.
| PARAMETER | DESCRIPTION |
|---|---|
env
|
Global environment used to resolve site names.
TYPE:
|
sorted
|
Sort rows by MJD(TT) ascending (default: False).
TYPE:
|
sec_prec
|
Fractional digits for sexagesimal seconds (default: 3).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Formatted table (with site names when available). |
table_wide
Diagnostic table (Unicode) with JD, radians, and AU distances.
Columns
# | Site | MJD (TT) | JD (TT) | RA±σ[arcsec] | RA [rad] | DEC±σ[arcsec] | DEC [rad] | |r_geo| AU | |r_hel| AU
| PARAMETER | DESCRIPTION |
|---|---|
sorted
|
Sort rows by MJD(TT) ascending (default: False).
TYPE:
|
sec_prec
|
Fractional digits for sexagesimal seconds (default: 3).
TYPE:
|
dist_prec
|
Fixed-point digits for AU distances (default: 6).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Unicode table (box drawing). |
table_wide_with_env
table_wide_with_env(
env: PyOutfit, *, sorted: bool = False, sec_prec: int = 3, dist_prec: int = 6
) -> str
Diagnostic table (Unicode) using env to resolve observer names.
See table_wide for columns and knobs.
| PARAMETER | DESCRIPTION |
|---|---|
env
|
Global environment used to resolve site names.
TYPE:
|
sorted
|
Sort rows by MJD(TT) ascending (default: False).
TYPE:
|
sec_prec
|
Fractional digits for sexagesimal seconds (default: 3).
TYPE:
|
dist_prec
|
Fixed-point digits for AU distances (default: 6).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Unicode table (box drawing). |
table_iso
ISO-centric table (Unicode) with TT & UTC timestamps.
Columns
# | Site | ISO (TT) | ISO (UTC) | RA±σ[arcsec] | DEC±σ[arcsec]
| PARAMETER | DESCRIPTION |
|---|---|
sorted
|
Sort rows by MJD(TT) ascending (default: False).
TYPE:
|
sec_prec
|
Fractional digits for seconds (applied to ISO & sexagesimal, default: 3).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Unicode table (box drawing). |
table_iso_with_env
table_iso_with_env(env: PyOutfit, *, sorted: bool = False, sec_prec: int = 3) -> str
ISO-centric table (Unicode) using env to resolve observer names.
See table_iso for columns and knobs.
| PARAMETER | DESCRIPTION |
|---|---|
env
|
Global environment used to resolve site names.
TYPE:
|
sorted
|
Sort rows by MJD(TT) ascending (default: False).
TYPE:
|
sec_prec
|
Fractional digits for seconds (applied to ISO & sexagesimal, default: 3).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Unicode table (box drawing). |
estimate_best_orbit
estimate_best_orbit(
env: PyOutfit, params: IODParams, seed: Optional[int] = ...
) -> Tuple[GaussResult, float]
Estimate the best orbit for this observation set using Gauss IOD.
| PARAMETER | DESCRIPTION |
|---|---|
env
|
Global environment providing ephemerides and the error model.
TYPE:
|
params
|
IOD configuration (triplet constraints, noise realizations, filters).
TYPE:
|
seed
|
Optional RNG seed for deterministic runs.
TYPE:
|
Notes
Due to a known bug in the Rust backend (Outfit) within
apply_batch_rms_correction, the per-observation uncertainties
(sigma_ra, sigma_dec) are modified in place and the changes persist on
the same Observations instance. Calling estimate_best_orbit multiple
times on the same object can therefore accumulate these changes and yield
different RMS values across calls. This behavior is unintended and will
be fixed upstream. As a temporary workaround, construct a fresh
Observations object for each call or use a copy that restores the
original uncertainties. Providing a seed only makes noise sampling
deterministic and does not prevent this mutation.
| RETURNS | DESCRIPTION |
|---|---|
(GaussResult, float)
|
The orbit result and the RMS value (radians). |