DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpInstr::SpectrometerData::SpectrumType Class Reference

Type describing a spectrum as acquired by the Spectrometer instrument. More...

Public Member Functions

 SpectrumType ()
 Constructs a SpectrumType instance with FrequencyUnit set to FrequencyUnitType::Hz and IntensityUnit set to IntensityUnitType::Counts. More...
 
 SpectrumType (FrequencyUnitType FrequencyUnit, IntensityUnitType IntensityUnit)
 Constructs a SpectrumType instance with the specified units. More...
 
 SpectrumType (const SpectrumType &Other)
 Copy-constructs a SpectrumType instance. More...
 
 SpectrumType (SpectrumType &&Other)
 Move-constructs a SpectrumType instance. More...
 
SpectrumTypeoperator= (const SpectrumType &Other)
 Copies a SpectrumType instance's content to this instance. More...
 
SpectrumTypeoperator= (SpectrumType &&Other)
 Moves a SpectrumType instance's content to this instance. More...
 
void Reset ()
 Removes all samples from the spectrum (clears Samples). More...
 
auto GetFrequencyUnit () const noexcept
 Getter for FrequencyUnit. More...
 
auto GetIntensityUnit () const noexcept
 Getter for IntensityUnit. More...
 
auto & GetSpectrum () const noexcept
 Getter for Samples. More...
 
auto & GetSpectrum () noexcept
 Getter for Samples. More...
 
bool HasSpectrum () const noexcept
 Indicates whether the spectrum is empty. More...
 

Private Attributes

FrequencyUnitType FrequencyUnit
 The spectrum's frequency (x-axis) unit. More...
 
IntensityUnitType IntensityUnit
 The spectrum's intensity (y-axis) unit. More...
 
std::map< double, double > Samples
 Samples of the spectrum as tuples in units (FrequencyUnit, IntensityUnit) More...
 

Detailed Description

Type describing a spectrum as acquired by the Spectrometer instrument.

Definition at line 120 of file Spectrometer.h.

Constructor & Destructor Documentation

◆ SpectrumType() [1/4]

DynExpInstr::SpectrometerData::SpectrumType::SpectrumType ( )
inline

Constructs a SpectrumType instance with FrequencyUnit set to FrequencyUnitType::Hz and IntensityUnit set to IntensityUnitType::Counts.

Definition at line 127 of file Spectrometer.h.

◆ SpectrumType() [2/4]

DynExpInstr::SpectrometerData::SpectrumType::SpectrumType ( FrequencyUnitType  FrequencyUnit,
IntensityUnitType  IntensityUnit 
)
inline

Constructs a SpectrumType instance with the specified units.

Parameters
FrequencyUnitThe spectrum's frequency (x-axis) unit.
IntensityUnitThe spectrum's intensity (y-axis) unit.

Definition at line 134 of file Spectrometer.h.

◆ SpectrumType() [3/4]

DynExpInstr::SpectrometerData::SpectrumType::SpectrumType ( const SpectrumType Other)
inline

Copy-constructs a SpectrumType instance.

Parameters
OtherSpectrum to copy from

Definition at line 140 of file Spectrometer.h.

◆ SpectrumType() [4/4]

DynExpInstr::SpectrometerData::SpectrumType::SpectrumType ( SpectrumType &&  Other)

Move-constructs a SpectrumType instance.

Parameters
OtherSpectrum to move from. Samples of Other will be empty after the operation.

Definition at line 28 of file Spectrometer.cpp.

Member Function Documentation

◆ GetFrequencyUnit()

auto DynExpInstr::SpectrometerData::SpectrumType::GetFrequencyUnit ( ) const
inlinenoexcept

Getter for FrequencyUnit.

Definition at line 164 of file Spectrometer.h.

◆ GetIntensityUnit()

auto DynExpInstr::SpectrometerData::SpectrumType::GetIntensityUnit ( ) const
inlinenoexcept

Getter for IntensityUnit.

Definition at line 165 of file Spectrometer.h.

◆ GetSpectrum() [1/2]

auto& DynExpInstr::SpectrometerData::SpectrumType::GetSpectrum ( ) const
inlinenoexcept

Getter for Samples.

Definition at line 166 of file Spectrometer.h.

◆ GetSpectrum() [2/2]

auto& DynExpInstr::SpectrometerData::SpectrumType::GetSpectrum ( )
inlinenoexcept

Getter for Samples.

Definition at line 167 of file Spectrometer.h.

◆ HasSpectrum()

bool DynExpInstr::SpectrometerData::SpectrumType::HasSpectrum ( ) const
inlinenoexcept

Indicates whether the spectrum is empty.

Returns
Returns true when SpectrumType::Samples contain at least one sample, false otherwise.

Definition at line 173 of file Spectrometer.h.

◆ operator=() [1/2]

SpectrometerData::SpectrumType & DynExpInstr::SpectrometerData::SpectrumType::operator= ( const SpectrumType Other)

Copies a SpectrumType instance's content to this instance.

Parameters
OtherSpectrum to copy from
Returns
Returns a reference to this SpectrumType instance.

Definition at line 34 of file Spectrometer.cpp.

◆ operator=() [2/2]

SpectrometerData::SpectrumType & DynExpInstr::SpectrometerData::SpectrumType::operator= ( SpectrumType &&  Other)

Moves a SpectrumType instance's content to this instance.

Parameters
OtherSpectrum to move from. Samples of Other will be empty after the operation.
Returns
Returns a reference to this SpectrumType instance.

Definition at line 43 of file Spectrometer.cpp.

◆ Reset()

void DynExpInstr::SpectrometerData::SpectrumType::Reset ( )

Removes all samples from the spectrum (clears Samples).

Definition at line 54 of file Spectrometer.cpp.

Member Data Documentation

◆ FrequencyUnit

FrequencyUnitType DynExpInstr::SpectrometerData::SpectrumType::FrequencyUnit
private

The spectrum's frequency (x-axis) unit.

Definition at line 176 of file Spectrometer.h.

◆ IntensityUnit

IntensityUnitType DynExpInstr::SpectrometerData::SpectrumType::IntensityUnit
private

The spectrum's intensity (y-axis) unit.

Definition at line 177 of file Spectrometer.h.

◆ Samples

std::map<double, double> DynExpInstr::SpectrometerData::SpectrumType::Samples
private

Samples of the spectrum as tuples in units (FrequencyUnit, IntensityUnit)

Definition at line 179 of file Spectrometer.h.


The documentation for this class was generated from the following files: