pub enum Projection {
Linear,
Gnomonic,
Orthographic,
Stereographic,
ZenithalEquidistant,
ZenithalEqualArea,
PlateCarree,
Mercator,
CylindricalEqualArea,
HammerAitoff,
Mollweide,
}Expand description
How a flat image plane is carried onto the celestial sphere.
The projection is named by the last three characters of CTYPEn, after the
coordinate type and a hyphen — RA---TAN is right ascension under the
gnomonic projection.
Each projection converts between the intermediate world coordinates the
header’s matrix produces and the native spherical coordinates of the
projection’s own frame; Wcs then rotates those onto the sky. A point the
projection cannot represent — the far hemisphere under TAN, say — comes back
as NaN rather than as a plausible coordinate in the wrong place.
Variants§
Linear
No projection code: the intermediate coordinates are the world
coordinates, offset from the reference value. This is what a plain
LINEAR, PIXEL or wavelength axis uses.
Gnomonic
TAN, the gnomonic projection. Straight lines on the sky stay straight
on the plane, which is what an ordinary telescope with a flat detector
produces, and by far the most common projection in astronomy images.
Orthographic
SIN, the orthographic projection: the sphere as seen from infinitely
far away. Radio interferometers image in it.
Stereographic
STG, the stereographic projection, which preserves angles.
ZenithalEquidistant
ARC, the zenithal equidistant projection, where radius from the
reference point is the angle from it. Schmidt plates and many all-sky
cameras use it.
ZenithalEqualArea
ZEA, the zenithal equal-area projection, which preserves area.
PlateCarree
CAR, the plate carrée: longitude and latitude used directly as
rectangular coordinates.
Mercator
MER, the Mercator projection.
CylindricalEqualArea
CEA, the cylindrical equal-area projection, whose standard parallel is
set by PV2_1.
HammerAitoff
AIT, the Hammer-Aitoff projection, an equal-area whole-sky projection.
All-sky maps are usually drawn in it.
Mollweide
MOL, the Mollweide projection, another equal-area whole-sky one.
Implementations§
Source§impl Projection
impl Projection
Sourcepub fn from_ctype(ctype: &str) -> Result<Self, Box<dyn Error + Send + Sync>>
pub fn from_ctype(ctype: &str) -> Result<Self, Box<dyn Error + Send + Sync>>
Reads the projection out of a CTYPEn card.
§Errors
Returns an error for a projection this crate does not implement, rather than silently falling back to a linear mapping — a wrong projection yields plausible coordinates that are quietly in the wrong place.
Trait Implementations§
Source§impl Clone for Projection
impl Clone for Projection
Source§fn clone(&self) -> Projection
fn clone(&self) -> Projection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Projection
Source§impl Debug for Projection
impl Debug for Projection
impl Eq for Projection
Source§impl PartialEq for Projection
impl PartialEq for Projection
impl StructuralPartialEq for Projection
Auto Trait Implementations§
impl Freeze for Projection
impl RefUnwindSafe for Projection
impl Send for Projection
impl Sync for Projection
impl Unpin for Projection
impl UnsafeUnpin for Projection
impl UnwindSafe for Projection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more