Skip to content

docs: refactor docstrings for autoarray/mask package#226

Merged
Jammy2211 merged 1 commit intomainfrom
feature/documentation-mask
Mar 9, 2026
Merged

docs: refactor docstrings for autoarray/mask package#226
Jammy2211 merged 1 commit intomainfrom
feature/documentation-mask

Conversation

@Jammy2211
Copy link
Owner

Summary

  • abstract_mask.py: add docstrings to _xp, mask, dimensions properties; fix pixel_scale phrasing; fix is_all_false (docstring was backwards — said "Returns False if all pixels are False")
  • mask_2d.py: add invert/xp to __init__ params; add docstrings to native_for_slim, derive_indexes, derive_mask, derive_grid, zoom, shape_native, mask_centre; fix from_fits (said "Loads the image", "image image" typo, missing params); fix unmasked_blurred_array_from wrong params; fix "ndarraay" typo
  • mask_1d.py: add invert/xp to __init__ params; fix header_dict (said "2D mask"); fix all_false ("(y,x) shape" → "1D shape"); fix "image image" typo; add shape_native/shape_slim docstrings; add from_fits Returns
  • derive/mask_2d.py: fix "everu"→"every"; add allow_padding param to blurring_from
  • derive/grid_2d.py: fix border property incorrectly said "The edge grid (given via derive_grid.edge)"
  • derive/indexes_2d.py: fix 71,3][7,3] typo
  • derive/zoom_2d.py: fix incomplete class docstring sentence; fix "centred" phrasing; fix extent_from wrong method reference (zoomed_around_mask); add Returns sections throughout
  • derive/mask_1d.py: fix to_mask_2d docstring said "to_mask_1d"
  • derive/grid_1d.py: complete rewrite of class docstring and all_false which incorrectly referenced Mask2D/Grid2D/DeriveGrid2D throughout

Test plan

  • Docstring-only changes; no logic was modified
  • Verify the package imports cleanly: python -c "import autoarray"

🤖 Generated with Claude Code

- abstract_mask: add docstrings to _xp, mask, dimensions properties;
  fix pixel_scale phrasing; fix is_all_false (was backwards)
- mask_2d: add invert/xp to __init__ params; add docstrings to
  native_for_slim, derive_indexes, derive_mask, derive_grid, zoom,
  shape_native, mask_centre; fix from_fits (was "image", add all params);
  fix unmasked_blurred_array_from wrong params; fix "ndarraay" typo
- mask_1d: add invert/xp to __init__ params; fix header_dict (was "2D
  mask"); fix all_false ("(y,x)"→"1D"); fix "image image" typo;
  add shape_native/shape_slim docstrings; add derive_mask/derive_grid
  docstrings; add from_fits Returns
- derive/mask_2d: fix "everu"→"every"; add allow_padding param to
  blurring_from
- derive/grid_2d: fix border property incorrectly said "edge grid"
- derive/indexes_2d: fix "71,3]"→"[7,3]" typo
- derive/zoom_2d: fix incomplete class docstring sentence; fix "centred"
  phrasing in offset_pixels/offset_scaled; fix extent_from wrong method
  reference; add Returns sections throughout
- derive/mask_1d: fix to_mask_2d references "to_mask_1d"
- derive/grid_1d: complete rewrite of class and all_false docstrings
  which incorrectly referenced Mask2D/Grid2D/DeriveGrid2D throughout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit a4d6d84 into main Mar 9, 2026
8 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