pub enum BrightnessUnit {
JyPerBeam,
Kelvin,
}Expand description
Brightness unit of an image, which decides the flux scaling.
Variants§
JyPerBeam
Jy/beam: scaled by Ω_new/Ω_old so values stay in Jy/beam.
Kelvin
Kelvin: surface brightness is conserved, so no scaling.
Implementations§
Source§impl BrightnessUnit
impl BrightnessUnit
Sourcepub fn parse(bunit: &str) -> Option<Self>
pub fn parse(bunit: &str) -> Option<Self>
Classify a FITS BUNIT string, or None if it is not recognised.
use convolve_rs::BrightnessUnit;
assert_eq!(BrightnessUnit::parse("Jy/beam"), Some(BrightnessUnit::JyPerBeam));
assert_eq!(BrightnessUnit::parse(" K "), Some(BrightnessUnit::Kelvin));
assert_eq!(BrightnessUnit::parse("Jy/pixel"), None);Sourcepub fn from_bunit(bunit: &str) -> Self
pub fn from_bunit(bunit: &str) -> Self
Classify a FITS BUNIT string, warning and assuming Jy/beam if it is
not recognised.
Trait Implementations§
Source§impl Clone for BrightnessUnit
impl Clone for BrightnessUnit
impl Copy for BrightnessUnit
Source§impl Debug for BrightnessUnit
impl Debug for BrightnessUnit
Source§impl Default for BrightnessUnit
impl Default for BrightnessUnit
impl Eq for BrightnessUnit
Source§impl PartialEq for BrightnessUnit
impl PartialEq for BrightnessUnit
impl StructuralPartialEq for BrightnessUnit
Auto Trait Implementations§
impl Freeze for BrightnessUnit
impl RefUnwindSafe for BrightnessUnit
impl Send for BrightnessUnit
impl Sync for BrightnessUnit
impl Unpin for BrightnessUnit
impl UnsafeUnpin for BrightnessUnit
impl UnwindSafe for BrightnessUnit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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