docs: refactor docstrings for autoarray/structures package#227
Merged
docs: refactor docstrings for autoarray/structures package#227
Conversation
- 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>
- abstract_structure: add docstrings to all undocumented properties
(geometry, derive_grid, derive_indexes, derive_mask, shape_slim,
shape_native, pixel_scales, pixel_scale, header_dict, pixel_area,
total_area, origin, unmasked_grid, total_pixels); expand
trimmed_after_convolution_from (was bare NotImplementedError)
- arrays/uniform_2d: add missing params (header, skip_mask, xp) to
__init__; add docstrings to in_counts, in_counts_per_second,
original_orientation, readout_offsets; fix "locaiton" typo; fix
self-referential sentence in brightest_sub_pixel_coordinate; fix
no_mask example (was aa.Array2D.manual + syntax error with period)
- arrays/array_2d_util: fix "input array input a convert" description;
add docstring to check_array_2d; fix "oigin"/"reszied" typos;
fix wrong function name in example (index_flat_for_index_2d_from →
index_slim_for_index_2d_from); remove duplicate array_2d_native param
- arrays/irregular: add docstrings to values and native properties
- arrays/uniform_1d: add full __init__ docstring; fix "Make Array2D"
comment → "Make Array1D"
- grids/grid_2d_util: fix "he " → "The" (×2); fix "silm" → "slim";
fix "flloat" → "float" (×2); fix mask_2d param name in grid_2d_slim_from;
add docstrings to convert_grid, check_grid_slim, check_grid_2d,
check_grid_2d_and_mask_2d
- grids/grid_1d_util: rewrite convert_grid_1d docstring (was
copy-pasted from Grid2D with wrong class/param names grid_2d/mask_2d);
fix grid_1d_slim_via_mask_from ("2D mask" → "1D mask", wrong example)
- grids/uniform_1d: fix __init__ params (was "(y,x)" for a 1D grid);
fix no_mask params and example ("autogrid", "np.ndgrid", "Grid2D");
fix __native__ section referencing Grid2D instead of Grid1D
- grids/irregular_2d: add docstrings to values, slim, native properties;
fix "*Coordinate* instance" → "Grid2DIrregular instance" (×2)
- visibilities: fix "visibilitiy" typo
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
abstract_structure.pygeometry,derive_grid,derive_indexes,derive_mask,shape_slim,shape_native,pixel_scales,pixel_scale,header_dict,pixel_area,total_area,origin,unmasked_grid,total_pixelstrimmed_after_convolution_fromfrom a bareNotImplementedErrorto a descriptive docstringarrays/uniform_2d.pyheader,skip_mask,xpparams to__init__in_counts,in_counts_per_second,original_orientation,readout_offsetsbrightest_sub_pixel_coordinate_in_region_fromno_maskexample: was callingaa.Array2D.manual(non-existent) with a syntax error (trailing period on pixel scale)arrays/array_2d_util.pyconvert_arraydescription ("input array input a convert" → clear description)check_array_2dresized_array_2d_fromindex_slim_for_index_2d_fromexample (index_flat_for_index_2d_from→ correct name)array_2d_nativeparameter inarray_2d_slim_fromarrays/irregular.py/arrays/uniform_1d.pyArrayIrregular.values,ArrayIrregular.nativeArray1D.__init__docstring (was completely missing)grids/grid_2d_util.pymask_2d→maskparameter name ingrid_2d_slim_fromdocstringconvert_grid,check_grid_slim,check_grid_2d,check_grid_2d_and_mask_2dgrids/grid_1d_util.pyconvert_grid_1ddocstring (was copy-pasted from Grid2D with wrong class namesGrid2D/grid_2d/mask_2d)grid_1d_slim_via_mask_from(said "2D mask array" for a 1D function; wrong example syntax)grids/uniform_1d.py__init__params (was "(y,x)" and "2D mask" for a 1D grid)no_maskexample: wrong importautogrid, wrong functionnp.ndgrid, wrong label "Grid2D"__native__section that referencedGrid2Dinstead ofGrid1Dgrids/irregular_2d.pyvalues,slim,nativeproperties*Coordinate* instance" → "Grid2DIrregularinstance" (×2)visibilities.pyTest plan
python -c "import autoarray"🤖 Generated with Claude Code