Skip to main content

ProbeResult

Struct ProbeResult 

Source
pub struct ProbeResult { /* private fields */ }
Expand description

The recorded time series of one csx ProbeBox, restricted to its StartTime/StopTime window (a stop time ≤ 0 means “no limit”) and multiplied by its weight.

In a Bloch run (Simulation, Bloch mode) the probe value is complex: values is the real part (the real engine), imag the imaginary part, and the DFTs (dft, dft_vector, spectrum) return the spectrum of the complex series, X(f) = DFT[x_re](f) + j·DFT[x_im](f).

Implementations§

Source§

impl ProbeResult

Source

pub fn name(&self) -> &str

csx property name.

Source

pub fn id(&self) -> u32

csx property id (csx::Property::id, equal to csx::PropertyId::get).

Source

pub fn number(&self) -> u32

The probe number of the property.

Source

pub fn kind(&self) -> ProbeKind

What is measured.

Source

pub fn frequencies(&self) -> &[f64]

The property’s frequencies for frequency-domain output [Hz] (FD_Samples; may be empty).

Source

pub fn dt(&self) -> f64

Sample interval [s].

Source

pub fn times(&self) -> &[f64]

Sample times [s] (uniform, dt apart).

Source

pub fn values(&self) -> &ProbeValues

The recorded values.

Source

pub fn scalar(&self) -> Option<&[f64]>

Voltage / current samples (None for field probes).

Source

pub fn vector(&self) -> Option<&[[f64; 3]]>

Field samples (None for voltage / current probes).

Source

pub fn imag(&self) -> Option<&ProbeValues>

The imaginary part of the recorded values in a Bloch run (None otherwise); same kind and length as values.

Source

pub fn dft(&self, freqs: &[f64]) -> Result<Vec<Complex64>>

DFT X(f) = Σ x(t_n)·e^{−j2πf·t_n}·dt of a voltage / current probe at freqs [Hz], with the samples’ own absolute times (so the half-step offset of currents is exact). The result equals that of a running DFT (RunningDft) over the same samples.

§Errors

Error::Invalid for a field probe (use dft_vector) or a probe without samples.

Source

pub fn dft_vector(&self, freqs: &[f64]) -> Result<Vec<[Complex64; 3]>>

DFT of each component of a field probe at freqs [Hz] (see dft).

§Errors

Error::Invalid for a voltage / current probe or a probe without samples.

Source

pub fn spectrum(&self) -> Result<Vec<Complex64>>

dft at the probe’s own frequencies.

§Errors

See dft.

Trait Implementations§

Source§

impl Clone for ProbeResult

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 Debug for ProbeResult

Source§

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

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

impl PartialEq for ProbeResult

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 ProbeResult

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.