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

Missing documentation for SZ3 parameters #317

Open
mandelkow opened this issue Jul 19, 2024 · 3 comments
Open

Missing documentation for SZ3 parameters #317

mandelkow opened this issue Jul 19, 2024 · 3 comments

Comments

@mandelkow
Copy link

Could someone add minimal documentation to explain the input parameters for SZ3?

hdf5plugin.SZ3(absolute=None, relative=None, norm2=None, peak_signal_to_noise_ratio=None)

The link provided ( https://szcompressor.org/ ) points to a slew of papers hidden behind a paywall.

The parameters absolute and relative may be analogous to the documentation of SZ!?

This paper Zhao et al. 2021 also quotes an equation for PSNR:
PSNR = 10*log10( (max(D)-min(D))^2 / mean((D-D')^2)) [dB]
i.e. peak-to-peak signal power over mean decompression error power in dB.

But what does norm2 do? (In my experiments the parameter had no effect at all!?!)

@t20100
Copy link
Member

t20100 commented Jul 22, 2024

Hi,

SZ3 comes from: https://github.com/szcompressor/SZ3
We'll update the link in the documentation to use this one instead.

Regarding the documentation of the different arguments, we had trouble with testing some of them (see #241, #224 (comment)) and so we decided to document only the one that we could test relieable, but it looks norm2 is missing in the doc.
There is actually a warning for the others:

logger.warning("Only absolute and norm2 modes properly tested")

@vasole do you recall what was/is the exact state of testing the different SZ3 modes?

For documentation of the different mode, see the SZ3 tool doc:

https://github.com/szcompressor/SZ3/blob/4bbe9df7e4bcb6ae6339fcb3033100da07fe7434/tools/sz3/sz3.cpp#L40-L54

About norm2, it is explained here:

#expected L2 NORM Error: sqrt((x1-x1')^2+(x2-x2')^2+....+(xN-xN')^2)

@t20100
Copy link
Member

t20100 commented Jul 23, 2024

In #314, I replaced the https://szcompressor.org/ by links to the repository.
For the documentation of the parameters, it will require a closer look, so not for now for me.

@t20100
Copy link
Member

t20100 commented Jul 23, 2024

Regarding norm2, this comment #290 (comment) points to the implementation of the conversion of norm2 to an absolute error bound here:
https://github.com/szcompressor/SZ3/blob/b3dac0c65a9a31a566ea4b264dad48427702d6db/include/SZ3/utils/Statistic.hpp#L42-L44

Without more documentation/information from the upstream SZ3 library, I'm +1 to keep hdf5plugin.SZ3 documentation as it is.

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

2 participants