Skip to content

Commit

Permalink
Spelling and other comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Mar 25, 2024
1 parent c86cf22 commit c8d4cb3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 15 deletions.
1 change: 1 addition & 0 deletions .codespell-dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
moasic->mosaic
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion docs/howto_guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ These How-To Guides will guide you through a specific task.
.. toctree::
:maxdepth: 1

reproject_vbi_moasic
reproject_vbi_mosaic
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
```

Expand All @@ -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
Expand Down Expand Up @@ -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`.
2 changes: 1 addition & 1 deletion docs/tutorial/5_downloading_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/6_visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
```

Expand Down

0 comments on commit c8d4cb3

Please sign in to comment.