WCS

Struct WCS 

Source
pub struct WCS { /* private fields */ }

Implementations§

Source§

impl WCS

Main object structure descripting a WCS object Once created, the user can proceed two operation on it

  • The projection of a (lon, lat) tuple onto the image space. Results are given in pixels
  • The unprojection of a (x, y) tuple given in pixel coordinates onto the sphere. Results are given as a (lon, lat) tuple expressed in degrees
Source

pub fn new(params: &WCSParams) -> Result<Self, Error>

Source

pub fn img_dimensions(&self) -> &[i64]

Returns the dimensions of the image given by the NAXIS1 x NAXIS2 keyword

Source

pub fn field_of_view(&self) -> (f64, f64)

Source

pub fn proj(&self, lonlat: &LonLat) -> Option<ImgXY>

Project a (lon, lat) in ICRS

The result is given a (X, Y) tuple expressed in pixel coordinates.

§Arguments
  • lonlat: the 3D sphere vertex expressed as a (lon, lat) tuple given in degrees
Source

pub fn unproj(&self, img_pos: &ImgXY) -> Option<LonLat>

Unproject a (X, Y) point to get a position on the sky in ICRS system

§Arguments
  • img_pos: the image space point expressed as a (X, Y) tuple given en pixels
Source

pub fn coo_system(&self) -> &CooSystem

Get the coordinate system frame

Methods from Deref<Target = WCSProj>§

Source

pub fn proj_lonlat(&self, lonlat: &LonLat) -> Option<ImgXY>

Project a (lon, lat) given in ICRS frame to get its corresponding location on the image

The result is given a (X, Y) tuple expressed in pixel coordinates.

§Arguments
  • lonlat: a coo expressed as (lon, lat) tuple given in degrees and in ICRS system
Source

pub fn proj_xyz(&self, xyz: &(f64, f64, f64)) -> Option<ImgXY>

Source

pub fn unproj_xyz(&self, img_pos: &ImgXY) -> Option<XYZ>

Source

pub fn unproj_lonlat(&self, img_pos: &ImgXY) -> Option<LonLat>

Unproject a (X, Y) point from the image space to get its corresponding location on the sphere

The result is (lon, lat) tuple expressed in degrees in ICRS

§Arguments
  • img_pos: the image space point expressed as a (X, Y) tuple given en pixels
Source

pub fn coo_system(&self) -> &CooSystem

Getter of the coordinate system

Trait Implementations§

Source§

impl Debug for WCS

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Deref for WCS

Source§

type Target = WCSProj

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl Freeze for WCS

§

impl RefUnwindSafe for WCS

§

impl Send for WCS

§

impl Sync for WCS

§

impl Unpin for WCS

§

impl UnwindSafe for WCS

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> 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.