-
Notifications
You must be signed in to change notification settings - Fork 5
docs/spec #29
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
docs/spec #29
Conversation
| event_rate = (x - zero_level) / conversion_gain | ||
|
|
||
| zero_slope = 1.0 / (beta * math.sqrt(3.0 / 8.0)) | ||
| zero_slope = 1.0 / (beta * np.sqrt(3.0 / 8.0)) |
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.
| zero_slope = 1.0 / (beta * np.sqrt(3.0 / 8.0)) | |
| zero_slope = 1.0 / (beta * 0.612372) # 0.612372 approx (3.0 / 8.0) ** 0.5 |
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.
why not leave this to numpy?
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.
Yes, it's clearer since we aleady import numpy. I usually do ( )**0.5 to avoid extra imports.
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.
Importing numpy for something so simple is not my first choice but we need numpy for the casting logic
This PR adds a specification document for the anscombe-transform codec. Once this is complete, we can open a PR over at zarr-extensions that links to the docs page containing the spec.