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

Transformations don't transform the metadata["zerovalue"] #384

Open
ladc opened this issue Jul 18, 2024 · 0 comments
Open

Transformations don't transform the metadata["zerovalue"] #384

ladc opened this issue Jul 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ladc
Copy link
Contributor

ladc commented Jul 18, 2024

It would be useful if all transformations are fully reversable, but currently boxcox_transform, dB_transform and NQ_transform aren't.

In the boxcox_transform and dB_transform this just because the metadata["zerovalue"] does not use the same transformation as the data and the metadata["threshold"]. This was done because np.log(0) results in -np.inf, this should be easily mitigated by introducing a minimal value in the outcome, i.e. metadata["zerovalue"] = np.maximum(np.log(metadata["zerovalue"]), -1000). The same should maybe also be applied to the actual data that is transformed and the metadata["threshold"].

In the NQ_transform, both metadata["threshold"] and metadata["zerovalue"] are not reversable, so maybe we can apply the interpolation method to both of these parameters as well, not sure if this is possible though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant