pub struct WCS { /* private fields */ }Implementations§
source§impl WCS
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
sourcepub fn new(header: &Header<Image>) -> Result<Self, Error>
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.
sourcepub fn img_dimensions(&self) -> (u64, u64)
pub fn img_dimensions(&self) -> (u64, u64)
Returns the dimensions of the image given by the NAXIS1 x NAXIS2 keyword
pub fn field_of_view(&self) -> (f64, f64)
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) 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