Skip to content

Commit 7ab38e7

Browse files
committed
docs: Finish example notebook, Add example animations
1 parent e6a7887 commit 7ab38e7

File tree

6 files changed

+151
-86
lines changed

6 files changed

+151
-86
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ Cleaned image
106106
.. image:: ./assets/examples/elias24_example_clean.png
107107
:width: 49.5%
108108

109+
Animations
110+
==========
111+
109112
Acknowledgment
110113
==============
111114
This research made use of the data provided by the DSHARP:
7.15 MB
Binary file not shown.

assets/examples/animation_full.mp4

6.02 MB
Binary file not shown.

examples/animation.ipynb

Lines changed: 137 additions & 84 deletions
Large diffs are not rendered by default.
207 KB
Loading

src/pyvisgrid/plotting/animations.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def plot_observation_state(
386386
----------
387387
388388
gridder : Gridder
389-
The ``Gridder`` whith which the series was gridded.
389+
The ``Gridder`` with which the series was gridded.
390390
391391
vis_data : GridData
392392
The grid data returned by the Gridder.
@@ -959,6 +959,7 @@ def animate_observation(
959959
dirty_image_mode: str = "real",
960960
mask_mode: str = "amp_phase",
961961
swap_masks: bool = False,
962+
mask_crop: tuple[list[float | None]] = ([None, None], [None, None]),
962963
axes_options: dict | None = None,
963964
show_progress: bool = True,
964965
dpi: int | str = "figure",
@@ -969,7 +970,7 @@ def animate_observation(
969970
----------
970971
971972
gridder : Gridder
972-
The ``Gridder`` whith which the series was gridded.
973+
The ``Gridder`` with which the series was gridded.
973974
974975
series : GridDataSeries
975976
The series of gridded observations.
@@ -1047,6 +1048,13 @@ def animate_observation(
10471048
``mask_lo = phase | imaginary``.
10481049
Default is ``False``.
10491050
1051+
mask_crop : tuple[list[float | None]], optional
1052+
The crop of the masks. This has to have the format
1053+
``([x_left, x_right], [y_left, y_right])``, where the left and right
1054+
values for each axis are the upper and lower limits of the axes which
1055+
should be shown.
1056+
Default is `([None, None], [None, None])`
1057+
10501058
axes_options : dict | None, optional
10511059
Options for the different subplots of the mosaic plot. The given dictionary will
10521060
be merged with the default option dictionary. This means that options which
@@ -1158,6 +1166,7 @@ def _progress_func(_i, _n):
11581166
plot_positions=plot_positions,
11591167
mask_mode=mask_mode,
11601168
swap_masks=swap_masks,
1169+
mask_crop=mask_crop,
11611170
axes_options=axes_options,
11621171
)
11631172

0 commit comments

Comments
 (0)