Repository navigation
Conversation
Deploying nmrium with
|
| Latest commit: |
a91f64c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://858b4a4e.nmrium.pages.dev |
| Branch Preview URL: | https://fix-range-signals-baseline-n.nmrium.pages.dev |
|
This PR is not related with the dominant carbon solvent signal. this PR is tackle that we are taking the noise level calculated directly in the ROI instead of the global noise level that includes the baseline points in the calculation. |
lpatiny
left a comment
There was a problem hiding this comment.
I agree that using the global noise make sense because indeed if we make the range picking on a signal we will have practically no noise.
Now when we zoom in a peak that does not touch the baseline (like in the following case) the algorithm to calculate if we are over the noise or use Damien's algorithm fails.
I think we need before applying this peaks picking and Damien's algorithm to remove the trapezoid defined by first / last point then we do peak picking, send to Damien's code, then we readd the removed value ...
| seed = (seed * 1_103_515_245 + 12_345) % 2_147_483_648; | ||
| y[i] += ((seed / 2_147_483_648) * 2 - 1) * NOISE; | ||
| } | ||
|
|
There was a problem hiding this comment.
Can we use spectrum generator ? Seems always the same code.

The peak picking cutoff used inside a range was derived from the range itself (3 * median of the ROI). In a narrow range most points belong to the peaks, so the cutoff was close to, or bigger than, the peak height: no peak was picked and the range was left without signals (empty Kind, assignment not editable).
The detection now uses the baseline noise of the whole spectrum (median(|y|) * 8, as autoPeakPicking does) and, when nothing can be detected while the range contains something above that baseline, the point of maximum intensity is reported as a signal of unknown multiplicity. A range that only contains noise stays empty.
Refs: #4435