Skip to main content

SamplingCheck

Struct SamplingCheck 

Source
pub struct SamplingCheck {
    pub bandwidth_hz: f64,
    pub rate_hz: f64,
    pub min_rate_hz: f64,
    pub window_s: f64,
    pub walkoff_s: f64,
}
Expand description

The sampling conditions of a split-step simulation of a signal of bandwidth $B$ over a dispersive link (Musetti et al. 2018, Appendix B): the sampling rate must hold the four-wave mixing that falls on the signal, at least $\frac{3}{2} B$ (all of the first-order mixing needs $3 B$), and the block must be longer than the walk-off across $B$ over the whole link, $|\beta_{2}| , 2\pi B , L$, or the circular convolution wraps the fast channels onto the slow ones. sampling_check computes them; SamplingCheck::is_sufficient says whether both hold.

Fields§

§bandwidth_hz: f64

The bandwidth of the launched signal (Hz, signal_bandwidth).

§rate_hz: f64

The sampling rate (Hz).

§min_rate_hz: f64

The smallest rate that holds the four-wave mixing on the signal, $\frac{3}{2} B$ (Hz).

§window_s: f64

The duration of the block (s).

§walkoff_s: f64

The walk-off across the bandwidth over the link (s).

Implementations§

Source§

impl SamplingCheck

Source

pub fn is_sufficient(&self) -> bool

Whether the rate and the block are sufficient.

Source

pub fn ensure(&self) -> Result<()>

Nothing when SamplingCheck::is_sufficient.

§Errors

Error::Config naming what is missing otherwise.

Trait Implementations§

Source§

impl Clone for SamplingCheck

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SamplingCheck

Source§

impl Debug for SamplingCheck

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SamplingCheck

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SamplingCheck

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.