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
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
pub fn new(params: &WCSParams) -> Result<Self, Error>
Sourcepub fn img_dimensions(&self) -> &[i64]
pub fn img_dimensions(&self) -> &[i64]
Returns the dimensions of the image given by the NAXIS1 x NAXIS2 keyword
pub fn field_of_view(&self) -> (f64, f64)
Sourcepub fn proj(&self, lonlat: &LonLat) -> Option<ImgXY>
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
Sourcepub fn unproj(&self, img_pos: &ImgXY) -> Option<LonLat>
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
Sourcepub fn coo_system(&self) -> &CooSystem
pub fn coo_system(&self) -> &CooSystem
Get the coordinate system frame
Methods from Deref<Target = WCSProj>§
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 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> 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