81 nr_windows(nr_windows_),
83 window_length(win_len_),
84 result_windows_even(nr_windows_),
85 result_windows_odd(nr_windows_+1)
99 return std::max(1.0, (get_noise_even(mz)+get_noise_odd(mz))/2.0 );
105 int window_nr = (int)((mz - mz_start)/window_length);
106 assert(window_nr >= 0);
107 assert(window_nr < (
int)result_windows_even.size());
109 double noise = result_windows_even[window_nr];
116 int window_nr = (int)((mz - mz_start + window_length/2.0)/window_length);
117 assert(window_nr >= 0);
118 assert(window_nr < (
int)result_windows_odd.size());
120 double noise = result_windows_odd[window_nr];
127 window_length_(window_length)
137 return estimateNoise(spectrum->getMZArray()->data, spectrum->getIntensityArray()->data);
146 return estimateNoise(chrom->getTimeArray()->data, chrom->getIntensityArray()->data);
156 assert(mz_array.size() == int_array.size());
157 assert(mz_array.size() > 2);
159 int nr_windows = (int)((mz_array[mz_array.size()-1] - mz_array[0])/window_length_) + 1;
165 computeNoiseInWindows_(mz_array, int_array, eval.
result_windows_odd, mz_array[0] - window_length_/2.0);
177 void computeNoiseInWindows_(
const std::vector<double>& mz_array, std::vector<double> int_array, std::vector<double> & result,
double mz_start);
185 double computeMedian_(std::vector<double>::iterator & first, std::vector<double>::iterator & last);
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: openms/include/OpenMS/INTERFACES/DataStructures.h:130
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: openms/include/OpenMS/INTERFACES/DataStructures.h:210
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22