Changelog
Changes in each release, newest first. Every crate in the workspace shares one version, so one entry covers all of them.
[0.3.0] - 2026-11-30
This release speeds up SER frame reads on captures that aren’t in the page cache yet. Only celestial-images changed. The other crates move to 0.3.0 because every crate shares one version.
celestial-images
- Breaking:
ImageError,FitsError,XisfErrorandSerErrorare#[non_exhaustive], so amatchon them needs a wildcard arm. Later variants won’t break callers. - Breaking:
SerErrorhas a new variant,RowsOutOfBounds, returned when a row range is reversed or ends past the frame height. SerReader::read_frame_intoreads a frame into a buffer the caller owns, andSerReader::read_rows_intoreads a band of rows from one. Both use a positioned read (preadon Linux and macOS) instead of the memory map. A 15 GB capture that isn’t in the page cache reads in 2.3 s instead of 19.6 s on one thread.read_frame_data,read_frame_u16andread_timestampread the same way. If the file is truncated while it’s open, these methods and the two new ones return an I/O error instead of raisingSIGBUS.read_frame,frame_slice,frame_slicesanditer_framesstill borrow the memory map.
[0.2.0] - 2026-11-29
This release changes the public API of every crate. Crate roots no longer re-export types, so imports come from the defining module. Functions that receive NaN, infinite or out-of-range input return errors. celestial-solver is published for the first time.
celestial-core
- Breaking: The crate root no longer re-exports anything. Import from the module that defines the item, for example
celestial_core::angle::Angle,celestial_core::matrix::{RotationMatrix3, Vector3},celestial_core::location::Locationandcelestial_core::errors::{AstroError, AstroResult, MathErrorKind}. The submodules ofnutation,precession,cioandlocationare now private, socelestial_core::precession::iau2006::PrecessionIAU2006becomescelestial_core::precession::PrecessionIAU2006. - Breaking: Functions that can receive non-finite or undefined input now return
AstroResultand need a?. This coverswrap_pm_pi,wrap_0_2pi,Angle::wrapped,Angle::normalized,gcrs_to_cirs_matrix,iau_2006_mean_obliquity,iau_1980_mean_obliquity,PrecessionIAU2006::npb_matrix_iau2006aandPrecessionIAU2006::fukushima_williams_angles. - Breaking: The nutation models,
PrecessionIAU2000::compute,PrecessionIAU2006::computeand both mean obliquity functions return an error for a non-finite date. They also return an error for a date more thanMAX_CENTURIES_FROM_J2000(20 Julian centuries) from J2000.0. In 0.1.1-alpha.2 they returned a value, NaN for NaN input. - Breaking:
PrecessionIAU2000::computetakes a two-part Julian Date(date1, date2)instead of TT centuries, the same asPrecessionIAU2006::compute.fukushima_williams_anglesreturns aFukushimaWilliamsAnglesstruct with fieldsgamma_bar,phi_bar,psi_barandepsilon_ainstead of a 4-tuple.fw_angles_to_matrix, thePrecessionCalculatortrait and theBiasMatrix,PrecessionMatrixandBiasPrecessionMatrixaliases are removed. UseRotationMatrix3in place of the aliases. - Breaking:
Locationfields are private. Read them withlatitude(),longitude()andheight().to_geocentric_kmandto_geocentric_metersreturn(f64, f64)instead of aResult.Location::from_degreesaccepts east longitudes in (180°, 360°] and stores the [-180°, 180°] equivalent. Validation errors reportMathErrorKind::NotFiniteorOutOfRangeinstead ofInvalidInput. - Breaking:
RotationMatrix3::from_arrayreturnsAstroResult. It rejects non-finite elements and any matrix that is not a proper rotation, with a tolerance of 1e-12.RotationMatrix3::get,set,IndexandIndexMutare removed, so read elements withelements().Vector3no longer implementsIndexorIndexMut, so use thex,yandzfields or the falliblegetandset.Vector3::normalizereturnsAstroResultand fails on a zero-length vector instead of returning it unchanged. - Breaking:
AstroErrorandMathErrorKindare#[non_exhaustive], somatchneeds a wildcard arm.AstroError::ExternalLibraryErrorandexternal_library_errorare removed.MathErrorKind::Overflow,UnderflowandPrecisionLossare removed.MathErrorKindnow implementsCopy,EqandDisplay, and error messages print the kind in words, for example “(division by zero)”. - Breaking: These items are removed:
NutationModel. UseNutationIAU2000Adirectly.EquationOfOrigins. Use the functioncio::equation_of_origins(npb, s).NormalizeModeandclamp_dec.validate_longitude, both the free function and theAnglemethod.- The angle helpers in
utils:normalize_longitude,normalize_latitude,normalize_angle_rad,normalize_angle_to_positiveandangular_difference. math::vincenty_angular_separation. It is replaced bymath::angular_separation(lon1, lat1, lon2, lat2), which matches ERFAeraSeps.
- Breaking: These constants are renamed:
MICROARCSEC_TO_RADtoTENTH_MICROARCSEC_TO_RAD. Its value was always 0.1 µas.MOON_EARTH_MASS_RATIOtoMOON_EMB_MASS_RATIO.J2000_OBLIQUITY_RADtoVSOP2013_OBLIQUITY_RAD.FRAME_BIAS_PHI_RADtoVSOP2013_PHI_RAD.
- Breaking: The
erfa-testsfeature is renamedtest-support.test_helpers, the nutation term tables and the fundamental-argument traits (IERS2010FundamentalArgs,MHB2000FundamentalArgs) are public only with that feature. - Add
ecliptic::vsop2013_to_icrsandecliptic::icrs_to_vsop2013. Addconstants::SPEED_OF_LIGHT_M_PER_Sandconstants::MAX_CENTURIES_FROM_J2000. - Fix
parse_angle, which read a bare number such as"45.5"as hours (682.5°). It now reads degrees, asParseAngle::to_angledoes. Sexagesimal parsing returns an error for non-ASCII digits such as"12:34:56"instead of panicking. - Fix
SPEED_OF_LIGHT_AU_PER_DAY. It is now 173.1446326742403, ERFA’sDC. Before, it was 173.1446326846693. Angleunit conversions are now correctly rounded, so results can differ from 0.1.1-alpha.2 by 1 ulp. With theserdefeature,Anglerejects NaN and infinity when it serializes and deserializes.LocationandRotationMatrix3run their constructor validation when they deserialize.
celestial-wcs
- Breaking: The crate root no longer re-exports types. Import each type from its module, for example
celestial_wcs::builder::{Wcs, WcsBuilder},celestial_wcs::coordinate::{CelestialCoord, PixelCoord},celestial_wcs::spherical::Projectionandcelestial_wcs::error::WcsError. - Breaking: Native and celestial coordinates hold
f64degrees.CelestialCoord::new(alpha_deg, delta_deg)andNativeCoord::new(phi_deg, theta_deg)take degrees in place ofAngle. The newalpha_deg(),delta_deg(),phi_deg()andtheta_deg()return degrees, andalpha(),delta(),phi()andtheta()still returnAngle.SphericalRotation::newandSphericalRotation::from_crvalalso take degrees, andfrom_crvaltakes aphi_0argument beforetheta_0.phi_p_degrees()anddelta_p_degrees()are renamedphi_p_deg()anddelta_p_deg().IntermediateCoord::x_rad()andy_rad()are removed. - Breaking:
Projectionis an opaque struct, so callers can no longer match on its variants. Build one with its constructor, such asProjection::tan()orProjection::zpn(coeffs).Projection::cop,coe,codandcootake a second argument,eta(PV2_2). Pass0.0to get the old behavior. - Breaking:
Wcs::pixel_to_celestialreturns celestial longitude in [0, 360] when CRVAL1 >= 0, and in [-360, 0] when CRVAL1 < 0. It used to return (-180, 180], so a field at CRVAL1 = 350 mapped its reference pixel to -10. - Breaking:
Wcs::pix2worldandWcs::world2pixare removed. Usepixel_to_celestialandcelestial_to_pixel.Wcs::crval()returns[f64; 2]in place of a tuple, andWcs::projection_code()returns&'static str.Wcs::new,Wcs::linear(),CoordType::from_ctype_prefixand theWcsErrorconstructor functions are no longer public.Wcs::cd_matrix()andWcs::native_reference()are new. - Breaking: TNX distortion is removed:
TnxDistortion,TnxSurface,SurfaceTypeandCrossTerms. TheDistortiontrait is also removed, and thedistortion::polynomialmodule is now private.DistortionModelhas two variants,SipandTpv. - Breaking:
SipDistortion::new,set_a,set_b,set_ap,set_bpandset_inverse_orderreturnWcsResult. They reject orders outside 2 to 9 for A and B, and outside 0 to 9 for AP and BP. They also reject a term above its order and a non-finite value. The old setters dropped these without an error.apply_inversealways solves A and B by Newton’s method and uses AP and BP only as the starting point. - Breaking:
TpvDistortion::set_pv(axis, index, value)andpv(axis, index)replaceset_pv1,set_pv2,get_pv1andget_pv2.TpvDistortion::new()returns the identity (PV1_1 = PV2_1 = 1), andidentity()is removed. Axis 2 now swaps ξ and η, as the TPV convention requires. Code that set PV2_2 = 1 for the η term must set PV2_1 instead. - Breaking:
WcsError::CoordinateErroris removed, and the crate no longer depends oncelestial-coords. The newWcsError::MissingBuilderFieldnames theWcsBuildersetter that was not called, andWcsErrorderivesClone. Every entry point returnsInvalidParameterfor NaN or infinite input.PixelCoord::to_array_indexreturnsWcsResult<(usize, usize)>, withOutOfBoundsfor a non-finite pixel or one below 0.5. - Breaking:
WcsBuilder::buildrejects more input. It rejects PV2_m values set beside an explicitprojection(), and projection parameters outside Paper II’s ranges, such as AZP with mu = -1.WcsBuilder::from_headerrejects a CTYPE1/CTYPE2 pair that is not a celestial pair. A CYP header without PV2_1 now uses Paper II’s default mu = 1. The old default was 0. WcsBuilder::from_headerreads more headers:- TAN-SIP and TPV headers, which used to fail with
UnsupportedProjection. CROTA2.CUNITin arcmin, arcsec, mas or rad.- Headers that list latitude first.
- PV2_0 to PV2_29 (up to PV2_20 before), and PV1_0 to PV1_4 for the fiducial point, LONPOLE and LATPOLE.
- Absent CRPIX and CRVAL now default to 0 and absent CDELT to 1, as Paper I specifies.
- TAN-SIP and TPV headers, which used to fail with
Wcs::to_keywordswrites CUNIT1 and CUNIT2, the SIP or TPV terms, PV1_m and the header’s own generic CTYPE prefixes. This lets a header read back as the same WCS. It leaves out PV2_m values that are at their Paper II defaults.- Fix three projection bugs:
- The pole longitude in
SphericalRotation::from_crvalwas wrong when CRVAL2 < 0 for projections whose fiducial point is on the native equator (CAR, MER, CEA, CYP, SFL, PAR, MOL, AIT, BON, PCO, TSC, CSC, QSC). Their reference pixel mapped 180 degrees away in RA. - Conic projections with a southern standard parallel flipped the sign of native longitude.
- The ZPN inverse could return a root past the first turning point.
- The pole longitude in
celestial-time
-
Breaking: Nothing is re-exported from the crate root or from the
scales,sidereal,transformsandscales::conversionsmodule roots. Import from the defining module, for examplecelestial_time::julian::JulianDate,celestial_time::scales::tt::TT,celestial_time::scales::conversions::tt_tdb::ToTDBandcelestial_time::sidereal::gmst::GMST. Theparsingmodule is private, soparse_iso8601andParsedDateTimeare gone. Parse withFromStron a scale type instead, for example"2000-01-01T12:00:00".parse::<TT>(). -
Breaking: Constructors and conversions that can fail now return
TimeResult. This covers:JulianDate::from_calendarand every*_from_calendarfunction.UTC::new,UTC::nowandUTC::to_iso8601.TT::centuries_since_j2000,get_tai_utc_offsetandcalendar_to_julian.from_hours,from_degreesandfrom_radiansonSiderealAngle,GMST,GAST,LMSTandLAST.hour_angle_to_target,GMST::to_lmst,GAST::to_last,LMST::to_gmstandLAST::to_gast.
These functions reject dates that do not exist, out-of-range times of day and non-finite values.
-
Breaking:
JulianDate:- The fields are private. Read them with
jd1()andjd2(). AddandFrom<f64>are removed. Useadd_daysandfrom_f64.Subreturns the difference in days as anf64.==compares the date value, soJulianDate::new(2451545.0, 0.5) == JulianDate::new(2451545.5, 0.0).Displayprints both parts, for exampleJD 2451545 + 0.5. Before, it printed the sum to nine decimals.
- The fields are private. Read them with
-
Breaking:
TimeError::InvalidDatecarries aStringmessage. -
Breaking: UTC is undefined before 1960-01-01.
utc_from_calendar,UTC::new,UTC::from_str,get_tai_utc_offsetand the UTC conversions returnTimeError::InvalidDatefor those dates. Before, they used TAI-UTC = 0. -
Breaking:
TT::centuries_since_j2000returnsTimeError::InvalidEpochmore than 20 centuries from J2000.0. Nutation, precession,GMSTandGASTuse it, so they fail for the same dates.earth_rotation_anglefails for a non-finite date or one more than 1e12 days from J2000.0. -
Breaking: These conversion items are removed:
- The traits
ToUT1,ToTCB,ToTCGFromTCBandToUTCViaTAI, with the direct TCG-TCB conversion. - The identity conversions such as
TT::to_tt(). ToTT for TDB. UseToTTFromTDB.- The free functions
utc_to_taiandtai_to_utc. Useto_tai()andto_utc().
- The traits
-
Breaking: These other items are removed:
TT::from_jdandfrom_julian_date_rawonTT,TAIandGPS. Usefrom_julian_date(JulianDate::new(jd1, jd2)).ObservatoryContextand the siderealj2000()constructors.LAST::from_lmst_and_equation_of_equinoxes.From<LMST> for GMSTandFrom<LAST> for GAST.scales::common::is_leap_yearandscales::common::next_calendar_day.- Every public constant in
celestial_time::constantsexceptUNIX_EPOCH_JD.
-
UTC::newhandles leap seconds the same wayutc_from_calendardoes. A day that ends in a leap second is 86,401 s long. AddUTC::to_unixas its inverse.UTC::from_straccepts a trailingZ, and the other scales returnParseErrorfor it. ISO 8601 parsing accepts expanded years such as+10000and a lowercasetseparator. -
Fix TT-to-TDB with a location. The diurnal terms read the TT day fraction counted from noon, so they ran 12 hours off. They now read the UT1 fraction from midnight.
to_tdb_with_location*andto_tt_with_location*match the ERFAeraDtdbchain bit-for-bit. TDB-to-TT evaluates the series once at TDB instead of three times. The UT1 offset parameter is renamedut1_minus_tt_seconds. -
Fix
UTC::to_iso8601. It truncated, so it could print60.000seconds outside a leap second. It now rounds to the millisecond and carries into the minute. It prints:60only during a leap second. FixUTC::now, which returned the Unix epoch when the system clock read before 1970. -
UTC-to-UT1 reads TAI-UTC at 0h on the UTC date, as
eraUtcut1does, which changes results before 1972.SiderealAngleDisplaynever shows24.000000h. Withserde,SiderealAnglewraps a stored angle into range and rejects non-finite values.
celestial-coords
-
Breaking: The crate root re-exports nothing, and
frames,eopandtransformsno longer re-export their types. Import each type from the module that defines it, for examplecelestial_coords::frames::icrs::ICRSPosition,celestial_coords::eop::record::EopParameters,celestial_coords::errors::CoordErrorandcelestial_coords::transforms::cartesian::CartesianFrame. ImportAngle,Location,Vector3andTTfromcelestial_coreandcelestial_time. -
Breaking: Conversions that depend on the Earth’s rotation take
&EopParametersin place of a delta-T in seconds or a second epoch. The new signatures areCIRSPosition::to_hour_angle(&observer, &eop),HourAnglePosition::to_cirs(&eop),TopocentricPosition::to_cirs(&eop),ITRSPosition::to_tirs(&eop)andTIRSPosition::to_itrs(&eop).TIRSPosition::from_cirs,from_itrsandcompute_delta_tare removed. UseCIRSPosition::to_tirs,ITRSPosition::to_tirsorastrom::earth::EarthRotationinstead. These calls return an error when the EOP record is more than one day from the position’s epoch. -
Breaking:
TopocentricPosition::atmospheric_refraction,with_refractionandwithout_refractiontake a&Refractionin place of four weather numbers.Refraction::new(pressure_hpa, temperature_c, relative_humidity, wavelength_um)?gives the closed-form constants.Refraction::from_weather(&weather)?gives ray-traced constants. Both return an error for non-finite input. -
Breaking: These functions now return
CoordResult, so callers add?:solar::compute_solar_orientationandsolar::sun_earth_distancelunar::compute_lunar_orientation,compute_optical_librationandcompute_sub_earth_pointHeliographicStonyhurst::disk_centerandSelenographicPosition::is_visible_from_earthEclipticPosition::mean_obliquity- the four diurnal parallax methods on
TopocentricPosition ITRSPosition::new,TIRSPosition::newand both types’from_position_vectoraberration::remove_aberrationandaberration::remove_light_deflection
NaN or infinite input returns an error where it used to produce NaN output.
-
Breaking: EOP API changes:
EopRecord::newno longer takeslod_sec. Add LOD with.with_lod(lod_sec)?.EopParameters::lodisOption<f64>.EopParameters::s_prime,compute_s_prime,compute_s_prime_jd,compute_era,corrected_cip_xandcorrected_cip_yare removed from the public API.EopRecordfields,EopRecord::with_flags,eop::parseandbundled::load_bundled_combinedare crate-private. UseEopProvider::from_finals_strorfrom_finals_fileto parse finals data.EopProvider::time_spanandEopInterpolator::time_spanreturn(f64, f64)in place of anOption.EopInterpolator::newandwith_max_gapreturnCoordResult, andEopInterpolator::extendis no longer public.EopSource::IersPrediction,EopSource::InterpolatedandEopQuality::LowPrecisionare removed.
-
Breaking:
CoordErrorconstructors are crate-private.EpochErrorandCoreErrorare tuple variants that wrap the source error, soCoreError(AstroError)replacesCoreError { message }.MissingObserverandExternalErrorare removed. File reads returnIo { context, source }.CoordErrorno longer implementsSerializeorDeserialize. -
Breaking: These items are removed:
- the
lighttimemodule andLightTimeCorrection ICRSPosition::position_uncertainty_arcsecsolar::compute_b0,compute_l0,compute_p,CARRINGTON_EPOCH_JDandCARRINGTON_SYNODIC_PERIOD. Read B0, L0 and P fromcompute_solar_orientation.HeliographicCarrington::carrington_rotation_number
solar::carrington_rotation_numberreturns a fractionalf64, where it used to return au32count.TopocentricPosition::parallactic_angle(ha, dec)is nowHourAnglePosition::parallactic_angle().set_radiuson the heliographic and selenographic types is crate-private. - the
-
Breaking:
HourAnglePosition::newfolds a declination past a pole back over the pole and adds 12 h to the hour angle, sodeclination()stays within ±90°. Callers that stored pier-flipped declinations must track the flip themselves. -
Add
astrom::Astrom. It computes the Earth’s position, velocity and GCRS-to-CIRS matrix once per epoch and converts positions between ICRS, GCRS and CIRS.Astrom::with_eopapplies the observed CIP offsets dX and dY.Astrom::for_siteuses the site’s position and velocity, which adds up to 0.32“ of diurnal aberration. Addastrom::earth::EarthRotationfor CIRS, TIRS, ITRS and hour angle. -
Add
proper_motion::CatalogStar::propagate. It propagates a star with parallax and radial velocity, following SOFA’spmsafe. Addaberration::apply_annual_aberrationandremove_annual_aberrationfor RA/Dec pairs. -
Add selectable refraction models: the
RefractionModeltrait,refraction::weather::Weather,ray_trace::RayTraceandclosed_form::ClosedForm.RayTraceuses Ciddor refractivity for optical wavelengths by default, or Hohenkerk and Sinclair, and Rueger refractivity above 100 µm.Refraction::from_modelselects a model.RefractionModel::refraction_atandobserved_zenith_distancegive the refraction at a zenith distance and its inverse. -
Fix the Earth-rotation chain:
- CIRS to TIRS rotated by minus the Earth rotation angle (ERA) and now rotates by plus the ERA.
- Hour angle subtracted the CIRS right ascension from apparent sidereal time, which is wrong by the equation of the origins, about 19’ in 2025. It now uses the ERA and applies polar motion, matching
eraApco13witheraAtioq.
-
Fix ICRS to GCRS. It applied aberration only and now also applies light deflection by the Sun, as ICRS to CIRS already did. ICRS to GCRS and ICRS to CIRS apply annual parallax when the position has a distance, matching
eraAtciq. ICRS, GCRS and CIRS conversions no longer reject epochs outside 1900 to 2100. -
Fix refraction near the horizon.
A tan z + B tan³ zhad no limit and diverged near the horizon.with_refractionevaluated it at the true place rather than the observed place. All three methods now use ERFA’s horizon limits. -
Fix four EOP bugs:
- UT1-UTC interpolation across a leap second used to jump by one second.
- CIP offsets beyond ±3.2767 mas were clipped.
EopProvider::bundled_with_updatekept the bundled rows on days the update file covered. It now uses the update file’s rows.- Bundled rows with no LOD are flagged
Predicted.
Duplicate MJDs and non-finite values return errors.
-
Fix solar and lunar orientation:
- B0, L0, P and the Carrington frame now follow Meeus chapter 29.
- Lunar libration and position angle follow Meeus chapter 53.
compute_sub_earth_pointincludes physical libration. It used to return the optical libration.
-
Fix five topocentric bugs:
- The parallactic angle formula dropped a cos(latitude) factor.
is_circumpolarandnever_riseswere wrong in the southern hemisphere.- Diurnal parallax ignored the observer’s height and the Earth’s flattening, and it now updates the distance. An object inside the Earth returns an error, where it used to return 90°.
EclipticPosition::to_icrsuses the position’s own epoch rather than the argument.air_mass_pickeringreturns infinity below -1.115°. It used to return negative values between -2° and -1.115°.
celestial-catalog
- Breaking: The catalog file format is now version 2, and
Catalog::openrejects version 1 files with a message to rebuild. Version 1 put stars at RA 270 to 360 in the equatorial belt (|Dec| <= 41.8 degrees) under the wrong HEALPix base pixel. The forge intermediate files changed format too, so rebuild with all four stages:ingest-gaia,ingest-hipparcos,mergeandbuild-index. - Breaking:
queryno longer re-exports types. Import fromquery::catalog::{Catalog, CatalogHeader, StarRecord}andquery::cone::{cone_search, ConeSearchParams, ConeSearchResult}.cone_search_at_epochis removed. SetConeSearchParams::epochand callcone_searchinstead. - Breaking: Library functions return
celestial_catalog::error::CatalogErrorin place ofanyhow::Error, andanyhowis now a dependency of theclifeature only.Catalog::openreturnsCatalogResult<Catalog>.cone_searchreturnsCatalogResult<Vec<ConeSearchResult>>. It rejects non-finite input, Dec outside [-90, 90], a negative radius and a non-finite epoch.ang2pix_nestreturnsCatalogResult<u64>and rejects an order above 29 or an invalid position. - Breaking:
cone_searchpropagates each star with full space motion, including parallax, usingcelestial_coords::proper_motion::CatalogStar::propagate. It starts from the epoch in the catalog header and readsConeSearchParams::epochas TT. It used to apply proper motion linearly from a fixed J2016.0. It skips records with a non-finite place or a motion that cannot be propagated. - Breaking: A Hipparcos record with no Gaia cross-match has the negated HIP number as its
source_id. It used to be0x4000_0000_0000_0000 | HIP. - Catalogs built by forge have different contents:
- A cross-matched star keeps the Gaia record when Gaia has a 5- or 6-parameter solution, and keeps the Hipparcos record otherwise. The new
FLAG_5_OR_6_PARAMmarks these Gaia solutions. - A Hipparcos star with no Gaia ID link is paired with a Gaia record within 2“ whose Hp - G is in [-1.0, +2.0].
- Gaia duplicated sources are kept and marked with the new
FLAG_DUPLICATED_SOURCE. FLAG_BP_RP_EXCESS_SUSPECTuses the corrected excess factor C* from Riello et al. 2021.- Hipparcos positions are propagated to J2016.0 with parallax, which moves them by up to 0.058“.
- A cross-matched star keeps the Gaia record when Gaia has a 5- or 6-parameter solution, and keeps the Hipparcos record otherwise. The new
- Fix cone search pixel selection. It descends the HEALPix NEST hierarchy and keeps every pixel that a point of the cone falls in. The old code sampled a grid of points and could miss pixels. A disc that covers more than 12 * 4^10 pixels returns an error.
Catalog::openchecks more of the file:- The header’s epoch must be within 20 centuries of J2000.
- The file length must match the header exactly.
- Every pixel table entry must point at its own run of records.
- Star records are read with
bytemuck, andStarRecordderivesbytemuck::Podandbytemuck::Zeroable.
- Add
query::quadwithtan_project_star,tan_deproject_star,neighbor_quads,relabelled_quads,discrete_hash_key,discrete_hash_key_neighbors,QuadandQuadStar, which celestial-solver uses to match quads. Each quad’s star labels and hash code are the same at any rotation of the field. - Add helpers for writing catalog files:
CatalogHeader::to_bytes,StarRecord::to_le_bytes,StarRecord::from_le_bytesandquery::catalog::pixel_entry_bytes.query::healpix::nside_and_npix,query::healpix::reduce_ra_degandquery::validate::check_epoch.celestial_catalog::VERSION.- A
test-supportfeature that exposesquery::test_support.
forgechanges:download-gaiaresumes from a manifest and connects with a 30 s timeout. It retries with backoff and writes each file through a temporary file.download-gaiaskips a local file whose MD5 matches ESA’s_MD5SUM.txt. This addsmd-5to theclifeature.download-gaiaandingest-gaiacheck that the Gaia files cover every level-8 HEALPix pixel exactly once.--allow-partial-skyturns that check into a warning.ingest-gaiarequires abp_rpcolumn and skips malformed rows.build-indexaccepts--healpix-orderup to 10. It reads the epoch and magnitude limit from the merged data and replaces the output file only after the new file opens.
query-catalog --dateconverts 00:00:00 UTC on the date to TT. It used to pass the UTC date as TT, which was 69.184 s off. Its help text now names the programquery-catalog.
celestial-pointing
- Breaking: The crate is rewritten, and the 0.1 API is gone:
PointingModel,solver::fit_model,terms::create_term,IndatFile, theparserandplotmodules, and thecelestial_pointing::Errorre-export. The new entry points areobservation::ObservationSet::read_indatandObservationSet::reduce,model::Model::newwithmodel::model_from_names,fit::fitwithFitOptionsandFitOutcome, and the frame types inframes. Code can also drive asession::Sessionthroughcommands::execute, the same commands the shell runs. - Breaking: The
pointingbinary builds only with theclifeature. Install it withcargo install celestial-pointing --features cli. - Breaking: Remove alt-azimuth support. INDAT files marked
:ALTAZor:GIMBALreturnError::Indat, and the alt-az termsIA,IE,CA,NPAE,ANandAWno longer exist. Harmonic terms with result codes S, A and E returnError::UnsupportedTerm. fit::fitfits the model as a nonlinear problem. Each Gauss-Newton step is solved by truncated SVD. Singular values belowFitOptions::fittoltimes the largest are dropped from the step and from the sigmas, so models with dependent terms still fit.FitOutcomereturns the coefficients with sigmas, the per-observation residuals, the sky RMS, the PSD and the singular values.- Terms are evaluated in chain order. Each term is evaluated at a working place that the earlier terms have moved. A term with
ModelTerm::parallelset uses the same place as the term before it.FLOPis applied as a vertical shift.Model::mount_to_skyapplies the model, andModel::sky_to_mountinverts it by Newton iteration. - Add the terms
FLOP,TX10,X2HCandDNP, alongsideIH,ID,CH,NP,MA,ME,TF,TX,FO,HCES,HCEC,DCES,DCECandDAF. Generic harmonic terms such asHDSH,HXCH2SDandHHSH%accept the angles H, D, A, Z, E and Q, whole multiples, and half-angle (%) multiples. - Apply refraction when reducing star places.
RunRefractionholds either fixedRefractionconstants or aRefractionModelKindthat computes them from the INDAT run record’s weather. The kinds areCiddor(ray trace, the default),HohenkerkSinclairandClosedForm. The shell sets refraction withREFRACT <A> <B>andREFMODEL [CIDDOR | HS | CLOSED]. - Reject stars on reading when they are at or below 10 degrees unrefracted elevation, or within 0.2 degrees of the zenith or a celestial pole. The INDAT option
ALLSKYkeeps every star. - Read and write INDAT Format 1 with
ObservationSet::from_indatandObservationSet::to_indat. Read and write OUTMOD withoutmod::parse_outmodandoutmod::format_outmod, including the&(parallel) and=(fixed) flags. INDAT Format 2, subsets and catalog-star records returnError::Indat. - Add
automodel::automodel, which the shell runs asFAUTO [<max harmonic> [<significance>]] [CROSS]. It starts from a basic model sized to the observation count. It then adds significantTF,TX10,DAFand harmonic sine/cosine pairs, removes weak terms, and masks outliers by leave-one-out residual. Aprogress::Progressimplementation receives each log line and can cancel the search.vetting(MVET) ranks the floating terms and removes weak ones.quality::leave_one_out_residualsandquality::jackknife_psd(LOO) report the leave-one-out residuals and the jackknife PSD. - Add
pointer::Pointerfor applying a fitted model at a site.Pointer::mount_forreturns the mount reading for an ICRS target, andPointer::sky_forreturns the ICRS direction for a mount reading. Both use EOP data when it is supplied.Observation::from_icrsbuilds an observation from an ICRS star and the raw encoder reading. - Add
pointing_run::PointingRun, which refits the model after each star is added. The basic terms grow fromIH IDtoIH ID NP CH ME MAas stars arrive. Addpolar_alignment::PolarAlignment::from_fit, which converts the fittedMEandMAinto polar axis adjustments with sigmas. - In a terminal, the
pointingbinary opens a full-screen UI with residual graphs, model and observation tabs, point masking, and a cancellableFAUTO.--plaingives a line editor, and a script path or stdin runs a script. The shell addsAPPEND,FLIST,LOO,G,INPRO/CALLprocedures andGC(SVG output). It dropsADJUST,APPLY,CHAIN,CLIST,CORRECT,GDEC,GHA,GHYST,GMAP,LST,OPTIMAL,OUTL,PARALLEL,PREDICT,RESETandSHOW. - Add a
serdefeature. Drop the dependencies onnalgebra,regex,rayon,bitflags,dirs,plottersandtextplots. Withoutcli, the library depends only on the celestial crates,libmandthiserror.
celestial-images
- Breaking: The crate root and the module files no longer re-export anything. Import each type from the module that defines it, for example
celestial_images::formats::image::Image,celestial_images::fits::io::reader::FitsFileorcelestial_images::xisf::reader::XisfFile.formats::unifiedis split intoformats::{image, astro_image, pixel_data, format, kind}. - Breaking: Removed
ImageWriter,TelescopeParams,formats::ImageInfo,FitsWriter,KeywordBuilder,FrameType,FitsImage,WcsInfo,HeaderParser,HeaderCardandHeader::get_keyword_value. Also removed: thericecompandfits::utilmodules,compress_tile,decompress_tile, the typedread_column_*table readers,XisfFile::header,XisfFile::read_image_data,XisfFile::fits_keywords,XisfWriter::set_fits_keywordandwcs_to_xisf_properties. Write files withImage::save,Image::save_fits_compressedorAstroImage. Set capture metadata with theirexposure,gain,filter,objectanddate_obssetters. Read values withHeader::get, table columns withget_column_values, and XISF pixels withread_image_data_typed. Thesimdfeature is removed. - Breaking:
PixelDatagainsI8,U32,I64andU64.TableValuegainsI8,U16,U32,U64,BitsandArray.XisfPropertyValuegainsBoolean,OtherandOtherArray, andCompressionAlgorithmgainsGzip2.ImageError,FitsError,XisfErrorandSerErrorhave new and removed variants. Update exhaustivematchexpressions. - Breaking:
Imagehas a new public field,xisf_properties.Keywordhas a new private field, so build keywords withKeyword::newor a typed constructor such asKeyword::realinstead of a struct literal. - Breaking:
Image::debayer,debayer_bilinear_u8anddebayer_bilinear_u16returnResult.Image::debayeraccepts every sample type, mirrors the edges and removesBAYERPAT,XBAYROFFandYBAYROFF. A non-mono image, or one smaller than 2x2, returnsInvalidDimensions. 0.1 left those images unchanged without an error. - Breaking:
Image::normalizeconverts integer pixels toF64. 0.1 kept the integer type, which rounded every value to 0 or 1. - Breaking:
AstroImagewrites uncompressed FITS by default. 0.1 wrote Rice-compressed tiles.compressed()takes aCompressionAlgorithminstead of abool.AstroImage::keywordreplaces an earlier card with the same name. 0.1 added a second card. - Breaking: Saving signed integer pixels to XISF returns an error. 0.1 wrapped negative values to large unsigned ones. Convert first with
PixelData::signed_to_offset_unsignedorPixelData::signed_to_float. XISF files that 0.1 wrote with LZ4 compression no longer open. 0.1 prefixed each LZ4 block with its length, and the XISF spec does not define that prefix. - Breaking: In SER,
SerHeader.byte_order: ByteOrderreplacesSerHeader.little_endian.SerHeader.file_idandSerReader::from_readerare removed.SerTimestampfields are private: useticks(),to_unix()orto_utc().SerHeader::frame_sizeandSerReader::iter_frames_rangereturnResult. A byte-order flag of 0 now reads as little-endian, which is how capture programs write it. 0.1 wrote 1 for little-endian, so 16-bit SER files from 0.1 now decode as big-endian.SerReader::read_frame_u16andSerReader::has_timestampsare new. - Add the
stretchmodule. ItsStretchtrait onImageprovides three methods:stf(an automatic midtones stretch set byStfParams),mad_normalizedandto_u8. Each returns a newImagewith the source’s keywords and XISF properties. - Fix FITS reading:
Image::openreads the first HDU that holds an image. This includesRICE_1,GZIP_1andGZIP_2tile-compressed images and quantized float images. 0.1 read only the primary HDU.Image::openappliesBSCALEandBZERO. The standard unsigned offsets load asU16,U32orU64. Other scaling loads asF64, andBLANKpixels in scaled data load as NaN. 0.1 applied no scaling and readBITPIX = 64as 32-bit.FitsFile::get_image_infoandFitsFile::read_hdu_with_datadecode compressed HDUs.- The header parser reads
CONTINUElong strings, doubled quotes andHIERARCHnames.FitsFile::get_header_valuereturns strings without the FITS quotes. Header::get_lastandImage::get_lastreturn the last card of a repeated keyword. Scaling and WCS cards use the last card.- A truncated file keeps the HDUs before the damage, and
FitsFile::scan_errorreports the problem.
- Fix FITS writing:
Image::savewritesI8,U16,U32andU64pixels with the standardBZERO. 0.1 castU16toi16without an offset, so values above 32767 read back negative.- Real values round-trip exactly, quotes in strings are escaped, long strings use
CONTINUE, and long keyword names useHIERARCH. Image::saveand compressed writes emit correctDATASUMandCHECKSUMcards.- Every
ImageandAstroImagesave writes a temporary file and then renames it, so a failed save leaves the target file unchanged. - Add
Image::save_fits_compressed.AstroImage::write_fitsacceptsi8,u16,u32andu64samples.
- Fix XISF reading and writing:
- Reading verifies SHA-1, SHA-256 and SHA-512 block checksums. It decodes byte-shuffled codecs such as
lz4+sh, and inline and embedded data blocks. UInt32images load asU32. 0.1 loaded them as wrappedI32.Image.xisf_propertiesandXisfFile::propertiesreturn an image’s properties. Property types the crate does not decode are written back unchanged.- A FITS WCS is saved as XISF astrometric solution properties, and those properties load back as FITS WCS keywords.
- Written files include the
Metadataelement that the spec requires. - Add
XisfFile::image_keywordsandXisfWriter::sha1_checksums.
- Reading verifies SHA-1, SHA-256 and SHA-512 block checksums. It decodes byte-shuffled codecs such as
- Fix FITS tables: column scaling,
TNULLnulls and variable-length arrays now read correctly. Read random-groups HDUs withRandomGroupsHdu::read_groups.Image::open_pngreads palette images and 1-, 2- and 4-bit images, drops the alpha channel, and limits memory use to a bound set by the file length.
celestial-ephemeris
- Breaking:
ElpMpp02Moon::geocentric_positionandgeocentric_statereturnVector3and(Vector3, Vector3)in ICRS, in AU and AU/day. They used to return[f64; 3]and[f64; 6]in km and km/day in the mean ecliptic of J2000.geocentric_position_icrsandgeocentric_state_icrsare removed. Multiply bycelestial_core::constants::AU_KMfor kilometres. - Breaking: The geocentric methods on the planets and
Vsop2013Suntake the Earth’s heliocentric place as a parameter:geocentric_position(&tdb, &earth_position)andgeocentric_state(&tdb, &earth_state). ComputeVsop2013Earth::new().heliocentric_state(&tdb)?once per epoch and pass it to each call. - Breaking: The crate root no longer re-exports
Vsop2013EarthandVsop2013Sun, andjplno longer re-exportsSpkFileandSpkSegment. Import fromearth,sunandjpl::spk. - Breaking:
SpkFile::compute_positionandcompute_statetake&TDBin place of a Julian datef64and returnVector3and(Vector3, Vector3)in km and km/s.SpkSegmentfields are private. Read them withbody(),center(),frame(),data_type(),start()andend(), where the last two returnTDB.SpkSegment::from_summary,contains_epoch,start_jd,end_jdandSpkFile::find_segmentare removed. - Breaking:
SpkErroris#[non_exhaustive]and no longer implementsCloneorPartialEq.Iowrapsstd::io::Error. TheSegmentNotFoundfieldepochis renamedjd. The new variants areInvalidEpoch,UnsupportedTypeandUnsupportedFrame.SpkErrorconverts intoAstroError. - SPK lookups chain through the solar system barycenter, so pairs a kernel doesn’t store directly, such as
MOONrelative toEARTH, return a result.SpkFile::openreads the whole kernel into memory and validates every segment. Only type 2 segments in the J2000 frame can be evaluated, and other segments return an error. Addbodies::MERCURYandbodies::VENUS. - Every theory returns an error for an epoch outside its published range, and for NaN or infinite epochs. VSOP2013 covers -4000 to +8000, its Pluto covers 0 to +4000, and ELP/MPP02 and
Vsop2013Earthcover -3000 to +3000. - Planet, Earth and Sun velocities come from the analytic series rates. They used to come from central differences over ±1 s.
- Regenerate the built-in series with more terms. VSOP2013 keeps 83,780 terms, up from 24,685, and ELP/MPP02 keeps 10,754 terms. Against DE432s over 1950 to 2050, geocentric directions are within 7 to 30 mas for Mercury through Saturn, 2.3 mas for the Sun and 38 mas for the Moon. Neptune is within 0.2“, Uranus 0.8“ and Pluto 3“.
ElpMpp02Moon::with_de405_fit()rotates to ICRS with the DE405 fit’s own frame constants. It used to use the lunar laser ranging fit’s obliquity.- Drop the
celestial-coords,memmap2andchronodependencies, and addthiserrorandwide. Theserdefeature only enablesserdein celestial-core and celestial-time. - In
vsop2013-genandelpmpp02-gen(featurecli),--thresholddefaults to each shipped table’s cut.vsop2013-genused to require it.elpmpp02-genused to default to 1e-5 while the shipped table used 1e-3. Generated tables record the command that produced them.
celestial-solver
- First release.
celestial-solverplate-solves an astronomical image. It takes acelestial_imagesImageand acelestial_catalogCatalog, and returns the image’s WCS. The WCS is a TAN projection, with SIP distortion when the fit selects it. A solve needs a position hint and a plate scale, because the solver does not search the whole sky. celestial_solver::solve::solve(&image, &catalog).run()returns aSolveResultor aSolveError. The solver reads three things from the FITS or XISF header:- the position hint, from the header WCS,
CRVAL1/2,RA/DECorOBJCTRA/OBJCTDEC - the epoch, from
MJD-OBSorDATE-OBS - the plate scale, from
FOCALLENandXPIXSZ
- the position hint, from the header WCS,
- Override header values with the builder setters
hint,epoch,focal_length_mm,pixel_size_umandplate_scale_arcsec. For PNG, TIFF or other images without a header,with_metadatasupplies all of these values. SolveResultholds the linear WCS (wcs), the SIP model (sip), the combinedfits_wcs, the matchedpairs, the detectedstarsandlog_odds.pixel_to_skyandsky_to_pixelapply the SIP distortion.- To store the solution,
to_fits_keywordsreturns the solution as FITS keywords.write_intoadds them to anImage, andsave_withwrites a new FITS or XISF file.to_xisf_propertiesbuilds XISF spline properties. - The solver rejects any match whose log-odds score (Lang et al. 2010) is below ln(10^9). The same inputs give the same solution on every run and with any thread count.
- The solver accepts every pixel type that
Imagereads, fromu8tof64, and treats NaN pixels as blank. Catalog stars are moved by proper motion to the image epoch.SolveParamstunes detection, matching, refinement and the highest SIP order, which defaults to 4. detect::find_bright_starsruns star detection on its own.annotate::Annotationdraws detections and a solve overlay onto an image.- The
image-solverbinary, built with theclifeature, solves one image and prints a report. With--outputit also writes the solved FITS or XISF file.