-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: improve default values for auto phase. close #1093 #1099
Conversation
magnitudeMode: false, | ||
minRegSize: 30, | ||
maxDistanceToJoin: 256, | ||
minRegSize: 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change the variable name ? Is this minResionSize ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we will need to wait for the new release of ml-spectra-processing
minRegSize: 30, | ||
maxDistanceToJoin: 256, | ||
minRegSize: 10, | ||
maxDistanceToJoin: 128, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this option not be dependant from the number of points in the spectrum ? We have spectra with 1k points and some with 256k points.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be tested because I believe it does not relate with the resolution of the spectrum, it is closer to how much noise has the spectrum, but I put a bigger cutoff for noise, I think we could test with those parameters to check if it works for most cases.
minRegSize: 10, | ||
maxDistanceToJoin: 128, | ||
magnitudeMode: true, | ||
factorNoise: 5, | ||
}; | ||
|
||
export function apply(datum1D, options = {}) { | ||
if (!isApplicable(datum1D)) { | ||
throw new Error('phaseCorrection not applicable on this data'); | ||
} | ||
options = Object.assign({}, defaultOptions, options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the new syntax
options = {...defaultOptions, ...options}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can also directly pass the spread to the function call: reimAutoPhaseCorrection(datum1D.data, {...defaultOptions, ...options})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are just right, options is used just this once.
No description provided.