27 #include "../../exception/exceptionoutofrange.h"
28 #include "../../exception/exceptionnotpossible.h"
33 unsigned int smoothing_half_window_length,
34 unsigned int minmax_half_window_length,
35 unsigned int maxmin_half_window_length,
38 : m_smooth(smoothing_half_window_length),
39 m_minMax(minmax_half_window_length),
40 m_maxMin(maxmin_half_window_length)
67 double detectionThresholdOnMinMax)
73 double detectionThresholdOnMaxMin)
114 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
115 Trace xic_minmax(xic);
121 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
122 Trace xic_maxmin(xic_minmax);
124 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
133 QObject::tr(
"The original XIC is too small to detect peaks (%1) :\n%2")
137 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
138 std::vector<DataPoint>::const_iterator previous_rt = xic_minmax.begin();
139 std::vector<DataPoint>::const_iterator current_rt = (previous_rt + 1);
140 std::vector<DataPoint>::const_iterator last_rt = (xic_minmax.end() - 1);
142 std::vector<DataPoint>::const_iterator current_rt_on_maxmin =
143 (xic_maxmin.begin() + 1);
145 std::vector<DataPoint>::const_iterator xic_position = xic.begin();
146 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
147 while(current_rt != last_rt)
151 if((previous_rt->y < current_rt->y) &&
158 if(current_rt->y < (current_rt + 1)->y)
161 previous_rt = current_rt;
163 current_rt_on_maxmin++;
166 else if(current_rt->y > (current_rt + 1)->y)
171 std::vector<DataPoint>::const_iterator it_left =
178 std::vector<DataPoint>::const_iterator it_right =
199 previous_rt = current_rt;
201 current_rt_on_maxmin++;
209 current_rt_on_maxmin++;
218 previous_rt = current_rt;
220 current_rt_on_maxmin++;
223 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;