|
42 | 42 | #include <OpenMS/MATH/MISC/CubicSpline2d.h> |
43 | 43 | #include <OpenMS/KERNEL/SpectrumHelper.h> |
44 | 44 |
|
| 45 | +// #define PPHIRES_DEBUG |
45 | 46 |
|
46 | 47 | using namespace std; |
47 | 48 |
|
@@ -217,6 +218,12 @@ namespace OpenMS |
217 | 218 | ((left_to_central < spacing_difference_ * min_spacing) && |
218 | 219 | (central_to_right < spacing_difference_ * min_spacing))); |
219 | 220 |
|
| 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 | + |
220 | 227 | // special case (timsTOF data): peaks that only have a leading flank on one side and a large spacing on the other side |
221 | 228 | if (check_spacings && |
222 | 229 | ((central_to_right >= spacing_difference_ * min_spacing && |
@@ -257,6 +264,10 @@ namespace OpenMS |
257 | 264 | continue; |
258 | 265 | } |
259 | 266 |
|
| 267 | +#ifdef PPHIRES_DEBUG |
| 268 | + std::cout << " => Creating picked peak from seed. " << std::endl; |
| 269 | +#endif |
| 270 | + |
260 | 271 | std::map<double, double> peak_raw_data; |
261 | 272 | double weighted_im = 0; |
262 | 273 |
|
@@ -309,6 +320,9 @@ namespace OpenMS |
309 | 320 | previous_zero_left = (input[i - k].getIntensity() == 0); |
310 | 321 | left_boundary = i - k; |
311 | 322 | ++k; |
| 323 | +#ifdef PPHIRES_DEBUG |
| 324 | + std::cout << " .. extended to the left: " << left_boundary << " : " << input[left_boundary] << std::endl; |
| 325 | +#endif |
312 | 326 | } |
313 | 327 |
|
314 | 328 | // to the right |
@@ -352,6 +366,9 @@ namespace OpenMS |
352 | 366 | previous_zero_right = (input[i + k].getIntensity() == 0); |
353 | 367 | right_boundary = i + k; |
354 | 368 | ++k; |
| 369 | +#ifdef PPHIRES_DEBUG |
| 370 | + std::cout << " .. extended to the right: " << right_boundary << " : " << input[right_boundary] << std::endl; |
| 371 | +#endif |
355 | 372 | } |
356 | 373 |
|
357 | 374 | // Fix up spline for the special case of a leading flank peak, we |
@@ -464,6 +481,9 @@ namespace OpenMS |
464 | 481 | peak_boundary.mz_min = input[left_boundary].getMZ(); |
465 | 482 | peak_boundary.mz_max = input[right_boundary].getMZ(); |
466 | 483 | output.push_back(peak); |
| 484 | +#ifdef PPHIRES_DEBUG |
| 485 | + std::cout << " => Created peak: " << peak << std::endl; |
| 486 | +#endif |
467 | 487 |
|
468 | 488 | boundaries.push_back(peak_boundary); |
469 | 489 |
|
|
0 commit comments