dkist 1.7.0__tar.gz → 1.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dkist-1.8.0/.circleci/codecov_upload.sh +9 -0
- dkist-1.8.0/.circleci/config.yml +113 -0
- dkist-1.8.0/.circleci/early_exit.sh +6 -0
- {dkist-1.7.0 → dkist-1.8.0}/.cruft.json +1 -1
- {dkist-1.7.0 → dkist-1.8.0}/.github/workflows/codspeed.yml +2 -1
- {dkist-1.7.0 → dkist-1.8.0}/.github/workflows/main.yml +8 -3
- {dkist-1.7.0 → dkist-1.8.0}/.pre-commit-config.yaml +1 -1
- dkist-1.8.0/.readthedocs.yaml +33 -0
- {dkist-1.7.0 → dkist-1.8.0}/.rtd-environment.yml +1 -1
- {dkist-1.7.0 → dkist-1.8.0}/CHANGELOG.rst +25 -0
- {dkist-1.7.0 → dkist-1.8.0}/PKG-INFO +10 -1
- {dkist-1.7.0 → dkist-1.8.0}/README.rst +9 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/__init__.py +17 -1
- {dkist-1.7.0 → dkist-1.8.0}/dkist/_version.py +2 -2
- {dkist-1.7.0 → dkist-1.8.0}/dkist/conftest.py +9 -0
- dkist-1.8.0/dkist/data/_sample.py +110 -0
- dkist-1.8.0/dkist/data/api_search_values.json +1 -0
- dkist-1.8.0/dkist/data/sample.py +27 -0
- dkist-1.8.0/dkist/data/test/large_vbi.asdf.gz +0 -0
- dkist-1.8.0/dkist/data/tests/test_sample.py +38 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/loader.py +34 -25
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/tests/test_plotting.py +5 -3
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/tests/test_tiled_dataset.py +33 -1
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/tiled_dataset.py +65 -1
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/utils.py +81 -37
- dkist-1.8.0/dkist/tests/figure_hashes_mpl_391_ft_261_astropy_611_animators_111_ndcube_222.json +11 -0
- dkist-1.8.0/dkist/tests/helpers.py +49 -0
- dkist-1.8.0/dkist/tests/test_benchmarks.py +129 -0
- dkist-1.8.0/dkist/utils/tests/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/wcs/models.py +1 -1
- dkist-1.8.0/dkist/wcs/tests/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/wcs/tests/test_models.py +39 -1
- {dkist-1.7.0 → dkist-1.8.0}/dkist.egg-info/PKG-INFO +10 -1
- {dkist-1.7.0 → dkist-1.8.0}/dkist.egg-info/SOURCES.txt +10 -0
- dkist-1.8.0/dkist.egg-info/top_level.txt +1 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/2_search_and_asdf_download.md +1 -1
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/3_the_dataset.md +1 -1
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/4_more_dataset.md +1 -1
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/5_downloading_data.md +2 -2
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/6_visualization.md +2 -2
- {dkist-1.7.0 → dkist-1.8.0}/docs/whatsnew/1.0.rst +7 -7
- {dkist-1.7.0 → dkist-1.8.0}/pyproject.toml +10 -2
- {dkist-1.7.0 → dkist-1.8.0}/pytest.ini +5 -2
- {dkist-1.7.0 → dkist-1.8.0}/tox.ini +17 -2
- dkist-1.7.0/.readthedocs.yaml +0 -34
- dkist-1.7.0/dkist/data/api_search_values.json +0 -1
- dkist-1.7.0/dkist/data/sample.py +0 -9
- dkist-1.7.0/dkist/tests/test_benchmarks.py +0 -37
- dkist-1.7.0/dkist.egg-info/top_level.txt +0 -4
- {dkist-1.7.0 → dkist-1.8.0}/.codecov.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.codespell-dict.txt +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.codespellrc +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.coveragerc +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.flake8 +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.github/ISSUE_TEMPLATE/BUG_REPORT.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.github/dependabot.yml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.github/workflows/prepare-release.yml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.github/workflows/sub_package_update.yml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.gitignore +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.gitmodules +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.isort.cfg +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/.ruff.toml +0 -0
- /dkist-1.7.0/dkist/data/__init__.py → /dkist-1.8.0/=3.1.0 +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/CODE_OF_CONDUCT.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/CONTRIBUTING.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/LICENSE.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/MANIFEST.in +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/changelog/README.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/conftest.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/config/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/README.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/VISP_HEADER.hdr +0 -0
- {dkist-1.7.0/dkist/dataset/tests → dkist-1.8.0/dkist/data}/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/5d_gwcs.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/AGLKO-inv.ecsv +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.000010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.020010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.030011_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.040010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.050010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.060010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.080010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.090010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.100010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.110010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/efz20040301.120010_s.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/EIT/eit_test_dataset.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/eit_dataset-0.1.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/eit_dataset-0.2.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/eit_dataset-0.3.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/eit_dataset-1.0.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/eit_dataset-1.1.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/eit_dataset-1.2.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/globus_operation_ls_response.json +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/globus_search_response.json +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/large_visp.asdf.gz +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/small_visp/0.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/small_visp/1.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/small_visp/2.fits +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/small_visp/test_visp.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/test_old_wcs_BRMQY.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/test_tiled_dataset-1.0.0_dataset-1.0.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/test_tiled_dataset-1.0.0_dataset-1.1.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/test_tiled_dataset-1.0.0_dataset-1.2.0.asdf +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/data/test/visp_no_headers.asdf.gz +0 -0
- {dkist-1.7.0/dkist/io/asdf → dkist-1.8.0/dkist/data/tests}/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/dataset.py +0 -0
- {dkist-1.7.0/dkist/io/asdf/resources → dkist-1.8.0/dkist/dataset/tests}/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/tests/test_dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dataset/tests/test_load_dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/dkist.cfg +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/extern/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/__init__.py +0 -0
- {dkist-1.7.0/dkist/io/asdf/tests → dkist-1.8.0/dkist/io/asdf}/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/converters/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/converters/dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/converters/file_manager.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/converters/models.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/converters/tiled_dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/entry_points.py +0 -0
- {dkist-1.7.0/dkist/io/tests → dkist-1.8.0/dkist/io/asdf/resources}/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/manifests/dkist-0.9.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/manifests/dkist-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/manifests/dkist-1.1.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/manifests/dkist-1.2.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/manifests/dkist-wcs-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/manifests/dkist-wcs-1.1.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/manifests/dkist-wcs-1.2.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/manifests/dkist-wcs-1.3.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/asymmetric_mapping_model-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/asymmetric_mapping_model-1.1.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/coupled_compound_model-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/coupled_compound_model-1.1.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/dataset-0.1.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/dataset-0.2.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/dataset-0.3.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/dataset-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/dataset-1.1.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/file_manager-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/ravel_model-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/ravel_model-1.1.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/tiled_dataset-0.1.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/tiled_dataset-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/varying_celestial_transform-1.0.0.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/resources/schemas/varying_celestial_transform-1.1.0.yaml +0 -0
- {dkist-1.7.0/dkist/net/globus → dkist-1.8.0/dkist/io/asdf}/tests/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/tests/conftest.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/tests/test_dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/tests/test_models.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/asdf/tests/test_tiled_dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/dask_utils.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/file_manager.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/level_1_dataset_schema.yaml +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/loaders.py +0 -0
- {dkist-1.7.0/dkist/net → dkist-1.8.0/dkist/io}/tests/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/tests/test_file_manager.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/io/tests/test_fits.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/logger.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/attr_walker.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/attrs.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/attrs_values.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/client.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/globus/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/globus/auth.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/globus/endpoints.py +0 -0
- {dkist-1.7.0/dkist/utils → dkist-1.8.0/dkist/net/globus}/tests/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/globus/tests/conftest.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/globus/tests/test_auth.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/globus/tests/test_endpoints.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/globus/tests/test_transfer.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/globus/transfer.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/helpers.py +0 -0
- {dkist-1.7.0/dkist/wcs → dkist-1.8.0/dkist/net}/tests/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/tests/conftest.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/tests/strategies.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/tests/test_attr_walker.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/tests/test_attrs.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/tests/test_attrs_values.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/tests/test_client.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/net/tests/test_helpers.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/tests/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/tests/generate_aia_dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/tests/generate_eit_test_dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/tests/generate_eit_tiled_dataset.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/tests/test_logger.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/utils/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/utils/_model_to_graphviz.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/utils/decorators.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/utils/exceptions.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/utils/inventory.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/utils/sysinfo.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/utils/tests/test_inventory.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/utils/tests/test_sysinfo.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/version.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/wcs/__init__.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist/wcs/tests/test_coupled_compound_model.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist.egg-info/dependency_links.txt +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist.egg-info/entry_points.txt +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist.egg-info/not-zip-safe +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/dkist.egg-info/requires.txt +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/Makefile +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/conf.py +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/developer.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/howto_guides/index.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/howto_guides/reproject_vbi_mosaic.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/index.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/installation.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/logo/icon_square.jpg +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/make.bat +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/reference.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/topic_guides/index.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/topic_guides/level1data.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/topic_guides/loading.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/topic_guides/net.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/topic_guides/usertools.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/1_astropy_and_sunpy.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/1_astropy_and_sunpy_NOTES.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/2_search_and_asdf_download_NOTES.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/3_the_dataset_NOTES.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/tutorial/index.md +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/whatsnew/1.1.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/whatsnew/changelog.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/docs/whatsnew/index.rst +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/setup.cfg +0 -0
- {dkist-1.7.0 → dkist-1.8.0}/setup.py +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/bin/bash -e
|
|
2
|
+
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
|
|
3
|
+
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
|
4
|
+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
|
5
|
+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
|
|
6
|
+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
|
|
7
|
+
shasum -a 256 -c codecov.SHA256SUM
|
|
8
|
+
chmod +x codecov
|
|
9
|
+
./codecov "$@"
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
version: 2.1
|
|
2
|
+
|
|
3
|
+
no-backports: &no-backports
|
|
4
|
+
name: Skip any branches called cherry-pick
|
|
5
|
+
command: |
|
|
6
|
+
if [[ "${CIRCLE_BRANCH}" == *"cherry-pick"* || "${CIRCLE_BRANCH}" == *"backport"* ]]; then
|
|
7
|
+
circleci step halt
|
|
8
|
+
fi
|
|
9
|
+
|
|
10
|
+
skip-check: &skip-check
|
|
11
|
+
name: Check for [ci skip]
|
|
12
|
+
command: bash .circleci/early_exit.sh
|
|
13
|
+
|
|
14
|
+
merge-check: &merge-check
|
|
15
|
+
name: Check if we need to merge upstream main
|
|
16
|
+
command: |
|
|
17
|
+
if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then
|
|
18
|
+
git fetch origin --tags
|
|
19
|
+
git fetch origin +refs/pull/$CIRCLE_PR_NUMBER/merge:pr/$CIRCLE_PR_NUMBER/merge
|
|
20
|
+
git checkout -qf pr/$CIRCLE_PR_NUMBER/merge
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
apt-run: &apt-install
|
|
24
|
+
name: Install apt packages
|
|
25
|
+
command: |
|
|
26
|
+
sudo apt update
|
|
27
|
+
sudo apt install -y libopenjp2-7
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
figure:
|
|
31
|
+
parameters:
|
|
32
|
+
jobname:
|
|
33
|
+
type: string
|
|
34
|
+
docker:
|
|
35
|
+
- image: cimg/python:3.12
|
|
36
|
+
environment:
|
|
37
|
+
TOXENV=<< parameters.jobname >>
|
|
38
|
+
steps:
|
|
39
|
+
- run: *no-backports
|
|
40
|
+
- checkout
|
|
41
|
+
- run: *skip-check
|
|
42
|
+
- run: *merge-check
|
|
43
|
+
- run: *apt-install
|
|
44
|
+
- run: pip install --user -U tox tox-pypi-filter
|
|
45
|
+
- run: tox -v
|
|
46
|
+
- run:
|
|
47
|
+
name: Running codecov
|
|
48
|
+
command: bash -e .circleci/codecov_upload.sh -f ".tmp/${TOXENV}/coverage.xml"
|
|
49
|
+
- store_artifacts:
|
|
50
|
+
path: .tmp/<< parameters.jobname >>/figure_test_images
|
|
51
|
+
|
|
52
|
+
deploy-reference-images:
|
|
53
|
+
parameters:
|
|
54
|
+
jobname:
|
|
55
|
+
type: string
|
|
56
|
+
docker:
|
|
57
|
+
- image: cimg/python:3.12
|
|
58
|
+
environment:
|
|
59
|
+
TOXENV: << parameters.jobname >>
|
|
60
|
+
GIT_SSH_COMMAND: ssh -i ~/.ssh/id_rsa_7b8fc81c13a3b446ec9aa50d3f626978
|
|
61
|
+
steps:
|
|
62
|
+
- checkout
|
|
63
|
+
- run: *skip-check
|
|
64
|
+
- run: *merge-check
|
|
65
|
+
- run: *apt-install
|
|
66
|
+
# Clear out all the ssh keys so that it always uses the write deploy key
|
|
67
|
+
- run: ssh-add -D
|
|
68
|
+
# Add private key for deploying to the figure tests repo
|
|
69
|
+
- add_ssh_keys:
|
|
70
|
+
fingerprints: "SHA256:vf80el6ZY/FiLKo+eXblG/DQfCuJBwrQvH1S37vjG5I"
|
|
71
|
+
- run: ssh-keyscan github.com >> ~/.ssh/known_hosts
|
|
72
|
+
- run: git config --global user.email "dkist@circleci" && git config --global user.name "DKIST Circle CI"
|
|
73
|
+
- run: git clone git@github.com:DKISTDC/dkist-figure-tests.git --depth 1 -b dkist-${CIRCLE_BRANCH} ~/dkist-figure-tests/
|
|
74
|
+
# Generate Reference images
|
|
75
|
+
- run: pip install --user -U tox tox-pypi-filter
|
|
76
|
+
- run: rm -rf /home/circleci/dkist-figure-tests/figures/$TOXENV/*
|
|
77
|
+
- run: tox -v -- --mpl-generate-path=/home/circleci/dkist-figure-tests/figures/$TOXENV | tee toxlog
|
|
78
|
+
- run: |
|
|
79
|
+
hashlib=$(grep "^figure_hashes.*\.json$" toxlog)
|
|
80
|
+
cp ./dkist/tests/$hashlib /home/circleci/dkist-figure-tests/figures/$TOXENV/
|
|
81
|
+
- run: |
|
|
82
|
+
cd ~/dkist-figure-tests/
|
|
83
|
+
git pull
|
|
84
|
+
git status
|
|
85
|
+
git add .
|
|
86
|
+
git commit -m "Update reference figures from ${CIRCLE_BRANCH}" || echo "No changes to reference images to deploy"
|
|
87
|
+
git push
|
|
88
|
+
|
|
89
|
+
workflows:
|
|
90
|
+
version: 2
|
|
91
|
+
|
|
92
|
+
figure-tests:
|
|
93
|
+
jobs:
|
|
94
|
+
- figure:
|
|
95
|
+
name: << matrix.jobname >>
|
|
96
|
+
matrix:
|
|
97
|
+
parameters:
|
|
98
|
+
jobname:
|
|
99
|
+
- "py312-figure"
|
|
100
|
+
|
|
101
|
+
- deploy-reference-images:
|
|
102
|
+
name: baseline-<< matrix.jobname >>
|
|
103
|
+
matrix:
|
|
104
|
+
parameters:
|
|
105
|
+
jobname:
|
|
106
|
+
- "py312-figure"
|
|
107
|
+
requires:
|
|
108
|
+
- << matrix.jobname >>
|
|
109
|
+
filters:
|
|
110
|
+
branches:
|
|
111
|
+
only:
|
|
112
|
+
- main
|
|
113
|
+
- figuretests
|
|
@@ -16,8 +16,9 @@ jobs:
|
|
|
16
16
|
with:
|
|
17
17
|
python-version: '3.12'
|
|
18
18
|
- run: python -m pip install .[tests] pytest-codspeed 'numpy<2'
|
|
19
|
+
- run: python -c "from dkist.data.sample import download_all_sample_data; download_all_sample_data()"
|
|
19
20
|
- name: Run benchmarks
|
|
20
|
-
uses: CodspeedHQ/action@
|
|
21
|
+
uses: CodspeedHQ/action@v3
|
|
21
22
|
with:
|
|
22
23
|
token: ${{ secrets.CODSPEED_TOKEN }}
|
|
23
24
|
run: "pytest -vvv -r fEs --pyargs dkist --codspeed"
|
|
@@ -83,13 +83,18 @@ jobs:
|
|
|
83
83
|
|
|
84
84
|
publish:
|
|
85
85
|
needs: [tests]
|
|
86
|
-
if:
|
|
86
|
+
if: |
|
|
87
|
+
github.event_name != 'pull_request' || (
|
|
88
|
+
github.event_name == 'pull_request' &&
|
|
89
|
+
contains(github.event.pull_request.labels.*.name, 'Run publish')
|
|
90
|
+
)
|
|
87
91
|
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@main
|
|
88
92
|
with:
|
|
89
93
|
python-version: '3.10'
|
|
90
94
|
test_extras: tests
|
|
91
|
-
test_command: pytest --pyargs dkist
|
|
92
|
-
|
|
95
|
+
test_command: pytest --pyargs dkist -k "not test_fail"
|
|
96
|
+
# We have to work around a github runner bug here: https://github.com/actions/runner/issues/2788#issuecomment-2145922705
|
|
97
|
+
upload_to_pypi: ${{ startsWith(github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name), 'refs/tags/v') && !endsWith(github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name), '.dev') }}
|
|
93
98
|
secrets:
|
|
94
99
|
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
|
|
95
100
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
build:
|
|
4
|
+
os: ubuntu-lts-latest
|
|
5
|
+
tools:
|
|
6
|
+
python: "mambaforge-latest"
|
|
7
|
+
jobs:
|
|
8
|
+
post_checkout:
|
|
9
|
+
- git fetch --unshallow || true
|
|
10
|
+
pre_install:
|
|
11
|
+
- git update-index --assume-unchanged .rtd-environment.yml docs/conf.py
|
|
12
|
+
pre_build:
|
|
13
|
+
# Note $DKIST_SAMPLE_DIR is set by RTD to ~/dkist_data
|
|
14
|
+
- python -c "from dkist.data.sample import download_all_sample_data; download_all_sample_data()"
|
|
15
|
+
- python -c "from dkist.data.sample import VISP_BKPLX; print(VISP_BKPLX)"
|
|
16
|
+
|
|
17
|
+
conda:
|
|
18
|
+
environment: .rtd-environment.yml
|
|
19
|
+
|
|
20
|
+
sphinx:
|
|
21
|
+
builder: html
|
|
22
|
+
configuration: docs/conf.py
|
|
23
|
+
fail_on_warning: false
|
|
24
|
+
|
|
25
|
+
formats:
|
|
26
|
+
- htmlzip
|
|
27
|
+
|
|
28
|
+
python:
|
|
29
|
+
install:
|
|
30
|
+
- method: pip
|
|
31
|
+
extra_requirements:
|
|
32
|
+
- docs
|
|
33
|
+
path: .
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
1.8.0 (2024-09-04)
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
Features
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
- Add various features for easier inspection of `TiledDataset`:
|
|
8
|
+
- `__repr__` method to output basic dataset info;
|
|
9
|
+
- `tiles_shape` property to access data array shape for each individual tile;
|
|
10
|
+
- `slice_tiles()` method to apply the same slice to all datasets. (`#402 <https://github.com/DKISTDC/dkist/pull/402>`_)
|
|
11
|
+
- Add `TiledDataset.plot()` quicklook method. (`#408 <https://github.com/DKISTDC/dkist/pull/408>`_)
|
|
12
|
+
- Add CircleCI config to enable figure comparison testing with pytest_mpl. (`#415 <https://github.com/DKISTDC/dkist/pull/415>`_)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
Trivial/Internal Changes
|
|
16
|
+
------------------------
|
|
17
|
+
|
|
18
|
+
- Add some more benchmarks to track performance of more parts of the user tools. (`#387 <https://github.com/DKISTDC/dkist/pull/387>`_)
|
|
19
|
+
- Add benchmarks for slicing and computing datasets. (`#394 <https://github.com/DKISTDC/dkist/pull/394>`_)
|
|
20
|
+
- Added two partial datasets to `dkist.data.sample` for documentation and testing. (`#421 <https://github.com/DKISTDC/dkist/pull/421>`_)
|
|
21
|
+
- replace usages of ``copy_arrays`` with ``memmap`` for ``asdf>=3.1.0`` (`#422 <https://github.com/DKISTDC/dkist/pull/422>`_)
|
|
22
|
+
- Update Dataset representation for better readability. (`#431 <https://github.com/DKISTDC/dkist/pull/431>`_)
|
|
23
|
+
- SKip a failing test in the release publish build. (`#434 <https://github.com/DKISTDC/dkist/pull/434>`_)
|
|
24
|
+
|
|
25
|
+
|
|
1
26
|
1.7.0 (2024-07-11)
|
|
2
27
|
==================
|
|
3
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dkist
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.8.0
|
|
4
4
|
Summary: DKIST User Tools
|
|
5
5
|
Author-email: NSO / AURA <stuart@cadair.com>
|
|
6
6
|
Project-URL: repository, https://github.com/DKISTDC/dkist
|
|
@@ -107,3 +107,12 @@ Code of Conduct
|
|
|
107
107
|
---------------
|
|
108
108
|
|
|
109
109
|
When you are interacting with the `dkist` project you are asked to follow the SunPy `Code of Conduct <https://sunpy.org/coc>`__.
|
|
110
|
+
|
|
111
|
+
Releasing The `dkist` package
|
|
112
|
+
-----------------------------
|
|
113
|
+
|
|
114
|
+
Doing a release of this package is automated using GitHub actions, the release can be done following these steps:
|
|
115
|
+
|
|
116
|
+
1. Run the pre-release workflow on GitHub actions, this can be done by clicking "run workflow" `here <https://github.com/DKISTDC/dkist/actions/workflows/prepare-release.yml>`__.
|
|
117
|
+
2. That workflow will have opened a PR, you should review it and merge it as normal.
|
|
118
|
+
3. That workflow will also have drafted a GitHub release `here <https://github.com/DKISTDC/dkist/releases>`__, once the PR is merged you can publish that release, this will trigger the rest as long as the CI passes.
|
|
@@ -52,3 +52,12 @@ Code of Conduct
|
|
|
52
52
|
---------------
|
|
53
53
|
|
|
54
54
|
When you are interacting with the `dkist` project you are asked to follow the SunPy `Code of Conduct <https://sunpy.org/coc>`__.
|
|
55
|
+
|
|
56
|
+
Releasing The `dkist` package
|
|
57
|
+
-----------------------------
|
|
58
|
+
|
|
59
|
+
Doing a release of this package is automated using GitHub actions, the release can be done following these steps:
|
|
60
|
+
|
|
61
|
+
1. Run the pre-release workflow on GitHub actions, this can be done by clicking "run workflow" `here <https://github.com/DKISTDC/dkist/actions/workflows/prepare-release.yml>`__.
|
|
62
|
+
2. That workflow will have opened a PR, you should review it and merge it as normal.
|
|
63
|
+
3. That workflow will also have drafted a GitHub release `here <https://github.com/DKISTDC/dkist/releases>`__, once the PR is merged you can publish that release, this will trigger the rest as long as the CI passes.
|
|
@@ -4,7 +4,10 @@ The DKIST package aims to help you search, obtain and use DKIST data as part of
|
|
|
4
4
|
from importlib.metadata import PackageNotFoundError
|
|
5
5
|
from importlib.metadata import version as _version
|
|
6
6
|
|
|
7
|
+
import platformdirs as _platformdirs
|
|
8
|
+
|
|
7
9
|
from .logger import setup_default_dkist_logger as _setup_log
|
|
10
|
+
import dkist.config as _config
|
|
8
11
|
|
|
9
12
|
log = _setup_log(__name__)
|
|
10
13
|
|
|
@@ -14,7 +17,7 @@ except PackageNotFoundError:
|
|
|
14
17
|
__version__ = "unknown"
|
|
15
18
|
|
|
16
19
|
|
|
17
|
-
__all__ = ["TiledDataset", "Dataset", "load_dataset", "system_info"]
|
|
20
|
+
__all__ = ["TiledDataset", "Dataset", "load_dataset", "system_info", "conf"]
|
|
18
21
|
|
|
19
22
|
|
|
20
23
|
def write_default_config(overwrite=False):
|
|
@@ -29,6 +32,19 @@ def write_default_config(overwrite=False):
|
|
|
29
32
|
return _config.create_config_file("dkist", "dkist", overwrite=overwrite)
|
|
30
33
|
|
|
31
34
|
|
|
35
|
+
class Conf(_config.ConfigNamespace):
|
|
36
|
+
"""
|
|
37
|
+
Configuration Parameters for the `dkist` Package.
|
|
38
|
+
"""
|
|
39
|
+
sample_data_directory = _config.ConfigItem(
|
|
40
|
+
_platformdirs.user_data_dir(appname="dkist"),
|
|
41
|
+
"Location to download sample data to."
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
conf = Conf()
|
|
46
|
+
|
|
47
|
+
|
|
32
48
|
# Do internal imports last (so logger etc is initialised)
|
|
33
49
|
from dkist.dataset import Dataset, TiledDataset, load_dataset
|
|
34
50
|
from dkist.utils.sysinfo import system_info
|
|
@@ -282,6 +282,15 @@ def simple_tiled_dataset(dataset):
|
|
|
282
282
|
return TiledDataset(dataset_array, dataset.meta["inventory"])
|
|
283
283
|
|
|
284
284
|
|
|
285
|
+
@pytest.fixture
|
|
286
|
+
def large_tiled_dataset(tmp_path_factory):
|
|
287
|
+
vbidir = tmp_path_factory.mktemp("data")
|
|
288
|
+
with gzip.open(Path(rootdir) / "large_vbi.asdf.gz", mode="rb") as gfo:
|
|
289
|
+
with open(vbidir / "test_vbi.asdf", mode="wb") as afo:
|
|
290
|
+
afo.write(gfo.read())
|
|
291
|
+
return load_dataset(vbidir / "test_vbi.asdf")
|
|
292
|
+
|
|
293
|
+
|
|
285
294
|
@pytest.fixture
|
|
286
295
|
def small_visp_dataset():
|
|
287
296
|
"""
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import tarfile
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from urllib.parse import urljoin
|
|
5
|
+
|
|
6
|
+
from parfive import Downloader, Results
|
|
7
|
+
|
|
8
|
+
from astropy.io import fits
|
|
9
|
+
|
|
10
|
+
from dkist import conf
|
|
11
|
+
|
|
12
|
+
VISP_HEADER = fits.Header.fromtextfile(Path(__file__).parent / "VISP_HEADER.hdr")
|
|
13
|
+
_SAMPLE_DATASETS = {
|
|
14
|
+
"VISP_BKPLX": ("https://g-a36282.cd214.a567.data.globus.org/user_tools_tutorial_data/", "BKPLX_stokesI.tar"),
|
|
15
|
+
"VBI_AJQWW": ("https://g-a36282.cd214.a567.data.globus.org/user_tools_tutorial_data/", "AJQWW_single_mosaic.tar"),
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _download_and_extract_sample_data(names, overwrite, path):
|
|
20
|
+
"""
|
|
21
|
+
Downloads a list of files.
|
|
22
|
+
|
|
23
|
+
Parameters
|
|
24
|
+
----------
|
|
25
|
+
names : list[str]
|
|
26
|
+
The names of the datasets to download and extract
|
|
27
|
+
overwrite : bool
|
|
28
|
+
Will overwrite a file on disk if True.
|
|
29
|
+
path : `pathlib.Path`
|
|
30
|
+
The sample data path to save the tar files
|
|
31
|
+
|
|
32
|
+
Returns
|
|
33
|
+
-------
|
|
34
|
+
`parfive.Results`
|
|
35
|
+
Download results. Will behave like a list of files.
|
|
36
|
+
"""
|
|
37
|
+
dl = Downloader(overwrite=overwrite, progress=True)
|
|
38
|
+
|
|
39
|
+
existing_files = []
|
|
40
|
+
|
|
41
|
+
for name in names:
|
|
42
|
+
base_url, filename = _SAMPLE_DATASETS[name]
|
|
43
|
+
if (filepath := path / filename).exists():
|
|
44
|
+
existing_files.append(filepath)
|
|
45
|
+
continue
|
|
46
|
+
|
|
47
|
+
url = urljoin(base_url, filename)
|
|
48
|
+
dl.enqueue_file(url, path=path)
|
|
49
|
+
|
|
50
|
+
results = Results()
|
|
51
|
+
if dl.queued_downloads:
|
|
52
|
+
results = dl.download()
|
|
53
|
+
results += existing_files
|
|
54
|
+
|
|
55
|
+
file_folder = {filename: name for name, (_, filename) in _SAMPLE_DATASETS.items() if name in names}
|
|
56
|
+
|
|
57
|
+
for i, tarpath in enumerate(results):
|
|
58
|
+
output_path = path / file_folder[Path(tarpath).name]
|
|
59
|
+
with tarfile.open(tarpath, "r:*") as tar:
|
|
60
|
+
tar.extractall(path=output_path, filter=tarfile.fully_trusted_filter)
|
|
61
|
+
results[i] = output_path
|
|
62
|
+
|
|
63
|
+
return results
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _get_sample_datasets(dataset_names, no_download=False, force_download=False):
|
|
67
|
+
"""
|
|
68
|
+
Returns a list of disk locations corresponding to a list of filenames for
|
|
69
|
+
sample data, downloading the sample data files as necessary.
|
|
70
|
+
|
|
71
|
+
Parameters
|
|
72
|
+
----------
|
|
73
|
+
no_download : `bool`
|
|
74
|
+
If ``True``, do not download any files, even if they are not present.
|
|
75
|
+
Default is ``False``.
|
|
76
|
+
force_download : `bool`
|
|
77
|
+
If ``True``, download all files, and overwrite any existing ones.
|
|
78
|
+
Default is ``False``.
|
|
79
|
+
|
|
80
|
+
Returns
|
|
81
|
+
-------
|
|
82
|
+
`list` of `pathlib.Path`
|
|
83
|
+
List of disk locations corresponding to the list of filenames. An entry
|
|
84
|
+
will be ``None`` if ``no_download == True`` and the file is not present.
|
|
85
|
+
|
|
86
|
+
Raises
|
|
87
|
+
------
|
|
88
|
+
RuntimeError
|
|
89
|
+
Raised if any of the files cannot be downloaded from any of the mirrors.
|
|
90
|
+
"""
|
|
91
|
+
sampledata_dir = Path(conf.sample_data_directory)
|
|
92
|
+
if env_override := os.environ.get("DKIST_SAMPLE_DIR"):
|
|
93
|
+
# For some reason, RTD adds ' around the path in the env var.
|
|
94
|
+
sampledata_dir = Path(env_override.strip("'"))
|
|
95
|
+
sampledata_dir = sampledata_dir.expanduser()
|
|
96
|
+
|
|
97
|
+
datasets = dict((k,v) for k, v in _SAMPLE_DATASETS.items() if k in dataset_names) # noqa: C402
|
|
98
|
+
download_paths = [sampledata_dir / fn for _, fn in datasets.values()]
|
|
99
|
+
|
|
100
|
+
if no_download:
|
|
101
|
+
return [sampledata_dir / name for name in datasets.keys() if (sampledata_dir / name).exists()]
|
|
102
|
+
|
|
103
|
+
results = _download_and_extract_sample_data(datasets.keys(), overwrite=force_download, path=sampledata_dir)
|
|
104
|
+
|
|
105
|
+
if results.errors:
|
|
106
|
+
raise RuntimeError(
|
|
107
|
+
f"{len(results.errors)} sample data files failed "
|
|
108
|
+
"to download, the first error is above.") from results.errors[0].exception
|
|
109
|
+
|
|
110
|
+
return list(results)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"parameterValues":[{"parameterName":"createDateMin","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2024-09-02T20:19:56.988017"}},{"parameterName":"createDateMax","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2024-09-02T20:19:56.988017"}},{"parameterName":"endTimeMin","values":{"minValue":"2022-02-23T20:48:55.393500","maxValue":"2024-08-27T21:45:38.497106"}},{"parameterName":"endTimeMax","values":{"minValue":"2022-02-23T20:48:55.393500","maxValue":"2024-08-27T21:45:38.497106"}},{"parameterName":"exposureTimeMin","values":{"minValue":0.037,"maxValue":1380.2332394366197}},{"parameterName":"exposureTimeMax","values":{"minValue":0.037,"maxValue":1380.2332394366197}},{"parameterName":"instrumentNames","values":{"categoricalValues":["CRYO-NIRSP","VBI","VISP"]}},{"parameterName":"qualityAverageFriedParameterMin","values":{"minValue":0.01695005847191685,"maxValue":2.6520787500175156e+30}},{"parameterName":"qualityAverageFriedParameterMax","values":{"minValue":0.01695005847191685,"maxValue":2.6520787500175156e+30}},{"parameterName":"qualityAveragePolarimetricAccuracyMin","values":{"minValue":0.14787299538416715,"maxValue":263.313656131021}},{"parameterName":"qualityAveragePolarimetricAccuracyMax","values":{"minValue":0.14787299538416715,"maxValue":263.313656131021}},{"parameterName":"startTimeMin","values":{"minValue":"2022-02-23T19:05:32.338002","maxValue":"2024-08-27T20:09:46.569864"}},{"parameterName":"startTimeMax","values":{"minValue":"2022-02-23T19:05:32.338002","maxValue":"2024-08-27T20:09:46.569864"}},{"parameterName":"targetTypes","values":{"categoricalValues":["coronalhole","activecorona","quietcorona","prominence","sunspot","spicules","quietsun","plages","unknown","filament"]}},{"parameterName":"averageDatasetSpectralSamplingMin","values":{"minValue":0.000540156130946172,"maxValue":0.004605031614270178}},{"parameterName":"averageDatasetSpectralSamplingMax","values":{"minValue":0.000540156130946172,"maxValue":0.004605031614270178}},{"parameterName":"averageDatasetSpatialSamplingMin","values":{"minValue":0.0,"maxValue":12388.04306084}},{"parameterName":"averageDatasetSpatialSamplingMax","values":{"minValue":0.0,"maxValue":12388.04306084}},{"parameterName":"averageDatasetTemporalSamplingMin","values":{"minValue":7.403500000002339,"maxValue":5263.145059399399}},{"parameterName":"averageDatasetTemporalSamplingMax","values":{"minValue":7.403500000002339,"maxValue":5263.145059399399}},{"parameterName":"highLevelSoftwareVersion","values":{"categoricalValues":["Alakai_10-0","Pono_6.1.5","Pono_2.1.0","Alakai_5-1","Pono_3.1.0","Pono_8.0.0","Alakai_11.1.0","Alakai_6-0","Alakai_8-0","Alakai_7-0","Pono_7.0.0","Pono_1.0.0","Alakai_3-0","Alakai_4-0"]}},{"parameterName":"workflowName","values":{"categoricalValues":["l0_to_l1_visp","l0_to_l1_cryonirsp_sp","l0_to_l1_cryonirsp_ci","l0_to_l1_vbi_summit-calibrated"]}},{"parameterName":"workflowVersion","values":{"categoricalValues":["2.7.4","2.16.4","2.10.3","1.1.7","0.16.0","2.16.7","1.1.10","2.15.0","2.7.2","2.10.15","2.7.0","2.10.1","2.0.2","2.7.3","1.12.1","2.10.12","1.1.5","1.11.1","2.6.1","1.2.1","2.10.13","2.7.5","2.0.1","1.4.8","1.8.2","2.9.0","2.10.7","2.3.1","2.3.0","2.10.0","1.0.0","1.13.0","1.14.7","1.4.11","1.4.1","2.16.0","2.13.1","1.2.0","2.10.2"]}},{"parameterName":"headerDataUnitCreationDateMin","values":{"minValue":"2022-12-08T17:25:51.965000","maxValue":"2024-09-02T16:39:39.678000"}},{"parameterName":"headerDataUnitCreationDateMax","values":{"minValue":"2022-12-08T17:25:51.965000","maxValue":"2024-09-02T16:39:39.678000"}},{"parameterName":"headerVersion","values":{"categoricalValues":["4.3.0","4.6.0","4.0.0","4.1.1","3.4.0","3.9.0","3.5.0","4.2.0","3.6.0","3.3.0","3.0.0","3.7.1","3.8.1","4.5.0"]}}]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module provides some (partial) sample datasets.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from ._sample import _SAMPLE_DATASETS, VISP_HEADER, _get_sample_datasets
|
|
6
|
+
|
|
7
|
+
__all__ = ["download_all_sample_data", *sorted(_SAMPLE_DATASETS.keys()), "VISP_HEADER"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# See PEP 562 (https://peps.python.org/pep-0562/) for module-level __dir__()
|
|
11
|
+
def __dir__():
|
|
12
|
+
return __all__
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# See PEP 562 (https://peps.python.org/pep-0562/) for module-level __getattr__()
|
|
16
|
+
def __getattr__(name):
|
|
17
|
+
if name in _SAMPLE_DATASETS:
|
|
18
|
+
return _get_sample_datasets(name)[0]
|
|
19
|
+
|
|
20
|
+
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def download_all_sample_data():
|
|
24
|
+
"""
|
|
25
|
+
Download all sample data at once that has not already been downloaded.
|
|
26
|
+
"""
|
|
27
|
+
return _get_sample_datasets(_SAMPLE_DATASETS.keys())
|
|
Binary file
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from unittest.mock import call
|
|
3
|
+
|
|
4
|
+
import pytest
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@pytest.fixture
|
|
8
|
+
def tmp_sample_dir(tmp_path):
|
|
9
|
+
old_path = os.environ.get("DKIST_SAMPLE_DIR", "")
|
|
10
|
+
os.environ["DKIST_SAMPLE_DIR"] = str(tmp_path)
|
|
11
|
+
yield tmp_path
|
|
12
|
+
os.environ["DKIST_SAMPLE_DIR"] = old_path
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_module_dir():
|
|
16
|
+
import dkist.data.sample
|
|
17
|
+
|
|
18
|
+
assert "VBI_AJQWW" in dir(dkist.data.sample)
|
|
19
|
+
assert "VISP_BKPLX" in dir(dkist.data.sample)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@pytest.mark.parametrize("attrname", ["VBI_AJQWW", "VISP_BKPLX"])
|
|
23
|
+
def test_module_getattr(mocker, attrname):
|
|
24
|
+
mock = mocker.patch("dkist.data.sample._get_sample_datasets")
|
|
25
|
+
import dkist.data.sample
|
|
26
|
+
|
|
27
|
+
getattr(dkist.data.sample, attrname)
|
|
28
|
+
|
|
29
|
+
mock.assert_has_calls([call(attrname), call().__getitem__(0)])
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@pytest.mark.internet_off
|
|
33
|
+
def test_fail(tmp_sample_dir):
|
|
34
|
+
"""
|
|
35
|
+
No remote data means this test should fail.
|
|
36
|
+
"""
|
|
37
|
+
with pytest.raises(RuntimeError, match="1 sample data files failed"):
|
|
38
|
+
from dkist.data.sample import VISP_BKPLX # noqa: F401
|
|
@@ -14,6 +14,12 @@ except ImportError:
|
|
|
14
14
|
from asdf import ValidationError
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
def asdf_open_memory_mapping_kwarg(memmap: bool) -> dict:
|
|
18
|
+
if asdf.__version__ > "3.1.0":
|
|
19
|
+
return {"memmap": memmap}
|
|
20
|
+
return {"copy_arrays": not memmap}
|
|
21
|
+
|
|
22
|
+
|
|
17
23
|
@singledispatch
|
|
18
24
|
def load_dataset(target):
|
|
19
25
|
"""
|
|
@@ -39,45 +45,48 @@ def load_dataset(target):
|
|
|
39
45
|
Examples
|
|
40
46
|
--------
|
|
41
47
|
|
|
48
|
+
>>> import dkist
|
|
49
|
+
|
|
42
50
|
>>> dkist.load_dataset("/path/to/VISP_L1_ABCDE.asdf") # doctest: +SKIP
|
|
43
51
|
|
|
44
52
|
>>> dkist.load_dataset("/path/to/ABCDE/") # doctest: +SKIP
|
|
45
53
|
|
|
46
54
|
>>> dkist.load_dataset(Path("/path/to/ABCDE")) # doctest: +SKIP
|
|
47
55
|
|
|
48
|
-
>>> from
|
|
49
|
-
>>>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
>>> dkist.load_dataset(files) # doctest: +REMOTE_DATA
|
|
53
|
-
<dkist.dataset.dataset.Dataset object at ...>
|
|
54
|
-
This Dataset has 4 pixel and 5 world dimensions
|
|
56
|
+
>>> from dkist.data.sample import VISP_BKPLX # doctest: +REMOTE_DATA
|
|
57
|
+
>>> print(dkist.load_dataset(VISP_BKPLX)) # doctest: +REMOTE_DATA
|
|
58
|
+
This VISP Dataset BKPLX consists of 1700 frames.
|
|
59
|
+
Files are stored in ...VISP_BKPLX
|
|
55
60
|
<BLANKLINE>
|
|
56
|
-
|
|
61
|
+
This Dataset has 4 pixel and 5 world dimensions.
|
|
57
62
|
<BLANKLINE>
|
|
58
|
-
|
|
63
|
+
The data are represented by a <class 'dask.array.core.Array'> object:
|
|
64
|
+
dask.array<reshape, shape=(4, 425, 980, 2554), dtype=float64, chunksize=(1, 1, 980, 2554), chunktype=numpy.ndarray>
|
|
65
|
+
<BLANKLINE>
|
|
66
|
+
Array Dim Axis Name Data size Bounds
|
|
59
67
|
0 polarization state 4 None
|
|
60
|
-
1 raster scan step number
|
|
61
|
-
2 dispersion axis
|
|
62
|
-
3 spatial along slit
|
|
68
|
+
1 raster scan step number 425 None
|
|
69
|
+
2 dispersion axis 980 None
|
|
70
|
+
3 spatial along slit 2554 None
|
|
63
71
|
<BLANKLINE>
|
|
64
72
|
World Dim Axis Name Physical Type Units
|
|
65
|
-
|
|
66
|
-
|
|
73
|
+
4 stokes phys.polarization.stokes unknown
|
|
74
|
+
3 time time s
|
|
67
75
|
2 helioprojective latitude custom:pos.helioprojective.lat arcsec
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
1 wavelength em.wl nm
|
|
77
|
+
0 helioprojective longitude custom:pos.helioprojective.lon arcsec
|
|
70
78
|
<BLANKLINE>
|
|
71
79
|
Correlation between pixel and world axes:
|
|
72
80
|
<BLANKLINE>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
| PIXEL DIMENSIONS
|
|
82
|
+
| spatial | dispersion | raster scan | polarization
|
|
83
|
+
WORLD DIMENSIONS | along slit | axis | step number | state
|
|
84
|
+
------------------------- | ------------ | ------------ | ------------ | ------------
|
|
85
|
+
helioprojective longitude | x | | x |
|
|
86
|
+
wavelength | | x | |
|
|
87
|
+
helioprojective latitude | x | | x |
|
|
88
|
+
time | | | x |
|
|
89
|
+
stokes | | | | x
|
|
81
90
|
"""
|
|
82
91
|
known_types = _known_types_docs().keys()
|
|
83
92
|
raise TypeError(f"Input type {type(target).__name__} not recognised. It must be one of {', '.join(known_types)}.")
|
|
@@ -156,7 +165,7 @@ def _load_from_asdf(filepath):
|
|
|
156
165
|
try:
|
|
157
166
|
with importlib_resources.as_file(importlib_resources.files("dkist.io") / "level_1_dataset_schema.yaml") as schema_path:
|
|
158
167
|
with asdf.open(filepath, custom_schema=schema_path.as_posix(),
|
|
159
|
-
lazy_load=False,
|
|
168
|
+
lazy_load=False, **asdf_open_memory_mapping_kwarg(memmap=False)) as ff:
|
|
160
169
|
ds = ff.tree["dataset"]
|
|
161
170
|
if isinstance(ds, TiledDataset):
|
|
162
171
|
for sub in ds.flat:
|