20 template<
typename _Scalar,
int _Flags,
typename _StorageIndex>
57 static constexpr
const float MIN_MZ_ = 1.0;
75 static constexpr
const float DEFAULT_BIN_WIDTH_LOWRES = 1.0005f;
78 static constexpr
const float DEFAULT_BIN_WIDTH_HIRES = 0.02f;
81 static constexpr
const float DEFAULT_BIN_OFFSET_HIRES = 0.0f;
84 static constexpr
const float DEFAULT_BIN_OFFSET_LOWRES = 0.4f;
126 return float(MIN_MZ_ * pow(1.0 + bin_size_ * 1e-6, i));
130 return ((
static_cast<float>(i) - offset_) * bin_size_);
167 bool unit_ppm_ {
false};
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:55
const SparseVectorType * getBins() const
immutable access to the bin container
size_t getBinSpread() const
get the bin spread
Definition: BinnedSpectrum.h:138
BinnedSpectrum()
the empty SparseVector
Definition: BinnedSpectrum.h:94
BinnedSpectrum & operator=(const BinnedSpectrum &)
assignment operator
std::vector< Precursor > & getPrecursors()
mutable access to precursors
bool operator!=(const BinnedSpectrum &rhs) const
inequality operator
float getBinLowerMZ(size_t i) const
return the lower m/z of a bin given its index
Definition: BinnedSpectrum.h:121
float getBinIntensity(double mz)
returns the bin intensity at a given m/z position
bool operator==(const BinnedSpectrum &rhs) const
equality operator
BinnedSpectrum(const BinnedSpectrum &)
copy constructor
void binSpectrum_(const PeakSpectrum &ps)
calculate binning of peak spectrum
const std::vector< Precursor > & getPrecursors() const
immutable access to precursors
float getOffset() const
return offset
Definition: BinnedSpectrum.h:147
size_t getBinIndex(float mz) const
return the bin index of a given m/z position
std::vector< Precursor > precursors_
precursor information
Definition: BinnedSpectrum.h:179
static bool isCompatible(const BinnedSpectrum &a, const BinnedSpectrum &b)
Check if two BinnedSpectrum objects have equally sized bins and offset.
virtual ~BinnedSpectrum()
destructor
SparseVectorType * getBins()
mutable access to the bin container
BinnedSpectrum(const PeakSpectrum &ps, float size, bool unit_ppm, UInt spread, float offset)
detailed constructor
float getBinSize() const
get the bin size
Definition: BinnedSpectrum.h:135
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
Definition: IsobaricIsotopeCorrector.h:15
Definition: BinnedSpectrum.h:21
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22