Trajectories: loading data and running batch IOD
This tutorial shows how to work with TrajectorySet
, the container for many objects with time‑ordered astrometric observations. You will learn how to:
- import trajectories from files (MPC 80‑column and ADES),
- build trajectories from in‑memory NumPy arrays,
- estimate preliminary orbits for all trajectories or just one.
The heavy lifting is performed by the Rust engine; the Python API keeps things concise and composable.
Prerequisites
You will need a global environment and at least one observing site:
Units used in this API: angles are radians unless stated otherwise; epochs are MJD (TT, days); uncertainties may be provided in arcseconds for convenience where noted.
Import from files
MPC 80‑column
Create a set from a single MPC 80‑column file, or append into an existing set.
Notes
- Input parsing mirrors the Rust engine. Avoid ingesting the same file twice: no de‑duplication is performed.
ADES (JSON or XML)
When creating from ADES, you can provide global uncertainties (arcsec) if they are not specified per row.
Build from in‑memory arrays
Two ingestion helpers are available. Use degrees/arcseconds for convenience, or supply radians for a zero‑copy path.
Degrees + arcseconds (converted once to radians)
Radians (zero‑copy)
Estimate orbits
You can estimate preliminary orbits for all trajectories in a set, or for a single trajectory.
Batch over all trajectories
Batch IOD across the set | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
Notes
- In sequential mode, pressing Ctrl‑C returns partial results collected so far.
- If
.do_parallel()
is enabled inIODParams
, cancellation is not available. - Set
seed
for deterministic noise sampling and triplet exploration.
One trajectory only
Use the dict‑like access to get an Observations
view, then call its single‑object API.
Single trajectory IOD | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
Caveats and reproducibility
- Known caveat: due to an upstream issue in the backend’s batch RMS correction, per‑observation uncertainties may be modified in place during a run. Calling
estimate_best_orbit
multiple times on the sameObservations
instance can yield different RMS values across calls. As a temporary workaround, recreate theObservations
(orTrajectorySet
) before each repeated estimation when you need strict reproducibility. - Providing a
seed
makes noise sampling deterministic but does not prevent such in‑place mutations.
See also
- API reference:
py_outfit.trajectories.TrajectorySet
- Configuration:
IODParams
tutorial for tuning Gauss IOD - High‑level snippet used in examples:
Overview | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
|