bool IsIndexUnit(UnitType Unit)
Checks whether Unit is a sample index unit (UnitType::Index).
bool IsTimeUnit(UnitType Unit)
Checks whether Unit is a time-like unit.
UnitType
Units which can be used with DynExp instruments.
@ TperSqrtHz
Magnetic field amplitude spectral density in T/sqrt(Hz)
@ Freq_THz
Frequency in THz.
@ Ampere
Electric current in Ampere (A)
@ Inv_cm
Wavenumber in 1/cm.
@ Arbitrary
Arbitrary units (a.u.)
@ Unitless
Unitless scalar number.
@ LogicLevel
Logic level (TTL) units (1 or 0)
@ Freq_Hz
Frequency in Hz.
@ Freq_GHz
Frequency in GHz.
@ Wavelength_nm
Wavelength in nm.
@ Freq_kHz
Frequency in kHz.
@ UnitlessInt
Unitless scalar integer number.
@ Freq_MHz
Frequency in MHz.
@ Power_W
Power in Watt (W)
@ Volt
Voltage in Volt (V)
@ Counts
Count rate in counts per second (cps)
std::string UnitToStr(UnitType Unit)
Returns a descriptive string of a respective unit category and type to be e.g. used in plots.
const char * UnitCategoryToStr(UnitType Unit)
Returns a descriptive string of the given unit's category (e.g. 'intensity').
static constexpr double SpeedOfLight
Speed of light in vacuum in m/s.
bool IsIntensityUnit(UnitType Unit)
Checks whether Unit is an intensity-like unit.
bool IsIntegerUnit(UnitType Unit)
Checks whether Unit implies integer values.
bool IsTimeUnitStrict(UnitType Unit)
Checks whether Unit is a time unit (excluding UnitType::Index).
bool IsFrequencyUnit(UnitType Unit)
Checks whether Unit is a frequency-like unit.
const char * UnitTypeToStr(UnitType Unit)
Returns a descriptive string of the given unit's type (e.g. 'dBm').