Skip to content

Commit a08f68b

Browse files
committed
[DEBUG] add debug statements
1 parent 279dd1d commit a08f68b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/openms/source/TRANSFORMATIONS/RAW2PEAK/PeakPickerHiRes.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <OpenMS/MATH/MISC/CubicSpline2d.h>
4343
#include <OpenMS/KERNEL/SpectrumHelper.h>
4444

45+
// #define PPHIRES_DEBUG
4546

4647
using namespace std;
4748

@@ -217,6 +218,12 @@ namespace OpenMS
217218
((left_to_central < spacing_difference_ * min_spacing) &&
218219
(central_to_right < spacing_difference_ * min_spacing)));
219220

221+
#ifdef PPHIRES_DEBUG
222+
std::cout << "-------------------------------------------------------------------------------------" << std::endl;
223+
std::cout << " Looking at peak " << i << " " << input[i] << std::endl;
224+
std::cout << " Checking " << max_int_check << sn_check << spacing_check << std::endl;
225+
#endif
226+
220227
// special case (timsTOF data): peaks that only have a leading flank on one side and a large spacing on the other side
221228
if (check_spacings &&
222229
((central_to_right >= spacing_difference_ * min_spacing &&
@@ -257,6 +264,10 @@ namespace OpenMS
257264
continue;
258265
}
259266

267+
#ifdef PPHIRES_DEBUG
268+
std::cout << " => Creating picked peak from seed. " << std::endl;
269+
#endif
270+
260271
std::map<double, double> peak_raw_data;
261272
double weighted_im = 0;
262273

@@ -309,6 +320,9 @@ namespace OpenMS
309320
previous_zero_left = (input[i - k].getIntensity() == 0);
310321
left_boundary = i - k;
311322
++k;
323+
#ifdef PPHIRES_DEBUG
324+
std::cout << " .. extended to the left: " << left_boundary << " : " << input[left_boundary] << std::endl;
325+
#endif
312326
}
313327

314328
// to the right
@@ -352,6 +366,9 @@ namespace OpenMS
352366
previous_zero_right = (input[i + k].getIntensity() == 0);
353367
right_boundary = i + k;
354368
++k;
369+
#ifdef PPHIRES_DEBUG
370+
std::cout << " .. extended to the right: " << right_boundary << " : " << input[right_boundary] << std::endl;
371+
#endif
355372
}
356373

357374
// Fix up spline for the special case of a leading flank peak, we
@@ -464,6 +481,9 @@ namespace OpenMS
464481
peak_boundary.mz_min = input[left_boundary].getMZ();
465482
peak_boundary.mz_max = input[right_boundary].getMZ();
466483
output.push_back(peak);
484+
#ifdef PPHIRES_DEBUG
485+
std::cout << " => Created peak: " << peak << std::endl;
486+
#endif
467487

468488
boundaries.push_back(peak_boundary);
469489

0 commit comments

Comments
 (0)