Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve result by use the noise level after first iteration #13

Merged
merged 4 commits into from
May 3, 2024

Conversation

jobo322
Copy link
Member

@jobo322 jobo322 commented Apr 26, 2024

Detecting baseline zones correctly
Monosnap NMRium 2024-04-26 09-10-33

The result after only one iteration is:
Monosnap NMRium 2024-04-26 09-11-22

Without baseline detection, after seven iterations:

image

The baseline is now in the middle of the noise

image

Copy link
Member

@lpatiny lpatiny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently AirPLS does quite a big deformation and integration is not correct after the change.

Hope this will help.

src/index.js Outdated

let baseline, iteration;
let nbPoints = y.length;
let l = nbPoints - 1;
let sumNegDifferences = Number.MAX_SAFE_INTEGER;
let stopCriterion = tolerance * y.reduce((sum, e) => Math.abs(e) + sum, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super slow code. How big is y ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean with slow?, the size of y depends, usually 128K or more.

@jobo322 jobo322 merged commit 49b48cc into main May 3, 2024
7 checks passed
@jobo322 jobo322 deleted the improve-results branch May 3, 2024 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants