Skip to content

docs(gui): Scribbler radial panels, multi-wavelength mask regrid, positions crosses, arc-mask GUI - #583

Merged
Jammy2211 merged 10 commits into
PyAutoLabs:mainfrom
samlange04:feature/scribbler-radial-panels-regrid
Oct 7, 2026
Merged

Jammy2211 merged 10 commits into
PyAutoLabs:mainfrom
samlange04:feature/scribbler-radial-panels-regrid

Conversation

@samlange04

@samlange04 samlange04 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Documents the Scribbler features from PyAutoGalaxy PR #641 (feature/scribbler-radial-panels-regrid): the radial-subtracted side-by-side display, cross-grid mask regridding (multi-wavelength extra galaxies masks), positions shown as dark crosses, and an optional arc-mask GUI. Also adds a recommended mask-up order / file layout for the GUI tools.

Stacked on #579. This branch builds on feature/scribbler-erase-and-review, so until #579 merges the diff here also shows its changes; they drop out automatically once #579 is on main. Draft until PyAutoLabs/PyAutoGalaxy#641 is merged and released, since the smoke CI installs the released library.

Changes

  • gui/mask_extra_galaxies_multi.py (new): draw the extra galaxies mask on cosmos_web_ring F150W (0.03"/px) with the radial-subtracted side-by-side display, regrid it onto F277W (0.06"/px) with autogalaxy.gui.display_util.mask_2d_regridded_from, review it there as an outlined proposal with the add / erase brushes, then apply, keep only what was drawn, or skip, and save one mask per waveband. Registered in no_run.yaml (GUI).
  • gui/mask.py: mentions subtract_radial=True; loads positions.json (from the positions GUI) when it exists and passes it as positions=, so each multiple image is marked with a dark cross while painting.
  • gui/mask_arcs.py (new, optional third step): paints the lensed arcs over the lens-light-subtracted display with the contaminant mask's edge and the marked positions shown, saves mask_arcs.fits in Mask2D convention (True = masked), and can reopen it as a proposal. With refine_existing = True it opens a single refine Scribbler instead of the blank draw, the same fix as in docs(gui): document the Scribbler erase brush and a refine-existing-mask route #579. Registered in no_run.yaml (GUI).
  • gui/README.md (new): recommended order — mask_extra_galaxies -> positions -> mask_arcs (optional) — since each step shows the products of the one before; every GUI product belongs in the dataset's own folder under dataset/imaging/<name>/ (or .../wavebands/<band>/), never in output/. Summarised in data_preparation/start_here.py and the package README.
  • Notebooks and the navigator catalogue (workspace_index.json, llms-full.txt) regenerated.

Scripts Changed

  • scripts/imaging/data_preparation/gui/mask.py
  • scripts/imaging/data_preparation/gui/mask_arcs.py (new)
  • scripts/imaging/data_preparation/gui/mask_extra_galaxies_multi.py (new)
  • scripts/imaging/data_preparation/gui/README.md (new)
  • scripts/imaging/data_preparation/start_here.py
  • scripts/imaging/data_preparation/README.md

Testing

  • Existing tests pass: check_navigator.py --root . --banners=fail and scripts/check_sizes.sh --base main
  • New tests added: not applicable (docs).
  • Tested manually with workspace examples (GUI scripts are not smoke-tested).

Related Issues

Requires: PyAutoLabs/PyAutoGalaxy#641
Stacked on: #579

Written with AI assistance (Claude Code).

🤖 Generated with Claude Code

samlange04 and others added 9 commits September 26, 2026 16:30
…ask route

The mask GUIs now use `mask_from()` (everything painted green minus everything
painted red) instead of `show_mask()`, document the '1' / '2' / '=' / '-' / 'z'
keys, and gain a `refine_existing` section that reopens the saved mask as a
`proposal=` so it is adjusted rather than redrawn. Pairs with PyAutoGalaxy
feature/scribbler-erase-and-review.

Notebooks and the navigator catalogue regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The circular mask overlaid while drawing the extra galaxies mask goes from
3.0" to 4.0", with a note that it is better to draw the mask over too large
an area: it can always be made smaller during the analysis, but making it
larger means re-drawing the extra galaxies mask. Notebook regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… name

- refine_existing = True (with a saved mask) now opens only the refine GUI
  instead of a blank canvas first; the flag and its prose come before the
  single Scribbler call.
- mask_extra_galaxies: the 4.0" circle is guide_mask and is the overlay in
  both GUI routes, so the refine overlay is no longer the just-drawn mask.
- Notebooks regenerated with PyAutoHands generate.py.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ial in mask.py

