-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test FITS reader on Hubble Space Telescope data (#363)
* add test for FITS reader that checks if it can open Hubble data on AWS correctly * fix minor bug with fits reader arguments having to be specified explicitly * rename network -> requires_network to be more consistent with other test decorators * remove ToDO * release note * re-trigger CI
- Loading branch information
1 parent
7f1232f
commit d4f6b98
Showing
6 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import pytest | ||
from xarray import Dataset | ||
|
||
from virtualizarr import open_virtual_dataset | ||
from virtualizarr.tests import requires_kerchunk, requires_network | ||
|
||
pytest.importorskip("astropy") | ||
|
||
|
||
@requires_kerchunk | ||
@requires_network | ||
def test_open_hubble_data(): | ||
# data from https://registry.opendata.aws/hst/ | ||
vds = open_virtual_dataset( | ||
"s3://stpubdata/hst/public/f05i/f05i0201m/f05i0201m_a1f.fits", | ||
reader_options={"storage_options": {"anon": True}}, | ||
) | ||
|
||
assert isinstance(vds, Dataset) | ||
assert list(vds.variables) == ["PRIMARY"] | ||
var = vds["PRIMARY"].variable | ||
assert var.sizes == {"y": 17, "x": 589} | ||
assert var.dtype == ">i4" |