Skip to content

Commit 8dd8755

Browse files
Jammy2211Jammy2211
authored andcommitted
aatempted docstrings but wait until internet for AI
1 parent a0e4d0e commit 8dd8755

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

autoarray/mask/derive/zoom_2d.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,44 @@
88
class Zoom2D:
99

1010
def __init__(self, mask: Union[np.ndarray, List]):
11+
"""
12+
Derives a zoomed in `Mask2D` object from a `Mask2D` object, which is typically used to visualize 2D arrays
13+
zoomed in to only the unmasked region an analysis is performed on.
14+
15+
A `Mask2D` masks values which are associated with a uniform 2D rectangular grid of pixels, where unmasked
16+
entries (which are `False`) are used in subsequent calculations and masked values (which are `True`) are
17+
omitted (for a full description see the :meth:`Mask2D` class API
18+
documentation <autoarray.mask.mask_2d.Mask2D.__new__>`).
19+
20+
The `Zoom2D` object calculations many different zoomed in qu
21+
22+
Parameters
23+
----------
24+
mask
25+
The `Mask2D` from which zoomed in `Mask2D` objects are derived.
26+
27+
Examples
28+
--------
1129
30+
.. code-block:: python
31+
32+
import autoarray as aa
33+
34+
mask_2d = aa.Mask2D(
35+
mask=[
36+
[True, True, True, True, True],
37+
[True, False, False, False, True],
38+
[True, False, False, False, True],
39+
[True, False, False, False, True],
40+
[True, True, True, True, True],
41+
],
42+
pixel_scales=1.0,
43+
)
44+
45+
zoom_2d = aa.Zoom2D(mask=mask_2d)
46+
47+
print(zoom_2d.centre)
48+
"""
1249
self.mask = mask
1350

1451
@property

0 commit comments

Comments
 (0)