Skip to main content

Plan

Struct Plan 

Source
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: bool

Whether the request had a hint.

§arcsec_per_px: f64

Pixel scale of the unbinned image, arcseconds per pixel.

§scale_known: bool

Whether the scale came from the request rather than the 1″/px fallback.

§fov_height: f64

Field of view along the image height, radians.

§binning: usize

Binning factor the image is solved at.

§image_size: (usize, usize)

Unbinned image size, pixels.

§hfd_min_arcsec: f64

Minimum star size, arcseconds (as requested).

§params: SolveParams

The 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

Source

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.

Source

pub fn binned_size(&self) -> (usize, usize)

Size of the image as solved, after binning.

Source

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:

Source

pub fn solve_with( &self, img: &ImageBuffer, on_event: impl FnMut(Event), ) -> Result<Solved>

Plan::solve, reporting Events to on_event as they happen.

§Errors

As Plan::solve.

Trait Implementations§

Source§

impl Clone for Plan

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Plan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Plan

§

impl !UnwindSafe for Plan

§

impl Freeze for Plan

§

impl Send for Plan

§

impl Sync for Plan

§

impl Unpin for Plan

§

impl UnsafeUnpin for Plan

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.