pub enum ArrayType {
Show 26 variants
Unknown,
MZArray,
IntensityArray,
ChargeArray,
SignalToNoiseArray,
TimeArray,
WavelengthArray,
IonMobilityArray,
MeanIonMobilityArray,
MeanDriftTimeArray,
MeanInverseReducedIonMobilityArray,
RawIonMobilityArray,
RawDriftTimeArray,
RawInverseReducedIonMobilityArray,
DeconvolutedIonMobilityArray,
DeconvolutedDriftTimeArray,
DeconvolutedInverseReducedIonMobilityArray,
ScanningQuadrupolePositionLowerBoundMZ,
ScanningQuadrupolePositionUpperBoundMZ,
IndexArray,
BaselineArray,
ResolutionArray,
PressureArray,
TemperatureArray,
FlowRateArray,
NonStandardDataArray {
name: Box<String>,
},
}Expand description
The kinds of data arrays found in mass spectrometry data files governed by the PSI-MS controlled vocabulary.
Variants§
Unknown
No information is given about this array, not even a name
MZArray
The m/z array, the coordinate values of a mass spectrum. The default unit is Unit::MZ.
IntensityArray
The intensity or abundance of a signal at a given point.
The default unit is Unit::DetectorCounts.
ChargeArray
The deconvolved charge state of an ion
SignalToNoiseArray
The estimated signal to noise ratio of a point observation
TimeArray
The time coordinate an observation occured such as for a feature, trace, or chromatgam.
The default unit is Unit::Minute
WavelengthArray
The wavelength coordinate of an observation in a photospectrometry measurement.
The default unit is Unit::Nanometer.
IonMobilityArray
A basic ion mobility array that contains no additional information about the unit or level of processing or aggregation. Note: It has no implicit unit information!
MeanIonMobilityArray
The mean ion mobility measurement of an observation. This is the centroid of an ion mobility measurement, distinct from a profile array view. Note: It has no implicit unit information!
MeanDriftTimeArray
The mean drift time of an observation. This is the centroid of an ion mobility measurement
expressed in terms of drift time. The default unit is Unit::Millisecond.
MeanInverseReducedIonMobilityArray
The mean drift time of an observation. This is the centroid of an ion mobility measurement
expressed in terms of $V*s/cm^2$. The default unit is Unit::VoltSecondPerSquareCentimeter.
RawIonMobilityArray
The raw ion mobility measurement of an observation. This is unprocessed and may be profile or centroid ion mobility measurements.
RawDriftTimeArray
The raw drift time of an observation. This is may be a profile or centroid representation
of an ion mobility measurement expressed in terms of drift time. The default unit is Unit::Millisecond.
RawInverseReducedIonMobilityArray
The raw drift time of an observation. This is may be a profile or centroid representation
of an ion mobility measurement expressed in terms of $V*s/cm^2$. The default unit is Unit::VoltSecondPerSquareCentimeter.
DeconvolutedIonMobilityArray
The mean ion mobility measurement of an observation after deconvolution of cross-cutting properties like charge state, adduct, or some other relevant property. This is the centroid of an ion mobility measurement, distinct from a profile array view. Note: It has no implicit unit information!
DeconvolutedDriftTimeArray
The mean ion mobility drift time measurement of an observation expressed in drift time after deconvolution
of cross-cutting properties like charge state, adduct, or some other relevant property. This is the centroid of
an ion mobility measurement. The default unit is Unit::Millisecond.
DeconvolutedInverseReducedIonMobilityArray
The mean ion mobility drift time measurement of an observation expressed in $V*s/cm^2$ after deconvolution
of cross-cutting properties like charge state, adduct, or some other relevant property. This is the centroid of
an ion mobility measurement. The default unit is Unit::Millisecond.
ScanningQuadrupolePositionLowerBoundMZ
Array of m/z values representing the lower bound m/z of the quadrupole position at each point in the spectrum.
The default unit is Unit::MZ
ScanningQuadrupolePositionUpperBoundMZ
Array of m/z values representing the upper bound m/z of the quadrupole position at each point in the spectrum.
The default unit is Unit::MZ
IndexArray
A data array whose values are index values for another collection or array.
BaselineArray
A data array of signal baseline values (the signal in the absence of analytes).
ResolutionArray
A data array of resolution values, which influence the accuracy of measurements.
PressureArray
A data array of pressure measurements.
TemperatureArray
A data array of temperature measurements.
FlowRateArray
A data array of flow rate measurements.
NonStandardDataArray
A data array that is not covered by any of the existing types, but given a distinct name. This is used for user- or application-defined arrays.
Implementations§
Source§impl ArrayType
impl ArrayType
Sourcepub const fn preferred_dtype(&self) -> BinaryDataArrayType
pub const fn preferred_dtype(&self) -> BinaryDataArrayType
Get the data type that the array is compatible with in the
mzdata type expectations.
By default, the m/z array is encoded using Float64,
the charge state array is encoded using Int32, and
all other arrays are encoded using Float32.
§Examples
use mzdata_bindata::{ArrayType, BinaryDataArrayType};
assert_eq!(ArrayType::MZArray.preferred_dtype(), BinaryDataArrayType::Float64);
assert_eq!(ArrayType::IntensityArray.preferred_dtype(), BinaryDataArrayType::Float32);
assert_eq!(ArrayType::ChargeArray.preferred_dtype(), BinaryDataArrayType::Int32);Sourcepub const fn as_mean_ion_mobility(&self) -> Option<ArrayType>
pub const fn as_mean_ion_mobility(&self) -> Option<ArrayType>
Convert an ion mobility array to its mean variant
§Examples
use mzdata_bindata::ArrayType;
assert_eq!(
ArrayType::RawDriftTimeArray.as_mean_ion_mobility(),
Some(ArrayType::MeanDriftTimeArray)
);
assert_eq!(ArrayType::MZArray.as_mean_ion_mobility(), None);Sourcepub const fn as_raw_ion_mobility(&self) -> Option<ArrayType>
pub const fn as_raw_ion_mobility(&self) -> Option<ArrayType>
Convert an ion mobility array to its raw variant
Sourcepub const fn as_deconvoluted_ion_mobility(&self) -> Option<ArrayType>
pub const fn as_deconvoluted_ion_mobility(&self) -> Option<ArrayType>
Convert an ion mobility array to its deconvoluted variant
Sourcepub fn nonstandard<S>(name: S) -> ArrayTypewhere
S: ToString,
pub fn nonstandard<S>(name: S) -> ArrayTypewhere
S: ToString,
Create a ArrayType::NonStandardDataArray with the provided name.
Sourcepub const fn preferred_unit(&self) -> Option<Unit>
pub const fn preferred_unit(&self) -> Option<Unit>
The preferred unit for this array type.
Sourcepub const fn is_ion_mobility(&self) -> bool
pub const fn is_ion_mobility(&self) -> bool
Test if the the array describes an ion mobility quantity.
§Examples
use mzdata_bindata::ArrayType;
assert!(!ArrayType::MZArray.is_ion_mobility());
assert!(ArrayType::MeanInverseReducedIonMobilityArray.is_ion_mobility());Sourcepub fn as_param(&self, unit: Option<Unit>) -> Param
pub fn as_param(&self, unit: Option<Unit>) -> Param
Create a Param for this array type.
If a unit is provided, that unit will be specified, otherwise a default unit may be used instead.
Prefer this to Self::as_param_const when you do not need to worry about const-ness
and the
Sourcepub const fn as_param_const(&self) -> ParamCow<'static>
pub const fn as_param_const(&self) -> ParamCow<'static>
Create a ParamCow for this array type in a const context using the default unit.
NOTE: If this is a Self::NonStandardDataArray, this function will panic as
this variant requires allocation.
Prefer this method over Self::as_param_with_unit_const when the default unit is
acceptable, and you are confident you are not dealing with a non-standard array.
§Panics
When self is either Self::NonStandardDataArray or an unimplemented variant.
Sourcepub const fn as_param_with_unit_const(&self, unit: Unit) -> ParamCow<'static>
pub const fn as_param_with_unit_const(&self, unit: Unit) -> ParamCow<'static>
Create a ParamCow for this array type in a const context using the provided unit.
NOTE: If this is a Self::NonStandardDataArray, this function will panic as
this variant requires allocation.
Prefer this method over Self::as_param_const when you want to control the unit
directly rather than accepting the default unit and possibly updating it in the calling
code.
§Panics
When self is either Self::NonStandardDataArray or an unimplemented variant.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ArrayType
impl<'de> Deserialize<'de> for ArrayType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArrayType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArrayType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ArrayType
Source§impl Ord for ArrayType
impl Ord for ArrayType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for ArrayType
impl PartialOrd for ArrayType
Source§impl Serialize for ArrayType
impl Serialize for ArrayType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ArrayType
Auto Trait Implementations§
impl Freeze for ArrayType
impl RefUnwindSafe for ArrayType
impl Send for ArrayType
impl Sync for ArrayType
impl Unpin for ArrayType
impl UnsafeUnpin for ArrayType
impl UnwindSafe for ArrayType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.