-
Notifications
You must be signed in to change notification settings - Fork 10
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
correctphase prone to inverting signal. #114
Comments
In this particular example, the raw data already is inverted (blue trace), and The basic assumption of Should we adjust this behavior? |
It could be useful to change the behavior for scripted data sets that do not allow users to set the phase. This nutation experiment was run as part of a prodel script and the phase changes as the script progresses |
Indeed, the norm of the imaginary part has two minima as a function of phase angle, so the solution provided by The current approach picks the minimum closest to zero phase angle. Instead, as @mtessmer suggests, We could implement this as new default behavior, with a keyword argument to switch it off. For example: |
We can extend the use of the
I am not sure we need the last use case (user-provided phase). |
…rection (#131) * correctphase: implement optimization based on integral of real component (#114) * update changelog * correctphase: fix wrong keyword name in docstring * correctphase: implement phase selection, deprecate offset correction, major code refactoring * adjust beginner's guide to new functionality of correctphase * noiselevel: fix call to correctphase * update changelog * fix typos
This keyword argument was eliminated in 3d0919c. The function returns the minimizer phase that yields a positive average of the real part. |
Using deerlab.correctphase inverts the attached nutation experiment.
Nutation.zip
The text was updated successfully, but these errors were encountered: