Enum wcs::WCSProj

source ·
pub enum WCSProj {
Show 44 variants Azp(Img2Celestial<Azp, WcsImgXY2ProjXY>), Szp(Img2Celestial<Szp, WcsImgXY2ProjXY>), Tan(Img2Celestial<Tan, WcsImgXY2ProjXY>), Stg(Img2Celestial<Stg, WcsImgXY2ProjXY>), Sin(Img2Celestial<Sin, WcsImgXY2ProjXY>), Arc(Img2Celestial<Arc, WcsImgXY2ProjXY>), Zpn(Img2Celestial<Zpn, WcsImgXY2ProjXY>), Zea(Img2Celestial<Zea, WcsImgXY2ProjXY>), Air(Img2Celestial<Air, WcsImgXY2ProjXY>), Ncp(Img2Celestial<Ncp, WcsImgXY2ProjXY>), Cyp(Img2Celestial<Cyp, WcsImgXY2ProjXY>), Cea(Img2Celestial<Cea, WcsImgXY2ProjXY>), Car(Img2Celestial<Car, WcsImgXY2ProjXY>), Mer(Img2Celestial<Mer, WcsImgXY2ProjXY>), Sfl(Img2Celestial<Sfl, WcsImgXY2ProjXY>), Par(Img2Celestial<Par, WcsImgXY2ProjXY>), Mol(Img2Celestial<Mol, WcsImgXY2ProjXY>), Ait(Img2Celestial<Ait, WcsImgXY2ProjXY>), Cop(Img2Celestial<Cop, WcsImgXY2ProjXY>), Cod(Img2Celestial<Cod, WcsImgXY2ProjXY>), Coe(Img2Celestial<Coe, WcsImgXY2ProjXY>), Coo(Img2Celestial<Coo, WcsImgXY2ProjXY>), AzpSip(Img2Celestial<Azp, WcsWithSipImgXY2ProjXY>), SzpSip(Img2Celestial<Szp, WcsWithSipImgXY2ProjXY>), TanSip(Img2Celestial<Tan, WcsWithSipImgXY2ProjXY>), StgSip(Img2Celestial<Stg, WcsWithSipImgXY2ProjXY>), SinSip(Img2Celestial<Sin, WcsWithSipImgXY2ProjXY>), ArcSip(Img2Celestial<Arc, WcsWithSipImgXY2ProjXY>), ZpnSip(Img2Celestial<Zpn, WcsWithSipImgXY2ProjXY>), ZeaSip(Img2Celestial<Zea, WcsWithSipImgXY2ProjXY>), AirSip(Img2Celestial<Air, WcsWithSipImgXY2ProjXY>), NcpSip(Img2Celestial<Ncp, WcsWithSipImgXY2ProjXY>), CypSip(Img2Celestial<Cyp, WcsWithSipImgXY2ProjXY>), CeaSip(Img2Celestial<Cea, WcsWithSipImgXY2ProjXY>), CarSip(Img2Celestial<Car, WcsWithSipImgXY2ProjXY>), MerSip(Img2Celestial<Mer, WcsWithSipImgXY2ProjXY>), SflSip(Img2Celestial<Sfl, WcsWithSipImgXY2ProjXY>), ParSip(Img2Celestial<Par, WcsWithSipImgXY2ProjXY>), MolSip(Img2Celestial<Mol, WcsWithSipImgXY2ProjXY>), AitSip(Img2Celestial<Ait, WcsWithSipImgXY2ProjXY>), CopSip(Img2Celestial<Cop, WcsWithSipImgXY2ProjXY>), CodSip(Img2Celestial<Cod, WcsWithSipImgXY2ProjXY>), CoeSip(Img2Celestial<Coe, WcsWithSipImgXY2ProjXY>), CooSip(Img2Celestial<Coo, WcsWithSipImgXY2ProjXY>),
}
Expand description

Main enum 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

Variants§

§

Azp(Img2Celestial<Azp, WcsImgXY2ProjXY>)

§

Szp(Img2Celestial<Szp, WcsImgXY2ProjXY>)

§

Tan(Img2Celestial<Tan, WcsImgXY2ProjXY>)

§

Stg(Img2Celestial<Stg, WcsImgXY2ProjXY>)

§

