Add save_gdal.py --mask/--zero-mask options#1349
Conversation
|
💖 Thanks for opening this pull request! Please check out our contributing guidelines. 💖 |
Reviewer's GuideEnhances the save_gdal CLI by adding options to apply a user-supplied mask file and/or automatically mask zero-valued pixels, integrating the new masking steps into the data preparation workflow before writing output. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @barely-sad-one - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 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.
save_gdal.py --mask/--zero-mask options
yunjunz
left a comment
There was a problem hiding this comment.
Thank you @barely-sad-one for the PR! Looks all good to me.
|
🎉 🎉 🎉 Congrats on merging your first pull request! We here at behaviorbot are proud of you! 🎉 🎉 🎉 |
This PR adds support for the
-mand--zero-maskcommand-line arguments to thesave_gdal.pyCLI, allowing users to:-m /path/to/mask: Apply a custom mask file (e.g. maskTempCoh.h5) to exclude invalid pixels.--zero-mask: Automatically mask all zero-valued pixels in the data array.Changes
save_gdal.pyto accept and handleinps.mask_fileandinps.zero_mask.data[mask == 0] = np.nananddata[data == 0] = np.nan.Reminders
-m --maskoption forsave_gdal/qgis.py#1254Summary by Sourcery
Add support for custom and zero-value masking to the save_gdal.py command-line interface and apply the masking logic prior to output generation
New Features:
-m/--maskargument to save_gdal.py CLI for specifying a custom mask file--zero-maskflag to automatically mask zero-valued pixels before writing outputEnhancements: