46 template<
typename _Scalar,
int _Flags,
typename _StorageIndex>
83 static constexpr
const float MIN_MZ_ = 1.0;
101 static constexpr
const float DEFAULT_BIN_WIDTH_LOWRES = 1.0005f;
104 static constexpr
const float DEFAULT_BIN_WIDTH_HIRES = 0.02f;
107 static constexpr
const float DEFAULT_BIN_OFFSET_HIRES = 0.0f;
110 static constexpr
const float DEFAULT_BIN_OFFSET_LOWRES = 0.4f;
152 return (MIN_MZ_ * pow(1.0 + bin_size_ * 1e-6, i));
156 return ((
static_cast<float>(i) - offset_) * bin_size_);
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:81
const SparseVectorType * getBins() const
immutable access to the bin container
float bin_size_
the size of each bin
Definition: BinnedSpectrum.h:190
size_t getBinSpread() const
get the bin spread
Definition: BinnedSpectrum.h:164
float offset_
offset of bin start
Definition: BinnedSpectrum.h:196
BinnedSpectrum()
the empty SparseVector
Definition: BinnedSpectrum.h:120
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:147
float getBinIntensity(double mz)
returns the bin intensity at a given m/z position
bool operator==(const BinnedSpectrum &rhs) const
equality operator
SparseVectorType * bins_
bins
Definition: BinnedSpectrum.h:199
BinnedSpectrum(const BinnedSpectrum &)
copy constructor
UInt bin_spread_
the spread to left or right
Definition: BinnedSpectrum.h:187
void binSpectrum_(const PeakSpectrum &ps)
calculate binning of peak spectrum
bool unit_ppm_
absolute bin size or relative bin size
Definition: BinnedSpectrum.h:193
const std::vector< Precursor > & getPrecursors() const
immutable access to precursors
float getOffset() const
return offset
Definition: BinnedSpectrum.h:173
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:205
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:161
The representation of a 1D spectrum.
Definition: MSSpectrum.h:70
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Definition: IsobaricIsotopeCorrector.h:41
Definition: BinnedSpectrum.h:47
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47