Sin(Img2Celestial<Sin, WcsImgXY2ProjXY>)

§

Arc(Img2Celestial<Arc, WcsImgXY2ProjXY>)

§

Zpn(Img2Celestial<Zpn, WcsImgXY2ProjXY>)

§

Zea(Img2Celestial<Zea, WcsImgXY2ProjXY>)

§

Air(Img2Celestial<Air, WcsImgXY2ProjXY>)

§

Ncp(Img2Celestial<Ncp, WcsImgXY2ProjXY>)

§

Cyp(Img2Celestial<Cyp, WcsImgXY2ProjXY>)

§

Cea(Img2Celestial<Cea, WcsImgXY2ProjXY>)

§

Car(Img2Celestial<Car, WcsImgXY2ProjXY>)

§

Mer(Img2Celestial<Mer, WcsImgXY2ProjXY>)

§

Sfl(Img2Celestial<Sfl, WcsImgXY2ProjXY>)

§

Par(Img2Celestial<Par, WcsImgXY2ProjXY>)

§

Mol(Img2Celestial<Mol, WcsImgXY2ProjXY>)

§

Ait(Img2Celestial<Ait, WcsImgXY2ProjXY>)

§

Cop(Img2Celestial<Cop, WcsImgXY2ProjXY>)

§

Cod(Img2Celestial<Cod, WcsImgXY2ProjXY>)

§

Coe(Img2Celestial<Coe, WcsImgXY2ProjXY>)

§

Coo(Img2Celestial<Coo, WcsImgXY2ProjXY>)

§

AzpSip(Img2Celestial<Azp, WcsWithSipImgXY2ProjXY>)

§

SzpSip(Img2Celestial<Szp, WcsWithSipImgXY2ProjXY>)

§

TanSip(Img2Celestial<Tan, WcsWithSipImgXY2ProjXY>)

§

StgSip(Img2Celestial<Stg, WcsWithSipImgXY2ProjXY>)

§

SinSip(Img2Celestial<Sin, WcsWithSipImgXY2ProjXY>)

§

ArcSip(Img2Celestial<Arc, WcsWithSipImgXY2ProjXY>)

§

ZpnSip(Img2Celestial<Zpn, WcsWithSipImgXY2ProjXY>)

§

ZeaSip(Img2Celestial<Zea, WcsWithSipImgXY2ProjXY>)

§

AirSip(Img2Celestial<Air, WcsWithSipImgXY2ProjXY>)

§

NcpSip(Img2Celestial<Ncp, WcsWithSipImgXY2ProjXY>)

§

CypSip(Img2Celestial<Cyp, WcsWithSipImgXY2ProjXY>)

§

CeaSip(Img2Celestial<Cea, WcsWithSipImgXY2ProjXY>)

§

CarSip(Img2Celestial<Car, WcsWithSipImgXY2ProjXY>)

§

MerSip(Img2Celestial<Mer, WcsWithSipImgXY2ProjXY>)

§

SflSip(Img2Celestial<Sfl, WcsWithSipImgXY2ProjXY>)

§

ParSip(Img2Celestial<Par, WcsWithSipImgXY2ProjXY>)

§

MolSip(Img2Celestial<Mol, WcsWithSipImgXY2ProjXY>)

§

AitSip(Img2Celestial<Ait, WcsWithSipImgXY2ProjXY>)

§

CopSip(Img2Celestial<Cop, WcsWithSipImgXY2ProjXY>)

§

CodSip(Img2Celestial<Cod, WcsWithSipImgXY2ProjXY>)

§

CoeSip(Img2Celestial<Coe, WcsWithSipImgXY2ProjXY>)

§

CooSip(Img2Celestial<Coo, WcsWithSipImgXY2ProjXY>)

Implementations§

source§

impl WCSProj

source

pub fn new(header: &Header<Image>) -> Result<Self, Error>

Create a WCS from a specific fits header parsed with fitsrs

Param
  • header: Header unit coming from fitsrs. This contains all the cards of one HDU.
source

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

Project a (lon, lat) 3D sphere position to get its corresponding location on the image The result is given a (X, Y) tuple expressed in pixel coordinates.

Param
  • lonlat: the 3D sphere vertex expressed as a (lon, lat) tuple given in degrees
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 given a (lon, lat) tuple expressed in degrees.

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

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.