pub struct Optics {
pub focal_mm: f64,
pub pixel_um: (f64, f64),
pub binning: (u32, u32),
pub pixels: (u32, u32),
}Expand description
Full optical train: focal length, per-axis pixel size, per-axis binning, and sensor pixel counts.
Pass to Field::from_optics to derive a Field.
§Example
use target_match::{Field, Optics};
let field = Field::from_optics(Optics {
focal_mm: 800.0,
pixel_um: (3.76, 3.76),
binning: (1, 1),
pixels: (6248, 4176),
})
.unwrap();
assert!((field.width().degrees() - 1.683).abs() < 1e-2);Fields§
§focal_mm: f64Focal length, millimetres.
pixel_um: (f64, f64)Pixel size in micrometres, (x, y).
binning: (u32, u32)Binning factor, (x, y) (1 = unbinned).
pixels: (u32, u32)Sensor pixel counts, (naxis1, naxis2).
Trait Implementations§
impl Copy for Optics
Source§impl<'de> Deserialize<'de> for Optics
impl<'de> Deserialize<'de> for Optics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Optics
Auto Trait Implementations§
impl Freeze for Optics
impl RefUnwindSafe for Optics
impl Send for Optics
impl Sync for Optics
impl Unpin for Optics
impl UnsafeUnpin for Optics
impl UnwindSafe for Optics
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