Skip to content

Dev v0.2.3 - #8

Merged
mathiassalvas merged 5 commits into
mainfrom
dev_v0.2.3
Aug 13, 2026
Merged

Dev v0.2.3#8
mathiassalvas merged 5 commits into
mainfrom
dev_v0.2.3

Conversation

@mathiassalvas

Copy link
Copy Markdown
Collaborator
  • Issues with hist_optim, rescaling and hist_specification in the CLI were fixed.

  • Added mentions to the paper and the readthedocs in the documentation.

  • Enhanced StimulusMasker — ready for both SHINIER's own masking and experiment stimulus presentation.
    Three ways to build one: direct construction, from_mask() (fit from an existing mask), or from_interactive_mask() (Matplotlib GUI).

Methods:

- generate_mask() — mask as float64 in [0, 1].
- apply_mask(stim, ...) — apply to one image, a batch, or a {name: image} mapping (names preserved on output).
- save_mask(path, ...) — save the raw mask (.npy or preview image); warns if soft edges make it unsafe to reuse.
- save_masked_stim(stim, path, ...) — apply and save to disk.
- interactive_mask(image) — live GUI tuning (sliders, edge-bias toggle, reset).

Notable additions:

- New edge_bias ("center" / "inward") — soft edges never bleed outside the cutoff boundary in "inward" mode.
- mask_type now defaults to "hard", matching SHINIER's convention.
- Batch errors now name the offending stimulus; duplicate output filenames are rejected instead of silently overwritten.
- Renamed for clarity: mask()→generate_mask(), apply()→apply_mask(), save()→save_masked_stim().

- Introduced tests for StimulusMasker to validate mask saving, application, and parameter handling.
- Added checks for dtype range, warnings, and background application in masks.
- Set the MPLBACKEND environment variable to "Agg" in conftest.py to ensure compatibility with headless environments.
…ling.

-Remove mention of the old "step_size" parameter in the documentation.md
@mathiassalvas
mathiassalvas merged commit 5898d4d into main Aug 13, 2026
36 checks passed
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