pub enum WCS {
Show 42 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>),
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>),
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>)
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>)
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 WCS
impl WCS
sourcepub fn new(header: &Header) -> Result<Self, Error>
pub fn new(header: &Header) -> 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.
sourcepub fn proj_lonlat(&self, lonlat: &LonLat) -> Option<ImgXY>
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
sourcepub fn unproj_lonlat(&self, img_pos: &ImgXY) -> Option<LonLat>
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