-
Notifications
You must be signed in to change notification settings - Fork 16
feat: add option for higher sample precision in StreamConverter #95
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
feat: add option for higher sample precision in StreamConverter #95
Conversation
YeganehHallaj
left a comment
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.
Good job
| # These 4 bytes indicate the data source for the SGZ file. Use 20 to indicate numpy. | ||
| buffer[76:80] = int_to_bytes(20) | ||
| if use_higher_samples_precision: | ||
| # higher precision minimum sample time/depth |
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.
I feel it is more readable if you define a function here
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.
this method is only a couple of lines and I think it would actually make it harder to read if we define another function for this
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.
I looked at the other parts of the function and it is not needed
| if use_higher_samples_precision: | ||
| # higher precision minimum sample time/depth | ||
| buffer[84:92] = double_to_bytes(source.samples[0]) | ||
| # higher precision sample interval (μs/m) |
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.
What would user expect when higher sample precision is enabled?
Should we add a comment specifying the data type and precision level?
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.
this is defined in the SeismicZFP Header in the file-specification.md
|
|
||
|
|
||
| def generate_fake_seismic(n_ilines, n_xlines, n_samples, min_iline=0, min_xline=0): | ||
| def generate_fake_seismic(n_ilines, n_xlines, n_samples, min_iline=0, min_xline=0, min_sample=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.
What is min_sample here?
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.
it's the minimum sample value for the z dimension of the cube. min_sample is the (missing) equivalent to the two other dimension of the cube, e.g. min_iline and min_xline. with min_sample you are able to specify where the cube starts in z dimension
YeganehHallaj
left a comment
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.
Looks good
No description provided.