#[non_exhaustive]pub enum ArcsecError {
Singular,
InsufficientStars {
found: usize,
required: usize,
},
InsufficientQuads {
found: usize,
required: usize,
},
BadSolution {
ratio: f64,
},
CatalogNotFound(PathBuf),
CatalogIo(Error),
InvalidParameter(String),
Cancelled,
IndexNotFound(PathBuf),
OutsideSearchRadius {
separation_deg: f64,
},
}Expand description
Everything that can stop a solve.
The variants map onto the ASTAP-compatible exit codes the arcsec CLI returns
(2 for too few stars, 1 for no solution, 32/33 for database problems), which is
why “no match” is reported through ArcsecError::InsufficientQuads rather than
a dedicated variant. New variants may be added, so match with a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Singular
The least-squares system was singular (degenerate or too few points).
InsufficientStars
Fewer stars were detected than the solver needs.
InsufficientQuads
Pattern matching did not produce a verified solution.
Returned both when too few patterns could be built and when the search finished without any position verifying.
Fields
BadSolution
The plate fit is not a similarity transform: it stretches or shears the
image by more than crate::math::lsq::MAX_PLATE_ANISOTROPY.
Fields
ratio: f64Ratio of the larger to the smaller singular value of the plate’s linear
part (crate::math::lsq::plate_anisotropy); 1 for a similarity.
CatalogNotFound(PathBuf)
The star database directory does not contain the named database.
CatalogIo(Error)
A catalogue or index file could not be read or parsed.
InvalidParameter(String)
A caller-supplied parameter is out of range (e.g. a non-positive field of view).
Cancelled
The solve was stopped through a crate::cancel::CancelToken.
IndexNotFound(PathBuf)
No blind index file was found at the given path.
OutsideSearchRadius
A blind index placed the field outside the search radius, where the radius-limited search cannot reach it. The field is not reported, as the radius requires; this is a “no solution” with a reason.
Trait Implementations§
Source§impl Debug for ArcsecError
impl Debug for ArcsecError
Source§impl Display for ArcsecError
impl Display for ArcsecError
Source§impl Error for ArcsecError
impl Error for ArcsecError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()