-
Notifications
You must be signed in to change notification settings - Fork 297
add mintpy.load.compression = default option & allow custom compression for geometry HDF5 file
#1338
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
Conversation
changed 'lzf' to iDict['compression']
removed hardcoding for compression
|
π Thanks for opening this pull request! Please check out our contributing guidelines. π |
Reviewer's Guide by SourceryThis pull request fixes an issue where the compression method for saving geometry radar data was hardcoded to 'lzf', ignoring the compression method specified in the configuration file. The changes modify the Sequence diagram for saving geometry radar data with specified compressionsequenceDiagram
participant User
participant load_data Function
participant geom_radar_obj
User->>load_data Function: Calls load_data with configuration (iDict)
load_data Function->>geom_radar_obj: write2hdf5(..., compression=iDict['compression'])
geom_radar_obj-->>load_data Function: Writes data to HDF5 file with specified compression
load_data Function-->>User: Returns
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @Merdele - I've reviewed your changes - here's some feedback:
Overall Comments:
- Good job addressing the hardcoded compression; this change makes the code more flexible and configuration-driven.
Here's what I looked at during the review
- π’ General issues: all looks good
- π’ Security: all looks good
- π’ Testing: all looks good
- π’ Complexity: all looks good
- π’ Documentation: all looks good
Help me be more useful! Please click π or π on each comment and I'll use the feedback to improve your reviews.
|
This |
|
Did not cause a problem, needed to the h5 file to not be compressed for other purposes and specifying None in the CLI didn't change it so i thought it was a bug! |
|
Sorry for the late feedback, I got busy at work. I think we can clear the confusion in the code behavior as follows:
I will commit the change. |
+ `defaults/smallbaselineApp(_auto).cfg`: add `mintpy.load.compression = default`option for the default behavior (None/lzf for the stack/geometry files) + `cli/load_data.py`: remove the `--compression` option from the command line, to allow input from the template file ONLY, for simplicity. + `load_data.py`: translate `default` compression in the `main()`, so that the code will do other compressions as told. + `(cli/)prep_aria.py`: follow the same compression behavior as `load_data.py` above.
mintpy.load.compression = default option & allow custom compression for geometry HDF5 file
|
π π π Congrats on merging your first pull request! We here at behaviorbot are proud of you! π π π |
Description of proposed changes
changed 'lzf' to iDict['compression']
loading of geometry radar.h5 was choosing 'lzf' as the compression method despite specifying something else in the config file.
Reminders
Summary by Sourcery
Bug Fixes: