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

Updated image export notebook to an interactive app that requires no coding #894

Merged
merged 8 commits into from
Feb 17, 2022

Conversation

robbibt
Copy link
Collaborator

@robbibt robbibt commented Feb 15, 2022

Proposed changes

This PR overhauls the current Image exporter app to make it use the new widget framework developed by DE Africa. This change makes the tool much easier to use, as all parameters are built into the app itself rather than needing to be specified by code. See demo here:

https://www.loom.com/share/71075ebc6bfe4d538618ae1c2dad5cb0

The tool supports the following functionality:

  • Selecting date, satellite and imagery style
  • Customising the colour stretch used to plot the image
  • Customising the output file format
  • Customising spatial resolution to load data (in metres). By default, the tool will automatically set the best possible resolution depending on the satellites selected (i.e. 30 m for Landsat, 10 m for Sentinel-2).
  • Pansharpening: Whether to apply pansharpening (using the Brovey Transform) to increase the resolution of Landsat 7 and 8 imagery from 30 m to 15 m pixels.
  • Applying power transformations to rais imagery by a power to reduce bright features and enhance dark features. This can add extra definition over areas with extremely bright features like snow, beaches or salt pans.
  • Applying unsharp masking to increase the sharpness of the output image. If activated, you can specify both the radius (in pixels) and the amount/strength of the sharpening.

Would love to get any feedback on usability, or edge cases that break the tool!

Checklist (replace [ ] with [x] to check off)

  • Notebook created using the DEA-notebooks template
  • Remove any unused Python packages from Load packages
  • Remove any unused/empty code cells
  • Remove any guidance cells (e.g. General advice)
  • Ensure that all code cells follow the PEP8 standard for code. The jupyterlab_code_formatter tool can be used to format code cells to a consistent style: select each code cell, then click Edit and then one of the Apply X Formatter options (YAPF or Black are recommended).
  • Include relevant tags in the final notebook cell (refer to the DEA Tags Index, and re-use tags if possible)
  • Clear all outputs, run notebook from start to finish, and save the notebook in the state where all cells have been sequentially evaluated
  • Test notebook on both the NCI and DEA Sandbox (flag if not working as part of PR and ask for help to solve if needed)
  • If applicable, update the Notebook currently compatible with the NCI|DEA Sandbox environment only line below the notebook title to reflect the environments the notebook is compatible with

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@robbibt robbibt changed the title Updated image export widget app requiring no coding to use Updated image export notebook to interactive app that requires no coding Feb 15, 2022
@robbibt
Copy link
Collaborator Author

robbibt commented Feb 15, 2022

@cbur24 @alexgleith @caitlinadams Tagged you in case you eventually wanted to add something similar to DE Africa - no pressure to review if you're busy though!

Copy link
Collaborator

@CEKrause CEKrause left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This notebook is incredible! The only small tweak I'd suggest is adding a DPI adjustor to the Advanced menu so that you can export to a specific DPI if you need imagery for comms etc.

This is amazing work.

@robbibt robbibt changed the title Updated image export notebook to interactive app that requires no coding Updated image export notebook to an interactive app that requires no coding Feb 15, 2022
@robbibt
Copy link
Collaborator Author

robbibt commented Feb 16, 2022

@CEKrause Have added a DPI selector to the advanced menu - I ended up making it set the minimum DPI for export, so if the image was smaller than the specified DPI it would be scaled up, but if the image was larger it would still be exported at its best resolution (even if that is higher than the specified DPI).

image

The reasoning for this was that I didn't want someone to accidently reduce the resolution of their data by specifying a lower DPI, but perhaps that's OK if that's what they request? Not sure, can be easily changed either way

@robbibt robbibt merged commit 484a5b4 into develop Feb 17, 2022
@robbibt robbibt deleted the new_export_app branch February 17, 2022 02:46
@robbibt robbibt mentioned this pull request Feb 17, 2022
9 tasks
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

Successfully merging this pull request may close these issues.

None yet

2 participants