New `imaging/data_preparation/gui/mask_extra_galaxies_multi.py`: draw the extra
galaxies mask on cosmos_web_ring F150W (0.03"/px) with the Scribbler's
radial-subtracted side-by-side display, regrid it onto F277W (0.06"/px) with
`autogalaxy.gui.display_util.mask_2d_regridded_from`, review it there as an
outlined proposal with the add / erase brushes, then apply, keep only what was
drawn, or skip, and save one mask per waveband. Registered in no_run.yaml (GUI).

`gui/mask.py` mentions `subtract_radial=True`. Pairs with PyAutoGalaxy
feature/scribbler-radial-panels-regrid (stacked on
feature/scribbler-erase-and-review). Notebooks and navigator regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`gui/mask.py` loads `positions.json` (written by the positions GUI) when it exists
and passes it as `positions=`, so each multiple image is marked with a dark cross
while the mask is painted. The multi-waveband example mentions the option. Pairs
with PyAutoGalaxy feature/scribbler-radial-panels-regrid. Notebooks and navigator
regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…c-mask GUI

`gui/README.md` (new) sets the recommended order — mask_extra_galaxies (paint the
contaminants) -> positions (click the multiple images) -> mask_arcs (optional,
paint the arcs to keep) — because each step shows the products of the one before
it, and lists where every GUI product belongs: in the dataset's own folder under
`dataset/imaging/<name>/` (or `.../wavebands/<band>/`), beside data / noise_map /
psf, never in `output/`. The same order and layout are summarised in
`data_preparation/start_here.py` and the package README.

`gui/mask_arcs.py` (new, optional third step): paints the lensed arcs over the
lens-light-subtracted display with the contaminant mask's edge and the marked
positions shown, saves `mask_arcs.fits` in Mask2D convention (True = masked,
i.e. everything except the arcs), and can reopen it as a proposal. Registered in
no_run.yaml (GUI). Pairs with PyAutoGalaxy feature/scribbler-radial-panels-regrid.

Notebooks and navigator regenerated.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Same fix as gui/mask.py and gui/mask_extra_galaxies.py (586993f): with
`refine_existing = True` the blank-canvas GUI no longer opens before the refine
GUI. `gui/mask_arcs.py` now picks the proposal once and opens a single
Scribbler, and the prose above the flag describes both routes. Notebook
regenerated; navigator unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closing the arc-mask GUI without painting left an empty arc region which, inverted,
masked every pixel and crashed the closing plot's zoom. Exit with a message instead of
writing an empty mask.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…empty-region guard

Follows the PyAutoGalaxy change that replaced the green / red brushes, which vanished
against a jet-coloured image and are not told apart by every kind of colour vision.
Every GUI script now titles its window with what is being masked and, when refining,
where the proposal came from ("Mask extra galaxies: F277W, proposing from F150W");
the window itself lists what the overlay x's and position crosses mean.

mask.py, like mask_arcs.py, inverts the painted region, so a window closed unpainted
(or fully erased) would mask every pixel and crash the closing plot; it now exits with
a message instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ile name

- mask_extra_galaxies_multi.py imported mask_2d_regridded_from from the
  private autogalaxy.gui.display_util module; use the public
  al.mask_2d_regridded_from re-export instead.
- Explain that the script writes mask_extra_galaxies_gui.fits so the shipped
  mask_extra_galaxies.fits is not overwritten, and that
  multi_dataset/start_here.py loads mask_extra_galaxies.fits, so rename the
  file or change start_here.py once happy with the masks.
- Regenerate the notebook (PyAutoHands generate.py) and the catalogue.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jammy2211

Copy link
Copy Markdown
Collaborator

Thanks Sam! I pushed a small maintainer commit (f81a357): mask_extra_galaxies_multi.py now calls the public al.mask_2d_regridded_from instead of importing from the private autogalaxy.gui.display_util. I also added a note that the script writes mask_extra_galaxies_gui.fits so the shipped mask_extra_galaxies.fits isn't overwritten; multi_dataset/start_here.py loads the latter, so users should rename the file or point start_here.py at the _gui file. Notebook and catalogue regenerated, navigator and size checks pass locally. It stays draft until a release carries the library export.

@Jammy2211
Jammy2211 marked this pull request as ready for review October 7, 2026 18:13
@Jammy2211
Jammy2211 merged commit f08ed8e into PyAutoLabs:main Oct 7, 2026
7 checks passed
@samlange04
samlange04 deleted the feature/scribbler-radial-panels-regrid branch October 16, 2026 04:48
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.

2 participants