|
OpenMS
2.6.0
|
Go to the documentation of this file.
41 #include <Eigen/Sparse>
78 static constexpr
const float MIN_MZ_ = 1.0;
96 static constexpr
const float DEFAULT_BIN_WIDTH_LOWRES = 1.0005f;
99 static constexpr
const float DEFAULT_BIN_WIDTH_HIRES = 0.02f;
102 static constexpr
const float DEFAULT_BIN_OFFSET_HIRES = 0.0f;
105 static constexpr
const float DEFAULT_BIN_OFFSET_LOWRES = 0.4f;
154 return static_cast<SparseVectorIndexType>(floor(log(mz/MIN_MZ_)/log1p(bin_size_ * 1e-6)));
160 return static_cast<SparseVectorIndexType>(floor(mz / bin_size_ + offset_));
170 return (MIN_MZ_ * pow(1.0 + bin_size_ * 1e-6, i));
174 return ((static_cast<float>(i) - offset_) * bin_size_);
185 const SparseVectorType& getBins()
const;
188 SparseVectorType& getBins();
194 const std::vector<Precursor>& getPrecursors()
const;
197 std::vector<Precursor>& getPrecursors();
float getBinSize() const
get the bin size
Definition: BinnedSpectrum.h:179
Eigen::SparseVector< float > SparseVectorType
typedef for the underlying sparse vector
Definition: BinnedSpectrum.h:108
UInt bin_spread_
the spread to left or right
Definition: BinnedSpectrum.h:205
BinnedSpectrum()
default constructor
Definition: BinnedSpectrum.h:121
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:75
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
std::vector< Precursor > precursors_
precursor information
Definition: BinnedSpectrum.h:223
Eigen::SparseVector< float >::Index SparseVectorIndexType
typedef for the index into the sparse vector
Definition: BinnedSpectrum.h:111
bool unit_ppm_
absolute bin size or relative bin size
Definition: BinnedSpectrum.h:211
float getBinLowerMZ(size_t i) const
return the lower m/z of a bin given its index
Definition: BinnedSpectrum.h:165
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
float getBinIntensity(double mz)
returns the bin intensity at a given m/z position
Definition: BinnedSpectrum.h:142
Eigen::SparseVector< float >::InnerIterator SparseVectorIteratorType
typedef for the index into the sparse vector
Definition: BinnedSpectrum.h:114
SparseVectorType bins_
bins
Definition: BinnedSpectrum.h:217
SparseVectorIndexType getBinIndex(float mz) const
return the bin index of a given m/z position
Definition: BinnedSpectrum.h:145
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
float bin_size_
the size of each bin
Definition: BinnedSpectrum.h:208
bool operator==(const IDBoostGraph::ProteinGroup &lhs, const IDBoostGraph::ProteinGroup &rhs)
static const SparseVectorType EmptySparseVector
the empty SparseVector
Definition: BinnedSpectrum.h:117
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
float offset_
offset of bin start
Definition: BinnedSpectrum.h:214
size_t getBinSpread() const
get the bin spread
Definition: BinnedSpectrum.h:182
float getOffset() const
return offset
Definition: BinnedSpectrum.h:191