From c8d4cb3fb4ddf4e44b25d48dc745f4ae49739d91 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 25 Mar 2024 15:00:14 +0000 Subject: [PATCH] Spelling and other comments --- .codespell-dict.txt | 1 + .pre-commit-config.yaml | 2 +- docs/howto_guides/index.rst | 2 +- ...roject_vbi_moasic.md => reproject_vbi_mosaic.md} | 13 ++----------- docs/tutorial/5_downloading_data.md | 2 +- docs/tutorial/6_visualization.md | 2 +- 6 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 .codespell-dict.txt rename docs/howto_guides/{reproject_vbi_moasic.md => reproject_vbi_mosaic.md} (90%) diff --git a/.codespell-dict.txt b/.codespell-dict.txt new file mode 100644 index 00000000..6bac8561 --- /dev/null +++ b/.codespell-dict.txt @@ -0,0 +1 @@ +moasic->mosaic diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 93fa42e2..a2115b9b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: rev: v2.2.6 hooks: - id: codespell - args: [ "--write-changes" ] + args: [ "--write-changes", "-D", "-", "-D", ".codespell-dict.txt"] ci: autofix_prs: false autoupdate_schedule: "weekly" diff --git a/docs/howto_guides/index.rst b/docs/howto_guides/index.rst index 4e144625..c27dd1c8 100644 --- a/docs/howto_guides/index.rst +++ b/docs/howto_guides/index.rst @@ -8,4 +8,4 @@ These How-To Guides will guide you through a specific task. .. toctree:: :maxdepth: 1 - reproject_vbi_moasic + reproject_vbi_mosaic diff --git a/docs/howto_guides/reproject_vbi_moasic.md b/docs/howto_guides/reproject_vbi_mosaic.md similarity index 90% rename from docs/howto_guides/reproject_vbi_moasic.md rename to docs/howto_guides/reproject_vbi_mosaic.md index 448cd6c5..5b628d7e 100644 --- a/docs/howto_guides/reproject_vbi_moasic.md +++ b/docs/howto_guides/reproject_vbi_mosaic.md @@ -12,7 +12,7 @@ kernelspec: name: python3 --- -# Stitching a VBI Moasic with `reproject` +# Stitching a VBI Mosaic with `reproject` The [reproject](https://reproject.readthedocs.io/) package is an Astropy-affiliated package for regridding data. A number of different algorithms are implemented in the package, with different trade-offs for speed and accuracy. @@ -70,6 +70,7 @@ first_tiles = [tile[0] for tile in ds.flat] :tags: [skip-execution] for i, tile in enumerate(first_tiles): + # Wait for only the last download to finish tile.files.download(wait=i == len(first_tiles) - 1) ``` @@ -88,14 +89,6 @@ fig.tight_layout() ## Regridding with Reproject -First, we need the most recent version of reproject (released on Friday) for this to work, so let's check: - -```{code-cell} ipython3 -import reproject -``` - -Now import everything we need for it to run - ```{code-cell} ipython3 from reproject.mosaicking import find_optimal_celestial_wcs, reproject_and_coadd from reproject import reproject_interp @@ -144,5 +137,3 @@ plt.figure(figsize=(10,10)) stitched = NDCube(arr, reference_wcs) stitched.plot() ``` - -We can see some small artifacting which can be hidden by using the `match_background=True` keyword argument to `reproject_and_coadd`. diff --git a/docs/tutorial/5_downloading_data.md b/docs/tutorial/5_downloading_data.md index da64cbe1..fd6066e3 100644 --- a/docs/tutorial/5_downloading_data.md +++ b/docs/tutorial/5_downloading_data.md @@ -75,7 +75,7 @@ But remember that whatever path you specify must be accessible by Globus Connect ```{code-cell} ipython3 :tags: [skip-execution] -ds[0, 0].files.download(path="~/somewhere/globus/cant/reach/") # will hang for a while and then fail +ds[0, 0].files.download(path="~/not/really/a/path/") # will hang for a while and then fail ``` The `path` keyword will replace placeholders in the path in the same way as we saw with `Fido.fetch()`. diff --git a/docs/tutorial/6_visualization.md b/docs/tutorial/6_visualization.md index 90b64a94..ea0d26b1 100644 --- a/docs/tutorial/6_visualization.md +++ b/docs/tutorial/6_visualization.md @@ -108,7 +108,7 @@ For the next few examples we'll go back to using some VBI data. res = Fido.search(a.dkist.Dataset("AJQWW")) asdf_file = Fido.fetch(res, path="~/dkist_data/{dataset_id}") -# We extract the top left tile of the VBI moasic +# We extract the top left tile of the VBI mosaic ds = dkist.load_dataset(asdf_file)[0, 0] ```