|
8 | 8 | class Zoom2D: |
9 | 9 |
|
10 | 10 | 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 | + -------- |
11 | 29 |
|
| 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 | + """ |
12 | 49 | self.mask = mask |
13 | 50 |
|
14 | 51 | @property |
|
0 commit comments