Skip to content

Updates to plot_wo#1486

Open
GL-S wants to merge 2 commits intodevelopfrom
updates-wo
Open

Updates to plot_wo#1486
GL-S wants to merge 2 commits intodevelopfrom
updates-wo

Conversation

@GL-S
Copy link
Copy Markdown
Collaborator

@GL-S GL-S commented Apr 29, 2026

This PR includes updates to the plot_wo function.

Previously, the function would assign the colour blue to pixels with the non‑contiguous flag == True.
This occurred due to the colour‑map logic, which relied on bounds and applied colours to all values indiscriminately.

The core logic of the function was not changed, but a mask is now applied beforehand to remove non‑contiguous pixels.

Also, a new Terrain Shadow class has been added to the legend, and the High Slope + Cloud class was removed (it is now included within the Cloud class).

Finally, the code has been simplified by using a single mapping dictionary that groups labels, bounds and RGB values together.

Example:
BEFORE
image
AFTER
image

Checklist

If this is a notebook, then have you:

  • Checked the structure of the notebook follows our DEA-notebooks template
  • Removed any unused Python packages from Load packages
  • Removed any unused/empty code cells
  • Removed any guidance cells (e.g. General advice)
  • Ensured 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).
  • Included relevant tags in the final notebook cell (refer to the DEA Tags Index, and re-use tags if possible)
  • Tested notebook on the DEA Sandbox
  • Cleared all outputs, run notebook from start to finish, and save the notebook in the state where all cells have been sequentially evaluated
  • If applicable, update the Notebook currently compatible with line below the notebook title to reflect the environments the notebook is compatible with
  • Check for any spelling mistakes using the DEA Sandbox's built-in spellchecker (double click on markdown cells then right-click on pink highlighted words). For example:

sandbox_spellchecker

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@GL-S GL-S changed the title Updates wo Updates to plot_wo Apr 29, 2026
@GL-S
Copy link
Copy Markdown
Collaborator Author

GL-S commented Apr 29, 2026

the first commit binary-dea-wo-plot was accidental, it was meant to be for another repository, so it accidentally included some testing notebook cells that were later deleted

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.

1 participant