#[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),
}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).
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()