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

Log transform of negative values #30

Open
NiklasHohmann opened this issue Jan 3, 2024 · 0 comments
Open

Log transform of negative values #30

NiklasHohmann opened this issue Jan 3, 2024 · 0 comments

Comments

@NiklasHohmann
Copy link

When log-transforming time series with negative values, two unexpected things can happen:

  1. When the "Logarithm" option is selected (resulting in automatic selection of "log10"), no error is thrown, and the original data is displayed twice. Clicking "OK and save data" leads to a new file with name appendix "-" that is a duplicate of the original data. Given the selected options, this is unexpected
  2. When the "log 10" or "ln" option is selected directly, and "OK and save data" is selected, a new file with appendix "-log10" (or "-ln") is generated, which contains imaginary values. This throws a warning in the console Imaginary parts of complex X and/or Y arguments ignored., the histogram breaks, and a corresponding downstream error in the console:
In datatransformationsGUI/updateplot1 (line 564)
In datatransformationsGUI/checkradio (line 507)
In waitforallfiguresclosed (line 16)
Error using datatransformationsGUI/updateplot1 (line 569)
Error using ylim in subplot(2,2,3). Results may have complex values???

Error in datatransformationsGUI/checkradio (line 507)

Error using waitforallfiguresclosed (line 16)
Error while evaluating UIControl Callback.

Contrary to the warning, imaginary parts can lead to NaNs when further analyses are run, e.g. rloess detrending. Trying to log transform negative values should throw an error.

This is on Acycle2.8-Win-Green with Matlab runtime

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

No branches or pull requests

1 participant