[][src]Struct ucsf_nmr::AxisHeader

pub struct AxisHeader {
    pub nucleus_name: String,
    pub data_points: u32,
    pub tile_size: u32,
    pub frequency: f32,
    pub spectral_width: f32,
    pub center: f32,
    pub remainder: Vec<u8>,
}

128 byte axis header

Fields

nucleus_name: String

Nucleus name (1H, 13C, 15N, 31P, ...)

Format

Bytes 0-7

data_points: u32

Number of data points along this axis.

Format

Bytes 8-11 (followed by 4 unknown bytes)

tile_size: u32

Tile size along this axis.

Format

Bytes 16-19

frequency: f32

Spectrometer frequency for this nucleus (MHz)

Format

Bytes 20-23

spectral_width: f32

Spectral width (Hz)

Format

Bytes 24-27

center: f32

Center of data (ppm)

Format

Bytes 28-31

remainder: Vec<u8>

Remaining unspecified bytes

Format

Bytes: 32-127

Methods

impl AxisHeader[src]

pub fn parse(input: &[u8]) -> Result<(&[u8], Self), UcsfError>[src]

pub fn num_tiles(&self) -> u32[src]

Returns the amount of tiles along this axis.

pub fn padded_size(&self) -> u32[src]

Returns the size of the axis including zero-padding.

Useful for determining the expected size of the file.

pub fn tile_is_padded(&self, tile_n: usize) -> bool[src]

Check whether the tile with index tile_n has padding along this axis.

pub fn tile_padding(&self, tile_n: usize) -> u32[src]

Returns the amount of padding for tile with index tile_n along this axis.

Trait Implementations

impl Clone for AxisHeader[src]

impl Debug for AxisHeader[src]

impl PartialEq<AxisHeader> for AxisHeader[src]

impl StructuralPartialEq for AxisHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.