pub enum BrightnessUnit {
JyPerBeam,
Kelvin,
}Expand description
Brightness unit of an image, determining whether flux scaling applies after convolution to a larger beam.
Variants§
JyPerBeam
Jy/beam (or any per-beam flux density) — apply the Gaussian flux-scaling factor so the output stays in the same units.
Kelvin
Kelvin (brightness temperature) — surface brightness is conserved under convolution, so the scaling factor is 1.
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, returning None if the unit is not
recognised (neither a Kelvin nor a Jy/beam form).
§Examples
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. Anything recognised as a brightness
temperature (Kelvin) skips flux scaling; recognised Jy/beam forms get the
Gaussian factor. Unrecognised units cannot be determined automatically:
a warning is emitted and Jy/beam is assumed.
Trait Implementations§
Source§impl Clone for BrightnessUnit
impl Clone for BrightnessUnit
Source§fn clone(&self) -> BrightnessUnit
fn clone(&self) -> BrightnessUnit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BrightnessUnit
Source§impl Debug for BrightnessUnit
impl Debug for BrightnessUnit
Source§impl Default for BrightnessUnit
impl Default for BrightnessUnit
Source§fn default() -> BrightnessUnit
fn default() -> BrightnessUnit
Returns the “default value” for a type. Read more
impl Eq for BrightnessUnit
Source§impl PartialEq for BrightnessUnit
impl PartialEq for BrightnessUnit
Source§fn eq(&self, other: &BrightnessUnit) -> bool
fn eq(&self, other: &BrightnessUnit) -> bool
Tests for
self and other values to be equal, and is used by ==.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