pub struct WCSProj { /* private fields */ }
Implementations§
Source§impl WCSProj
impl WCSProj
Sourcepub fn new(naxis1: i64, naxis2: i64, params: &WCSParams) -> Result<Self, Error>
pub fn new(naxis1: i64, naxis2: i64, params: &WCSParams) -> Result<Self, Error>
Create a WCS from a specific fits header parsed with fitsrs
§Param
naxis1
- Size of the image in its first dimension (in pixels)naxis2
- Size of the image in its second dimension (in pixels)params
- 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) 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
pub fn proj_xyz(&self, xyz: &(f64, f64, f64)) -> Option<ImgXY>
pub fn unproj_xyz(&self, img_pos: &ImgXY) -> Option<XYZ>
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 (lon, lat) tuple expressed in degrees in ICRS
§Arguments
img_pos
: the image space point expressed as a (X, Y) tuple given en pixels
Sourcepub fn coo_system(&self) -> &CooSystem
pub fn coo_system(&self) -> &CooSystem
Getter of the coordinate system
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WCSProj
impl RefUnwindSafe for WCSProj
impl Send for WCSProj
impl Sync for WCSProj
impl Unpin for WCSProj
impl UnwindSafe for WCSProj
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more