pub struct Plan {
pub start: (f64, f64),
pub has_hint: bool,
pub arcsec_per_px: f64,
pub scale_known: bool,
pub fov_height: f64,
pub binning: usize,
pub image_size: (usize, usize),
pub hfd_min_arcsec: f64,
pub params: SolveParams,
/* private fields */
}Expand description
A SolveRequest with every decision made, for an image of a given size.
Built by Plan::new without touching the pixels, so a caller can report what
will happen (the CLI prints it, as ASTAP does) before Plan::solve runs.
Fields§
§start: (f64, f64)Start of the search (RA, Dec), radians: the hint, or (0, 0).
has_hint: boolWhether the request had a hint.
arcsec_per_px: f64Pixel scale of the unbinned image, arcseconds per pixel.
scale_known: boolWhether the scale came from the request rather than the 1″/px fallback.
fov_height: f64Field of view along the image height, radians.
binning: usizeBinning factor the image is solved at.
image_size: (usize, usize)Unbinned image size, pixels.
hfd_min_arcsec: f64Minimum star size, arcseconds (as requested).
params: SolveParamsThe catalogue solve’s parameters: the start, the field along the longer side, the database, and the minimum HFD in binned pixels.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn new(req: &SolveRequest, width: usize, height: usize) -> Result<Self>
pub fn new(req: &SolveRequest, width: usize, height: usize) -> Result<Self>
Make every decision for a width × height image (unbinned).
§Errors
ArcsecError::InvalidParameter for an empty image or a field of view or
pixel scale that is not positive and finite.
Sourcepub fn binned_size(&self) -> (usize, usize)
pub fn binned_size(&self) -> (usize, usize)
Size of the image as solved, after binning.
Sourcepub fn solve(&self, img: &ImageBuffer) -> Result<Solved>
pub fn solve(&self, img: &ImageBuffer) -> Result<Solved>
Solve img, the unbinned image this plan was made for, with its pixels
already normalised (ImageBuffer::normalize_for_detection).
§Errors
Everything solve_image returns, and:
ArcsecError::InvalidParameterifimgis not the size planned for;ArcsecError::InsufficientStarsif the binned image is too small;ArcsecError::IndexNotFoundifSolveRequest::indexnames nothing;ArcsecError::OutsideSearchRadiusif an index found the field beyond the search radius;ArcsecError::Cancelledif the request’s token fired.