celestial-pointing
Telescope pointing model fitting and correction.
Build, fit, and apply telescope pointing models using standard equatorial and harmonic terms. Interactive REPL with TPOINT-compatible workflow: load observations, fit models via least-squares, analyze residuals with plots, and export corrections. No runtime FFI.
Installation
[]
= "0.1"
Or run the interactive CLI:
Modules
| Module | Purpose |
|---|---|
observation |
Observation struct (catalog, observed, commanded coords) |
model |
PointingModel with coefficient management and application |
terms |
6 base + 8 physical + 96 harmonic term implementations |
solver |
Weighted least-squares fitting via nalgebra SVD |
session |
Interactive session state (observations, model, fit) |
commands |
30+ REPL commands (FIT, SHOW, OPTIMAL, plots, etc.) |
plot |
SVG and terminal ASCII residual visualization |
Pointing Terms
| Category | Terms |
|---|---|
| Base | IH, ID, CH, NP, MA, ME (index, collimation, polar alignment) |
| Physical | TF, TX, DAF, FO, HCES, HCEC, DCES, DCEC (flexure, fork) |
| Harmonic | HxSy, HxCy patterns for periodic errors (x=H/D/X, y=H/D, 1-8) |
Example Session
)
)
Commands
| Command | Purpose |
|---|---|
INDAT |
Load observation data file |
USE |
Add terms to active model |
FIT |
Fit model to observations |
SHOW |
Display current model coefficients |
OPTIMAL |
Auto-build model using BIC selection |
OUTMOD |
Export model coefficients |
CORRECT |
Compute correction for target coordinates |
PREDICT |
Show per-term correction breakdown |
GSCAT |
Scatter plot (dX vs dDec) |
GDIST |
Histogram of residual distributions |
GMAP |
Sky map with residual vectors |
GHA |
Residuals vs hour angle |
GDEC |
Residuals vs declination |
GHYST |
Hysteresis plot by pier side |
Design Notes
- OPTIMAL uses BIC: Forward stepwise selection with Bayesian Information Criterion prevents overfitting. Terms must improve BIC by at least -6.0 to be added.
- Parallel harmonic search: Candidate evaluation uses rayon for fast model selection across 96 harmonic terms.
- Dual output modes: All plot commands support terminal ASCII (no args) or SVG file output (with path argument).
- Pier-side aware: Observations track East/West pier side for hysteresis analysis on German equatorial mounts.
License
Licensed under either of:
- Apache License, Version 2.0
- MIT License
Contributing
See the repository for contribution guidelines.