dkist 1.9.1__tar.gz → 1.9.2__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.9.1 → dkist-1.9.2}/CHANGELOG.rst +9 -0
- {dkist-1.9.1/dkist.egg-info → dkist-1.9.2}/PKG-INFO +1 -1
- {dkist-1.9.1 → dkist-1.9.2}/dkist/_version.py +2 -2
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/api_search_values.json +1 -1
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/loader.py +85 -7
- dkist-1.9.2/dkist/dataset/tests/test_load_dataset.py +203 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/tests/test_tiled_dataset.py +8 -4
- {dkist-1.9.1 → dkist-1.9.2/dkist.egg-info}/PKG-INFO +1 -1
- {dkist-1.9.1 → dkist-1.9.2}/tox.ini +1 -0
- dkist-1.9.1/dkist/dataset/tests/test_load_dataset.py +0 -116
- {dkist-1.9.1 → dkist-1.9.2}/.circleci/codecov_upload.sh +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.circleci/config.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.circleci/early_exit.sh +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.codecov.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.codespell-dict.txt +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.codespellrc +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.coveragerc +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.cruft.json +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.flake8 +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/ISSUE_TEMPLATE/BUG_REPORT.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/dependabot.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/workflows/build_workshop.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/workflows/codspeed.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/workflows/main.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/workflows/prepare-release.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.github/workflows/sub_package_update.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.gitignore +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.gitmodules +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.isort.cfg +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.pre-commit-config.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.readthedocs.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.rtd-environment.yml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/.ruff.toml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/CODE_OF_CONDUCT.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/CONTRIBUTING.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/LICENSE.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/MANIFEST.in +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/README.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/changelog/README.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/conftest.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/config/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/conftest.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/README.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/VISP_HEADER.hdr +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/_sample.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/sample.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/5d_gwcs.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/AGLKO-inv.ecsv +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.000010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.020010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.030011_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.040010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.050010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.060010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.080010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.090010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.100010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.110010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/efz20040301.120010_s.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/EIT/eit_test_dataset.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/croppable_cryo.asdf.gz +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/croppable_visp.asdf.gz +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/eit_dataset-0.1.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/eit_dataset-0.2.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/eit_dataset-0.3.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/eit_dataset-1.0.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/eit_dataset-1.1.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/eit_dataset-1.2.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/globus_operation_ls_response.json +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/globus_search_response.json +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/large_vbi.asdf.gz +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/large_visp.asdf.gz +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/small_visp/0.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/small_visp/1.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/small_visp/2.fits +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/small_visp/test_visp.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/test_old_wcs_BRMQY.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/test_tiled_dataset-1.0.0_dataset-1.0.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/test_tiled_dataset-1.0.0_dataset-1.1.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/test_tiled_dataset-1.0.0_dataset-1.2.0.asdf +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/test/visp_no_headers.asdf.gz +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/data/tests/test_sample.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/tests/test_crop_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/tests/test_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/tests/test_plotting.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/tiled_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dataset/utils.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/dkist.cfg +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/extern/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/converters/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/converters/dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/converters/file_manager.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/converters/models.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/converters/tiled_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/entry_points.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/manifests/dkist-0.9.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/manifests/dkist-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/manifests/dkist-1.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/manifests/dkist-1.2.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/manifests/dkist-wcs-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/manifests/dkist-wcs-1.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/manifests/dkist-wcs-1.2.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/manifests/dkist-wcs-1.3.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/asymmetric_mapping_model-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/asymmetric_mapping_model-1.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/coupled_compound_model-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/coupled_compound_model-1.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/dataset-0.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/dataset-0.2.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/dataset-0.3.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/dataset-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/dataset-1.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/file_manager-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/ravel_model-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/ravel_model-1.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/tiled_dataset-0.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/tiled_dataset-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/varying_celestial_transform-1.0.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/resources/schemas/varying_celestial_transform-1.1.0.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/tests/conftest.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/tests/test_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/tests/test_models.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/asdf/tests/test_tiled_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/dask_utils.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/file_manager.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/level_1_dataset_schema.yaml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/loaders.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/tests/test_file_manager.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/io/tests/test_fits.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/logger.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/attr_walker.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/attrs.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/attrs_values.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/client.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/auth.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/endpoints.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/tests/conftest.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/tests/test_auth.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/tests/test_endpoints.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/tests/test_transfer.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/globus/transfer.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/helpers.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/tests/conftest.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/tests/strategies.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/tests/test_attr_walker.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/tests/test_attrs.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/tests/test_attrs_values.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/tests/test_client.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/net/tests/test_helpers.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/figure_hashes_mpl_391_ft_261_astropy_611_animators_111_ndcube_222.json +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/figure_hashes_mpl_dev_ft_261_astropy_dev_animators_dev_ndcube_dev.json +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/generate_aia_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/generate_eit_test_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/generate_eit_tiled_dataset.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/helpers.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/test_benchmarks.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/tests/test_logger.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/_model_to_graphviz.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/decorators.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/exceptions.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/inventory.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/sysinfo.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/tests/test_inventory.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/utils/tests/test_sysinfo.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/version.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/wcs/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/wcs/models.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/wcs/tests/__init__.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/wcs/tests/test_coupled_compound_model.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist/wcs/tests/test_models.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist.egg-info/SOURCES.txt +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist.egg-info/dependency_links.txt +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist.egg-info/entry_points.txt +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist.egg-info/not-zip-safe +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist.egg-info/requires.txt +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/dkist.egg-info/top_level.txt +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/Makefile +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/conf.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/developer.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/howto_guides/index.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/howto_guides/reproject_vbi_mosaic.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/index.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/installation.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/logo/icon_square.jpg +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/make.bat +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/reference.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/topic_guides/index.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/topic_guides/level1data.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/topic_guides/loading.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/topic_guides/net.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/topic_guides/usertools.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/tutorial/1_astropy_and_sunpy.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/tutorial/2_search_and_asdf_download.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/tutorial/3_the_dataset.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/tutorial/4_more_dataset.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/tutorial/5_downloading_data.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/tutorial/6_visualization.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/tutorial/index.md +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/whatsnew/1.0.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/whatsnew/1.1.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/whatsnew/changelog.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/docs/whatsnew/index.rst +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/pyproject.toml +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/pytest.ini +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/setup.cfg +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/setup.py +0 -0
- {dkist-1.9.1 → dkist-1.9.2}/tools/build_workshop_materials.py +0 -0
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
1.9.2 (2025-01-29)
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
Bug Fixes
|
|
5
|
+
---------
|
|
6
|
+
|
|
7
|
+
- Improve the ASDF detection code so out of date ASDF filenames generated by the DKIST data center are skipped if a newer filename is present. (`#503 <https://github.com/DKISTDC/dkist/pull/503>`__)
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
1.9.1 (2025-01-15)
|
|
2
11
|
==================
|
|
3
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"parameterValues":[{"parameterName":"createDateMin","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2025-01-
|
|
1
|
+
{"parameterValues":[{"parameterName":"createDateMin","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2025-01-28T07:25:53.776348"}},{"parameterName":"createDateMax","values":{"minValue":"2022-12-08T19:07:55.038280","maxValue":"2025-01-28T07:25:53.776348"}},{"parameterName":"endTimeMin","values":{"minValue":"2022-02-23T20:48:55.393500","maxValue":"2024-11-08T22:02:14.064417"}},{"parameterName":"endTimeMax","values":{"minValue":"2022-02-23T20:48:55.393500","maxValue":"2024-11-08T22:02:14.064417"}},{"parameterName":"exposureTimeMin","values":{"minValue":0.037,"maxValue":1380.2332394366197}},{"parameterName":"exposureTimeMax","values":{"minValue":0.037,"maxValue":1380.2332394366197}},{"parameterName":"instrumentNames","values":{"categoricalValues":["VBI","CRYO-NIRSP","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-11-08T21:40:00.522500"}},{"parameterName":"startTimeMax","values":{"minValue":"2022-02-23T19:05:32.338002","maxValue":"2024-11-08T21:40:00.522500"}},{"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":2.66666599999823,"maxValue":5263.145059399398}},{"parameterName":"averageDatasetTemporalSamplingMax","values":{"minValue":2.66666599999823,"maxValue":5263.145059399398}},{"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","Pono_9.1.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":["1.18.6","2.16.7","1.18.0","2.0.2","1.11.1","2.20.9","2.19.5","1.2.1","2.7.5","2.19.4","2.3.1","2.19.3","1.15.0","1.0.0","1.15.1","1.3.5","1.18.4","2.16.0","1.2.0","2.10.2","2.7.4","1.18.8","2.10.3","2.20.8","2.16.4","1.1.7","2.17.0","0.16.0","1.3.2","1.17.5","1.1.10","2.15.0","2.20.7","2.7.2","2.10.15","1.4.9","1.1.2","2.7.0","2.19.1","2.20.5","2.20.10","2.10.1","2.7.3","1.12.1","2.10.12","1.1.5","1.3.3","2.6.1","2.10.13","2.19.2","2.0.1","1.18.5","1.4.8","1.8.2","2.9.0","2.10.7","2.3.0","2.10.0","1.17.1","1.13.0","2.20.6","1.14.7","1.4.11","2.20.3","2.13.1","1.4.1"]}},{"parameterName":"headerDataUnitCreationDateMin","values":{"minValue":"2022-12-08T17:30:30.462000","maxValue":"2025-01-28T00:07:38.944000"}},{"parameterName":"headerDataUnitCreationDateMax","values":{"minValue":"2022-12-08T17:30:30.462000","maxValue":"2025-01-28T00:07:38.944000"}},{"parameterName":"headerVersion","values":{"categoricalValues":["4.3.0","4.6.0","4.0.0","4.1.1","3.4.0","3.9.0","4.7.0","4.10.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"]}},{"parameterName":"spectralLines","values":{"categoricalValues":["Na I D2 (589.0 nm)","Sr I (460.73 nm)","Ca II (854.21 nm)","Fe I (630.15 nm)","Ca II K (393.37 nm)","Ca II H (396.85 nm)","Na I D1 (589.59 nm)","Mg I b1 (517.27 nm)","Fe I (630.25 nm)","Fe XIII (1079.8 nm)","Fe XIII (1074.7 nm)","H epsilon (397.0 nm)","Fe I (525.04 nm)","H beta (486.13 nm)","He I (1083.0 nm)","H alpha (656.28 nm)"]}}]}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import re
|
|
2
|
+
import warnings
|
|
1
3
|
import importlib.resources as importlib_resources
|
|
2
4
|
from pathlib import Path
|
|
3
5
|
from functools import singledispatch
|
|
6
|
+
from collections import defaultdict
|
|
4
7
|
|
|
5
8
|
from parfive import Results
|
|
6
9
|
|
|
7
10
|
import asdf
|
|
8
11
|
|
|
12
|
+
from dkist.utils.exceptions import DKISTUserWarning
|
|
13
|
+
|
|
9
14
|
try:
|
|
10
15
|
# first try to import from asdf.exceptions for asdf 2.15+
|
|
11
16
|
from asdf.exceptions import ValidationError
|
|
@@ -14,6 +19,9 @@ except ImportError:
|
|
|
14
19
|
from asdf import ValidationError
|
|
15
20
|
|
|
16
21
|
|
|
22
|
+
ASDF_FILENAME_PATTERN = r"^(?P<instrument>[A-Z-]+)_L1_(?P<timestamp>\d{8}T\d{6})_(?P<datasetid>[A-Z]{5,})(?P<suffix>_user_tools|_metadata)?.asdf$"
|
|
23
|
+
|
|
24
|
+
|
|
17
25
|
def asdf_open_memory_mapping_kwarg(memmap: bool) -> dict:
|
|
18
26
|
if asdf.__version__ > "3.1.0":
|
|
19
27
|
return {"memmap": memmap}
|
|
@@ -138,8 +146,30 @@ def _load_from_path(path: Path):
|
|
|
138
146
|
|
|
139
147
|
def _load_from_directory(directory):
|
|
140
148
|
"""
|
|
141
|
-
Construct a `~dkist.dataset.Dataset` from a directory containing one
|
|
142
|
-
|
|
149
|
+
Construct a `~dkist.dataset.Dataset` from a directory containing one (or
|
|
150
|
+
more) ASDF files and a collection of FITS files.
|
|
151
|
+
|
|
152
|
+
ASDF files have the generic pattern:
|
|
153
|
+
|
|
154
|
+
``{instrument}_L1_{start_time:%Y%m%dT%H%M%S}_{dataset_id}[_{suffix}].asdf``
|
|
155
|
+
|
|
156
|
+
where the ``_{suffix}`` on the end may be absent or one of a few different
|
|
157
|
+
suffixes which have been used at different times. When searching a
|
|
158
|
+
directory for one or more ASDF file to load we should attempt to only load
|
|
159
|
+
one per dataset ID by selecting files in suffix order.
|
|
160
|
+
|
|
161
|
+
The order of suffixes are (from newest used to oldest):
|
|
162
|
+
|
|
163
|
+
- ``_metadata``
|
|
164
|
+
- ``_user_tools``
|
|
165
|
+
- None
|
|
166
|
+
|
|
167
|
+
The algorithm used to find ASDF files to load in a directory is therefore:
|
|
168
|
+
|
|
169
|
+
- Glob the directory for all ASDF files
|
|
170
|
+
- Group all results by the filename up to and including the dataset id in the filename
|
|
171
|
+
- Ignore any ASDF files with an old suffix if a new suffix is present
|
|
172
|
+
- Throw a warning to the user if any ASDF files with older suffixes are found
|
|
143
173
|
"""
|
|
144
174
|
base_path = Path(directory).expanduser()
|
|
145
175
|
asdf_files = tuple(base_path.glob("*.asdf"))
|
|
@@ -147,12 +177,60 @@ def _load_from_directory(directory):
|
|
|
147
177
|
if not asdf_files:
|
|
148
178
|
raise ValueError(f"No asdf file found in directory {base_path}.")
|
|
149
179
|
|
|
150
|
-
if len(asdf_files)
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
|
|
180
|
+
if len(asdf_files) == 1:
|
|
181
|
+
return _load_from_asdf(asdf_files[0])
|
|
182
|
+
|
|
183
|
+
pattern = re.compile(ASDF_FILENAME_PATTERN)
|
|
184
|
+
candidates = []
|
|
185
|
+
asdfs_to_load = []
|
|
186
|
+
for filepath in asdf_files:
|
|
187
|
+
filename = filepath.name
|
|
188
|
+
|
|
189
|
+
# If the asdf file doesn't match the data center pattern then we load it
|
|
190
|
+
# as it's probably a custom user file
|
|
191
|
+
if pattern.match(filename) is None:
|
|
192
|
+
asdfs_to_load.append(filepath)
|
|
193
|
+
continue
|
|
194
|
+
|
|
195
|
+
# All the matches have to be checked
|
|
196
|
+
candidates.append(filepath)
|
|
197
|
+
|
|
198
|
+
# If we only have one match load it
|
|
199
|
+
if len(candidates) == 1:
|
|
200
|
+
asdfs_to_load += candidates
|
|
201
|
+
else:
|
|
202
|
+
# Now we group by prefix
|
|
203
|
+
matches = [pattern.match(fp.name) for fp in candidates]
|
|
204
|
+
grouped = defaultdict(list)
|
|
205
|
+
for m in matches:
|
|
206
|
+
prefix = m.string.removesuffix(".asdf").removesuffix(m.group("suffix") or "")
|
|
207
|
+
grouped[prefix].append(m.group("suffix"))
|
|
208
|
+
|
|
209
|
+
# Now we select the best suffix for each prefix
|
|
210
|
+
for prefix, suffixes in grouped.items():
|
|
211
|
+
if "_metadata" in suffixes:
|
|
212
|
+
asdfs_to_load.append(base_path / f"{prefix}_metadata.asdf")
|
|
213
|
+
elif "_user_tools" in suffixes:
|
|
214
|
+
asdfs_to_load.append(base_path / f"{prefix}_user_tools.asdf")
|
|
215
|
+
elif None in suffixes:
|
|
216
|
+
asdfs_to_load.append(base_path / f"{prefix}.asdf")
|
|
217
|
+
else:
|
|
218
|
+
# This branch should never be hit because the regex enumerates the suffixes
|
|
219
|
+
raise ValueError("Unknown suffix encountered.") # pragma: no cover
|
|
220
|
+
|
|
221
|
+
# Throw a warning if we have skipped any files
|
|
222
|
+
if ignored_files := set(asdf_files).difference(asdfs_to_load):
|
|
223
|
+
warnings.warn(
|
|
224
|
+
f"ASDF files with old names ({', '.join([a.name for a in ignored_files])}) "
|
|
225
|
+
"were found in this directory and ignored. You may want to delete these files.",
|
|
226
|
+
DKISTUserWarning
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
if len(asdfs_to_load) == 1:
|
|
230
|
+
return _load_from_asdf(asdfs_to_load[0])
|
|
231
|
+
|
|
232
|
+
return _load_from_iterable(asdfs_to_load)
|
|
154
233
|
|
|
155
|
-
return _load_from_asdf(asdf_file)
|
|
156
234
|
|
|
157
235
|
|
|
158
236
|
def _load_from_asdf(filepath):
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import re
|
|
2
|
+
import shutil
|
|
3
|
+
import numbers
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
from parfive import Results
|
|
7
|
+
|
|
8
|
+
import asdf
|
|
9
|
+
|
|
10
|
+
from dkist import Dataset, TiledDataset, load_dataset
|
|
11
|
+
from dkist.data.test import rootdir
|
|
12
|
+
from dkist.dataset.loader import ASDF_FILENAME_PATTERN
|
|
13
|
+
from dkist.utils.exceptions import DKISTUserWarning
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@pytest.fixture
|
|
17
|
+
def single_asdf_in_folder(tmp_path, asdf_path):
|
|
18
|
+
shutil.copy(asdf_path, tmp_path)
|
|
19
|
+
return tmp_path
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@pytest.fixture
|
|
23
|
+
def multiple_asdf_in_folder(tmp_path, asdf_path):
|
|
24
|
+
shutil.copy(asdf_path, tmp_path)
|
|
25
|
+
shutil.copy(asdf_path, tmp_path / "second_asdf.asdf")
|
|
26
|
+
return tmp_path
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@pytest.fixture
|
|
30
|
+
def asdf_path():
|
|
31
|
+
return rootdir / "eit_dataset-1.1.0.asdf"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@pytest.fixture
|
|
35
|
+
def asdf_str(asdf_path):
|
|
36
|
+
return asdf_path.as_posix()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@pytest.fixture
|
|
40
|
+
def asdf_tileddataset_path():
|
|
41
|
+
return rootdir / "test_tiled_dataset-1.0.0_dataset-1.0.0.asdf"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@pytest.fixture
|
|
45
|
+
def single_asdf_in_folder_str(single_asdf_in_folder):
|
|
46
|
+
return single_asdf_in_folder.as_posix()
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@pytest.fixture
|
|
50
|
+
def fixture_finder(request):
|
|
51
|
+
if isinstance(request.param, (list, tuple)):
|
|
52
|
+
return [request.getfixturevalue(i) for i in request.param]
|
|
53
|
+
return request.getfixturevalue(request.param)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@pytest.mark.parametrize("fixture_finder", [
|
|
57
|
+
"asdf_path",
|
|
58
|
+
"asdf_str",
|
|
59
|
+
"single_asdf_in_folder",
|
|
60
|
+
"single_asdf_in_folder_str",
|
|
61
|
+
],
|
|
62
|
+
indirect=True
|
|
63
|
+
)
|
|
64
|
+
def test_load_single_dataset(fixture_finder):
|
|
65
|
+
ds = load_dataset(fixture_finder)
|
|
66
|
+
assert isinstance(ds, Dataset)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
@pytest.mark.parametrize("fixture_finder", [
|
|
70
|
+
["asdf_path", "asdf_str", "single_asdf_in_folder", "single_asdf_in_folder_str"],
|
|
71
|
+
("asdf_path", "asdf_str", "single_asdf_in_folder", "single_asdf_in_folder_str"),
|
|
72
|
+
],
|
|
73
|
+
indirect=True
|
|
74
|
+
)
|
|
75
|
+
def test_load_multiple(fixture_finder):
|
|
76
|
+
datasets = load_dataset(fixture_finder)
|
|
77
|
+
assert isinstance(datasets, list)
|
|
78
|
+
assert all(isinstance(ds, Dataset) for ds in datasets)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def test_load_from_results(asdf_path, asdf_str):
|
|
82
|
+
res = Results([asdf_path])
|
|
83
|
+
ds = load_dataset(res)
|
|
84
|
+
assert isinstance(ds, Dataset)
|
|
85
|
+
|
|
86
|
+
res = Results([asdf_str, asdf_str])
|
|
87
|
+
ds = load_dataset(res)
|
|
88
|
+
assert isinstance(ds, list)
|
|
89
|
+
assert all(isinstance(ds, Dataset) for ds in ds)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def test_multiple_from_dir(multiple_asdf_in_folder):
|
|
93
|
+
ds = load_dataset(multiple_asdf_in_folder)
|
|
94
|
+
assert isinstance(ds, list)
|
|
95
|
+
assert len(ds) == 2
|
|
96
|
+
assert all(isinstance(d, Dataset) for d in ds)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def test_tiled_dataset(asdf_tileddataset_path):
|
|
100
|
+
ds = load_dataset(asdf_tileddataset_path)
|
|
101
|
+
assert isinstance(ds, TiledDataset)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def test_errors(tmp_path):
|
|
105
|
+
with pytest.raises(TypeError, match="Input type dict"):
|
|
106
|
+
load_dataset({})
|
|
107
|
+
|
|
108
|
+
with pytest.raises(ValueError, match="No asdf file found"):
|
|
109
|
+
load_dataset(tmp_path)
|
|
110
|
+
|
|
111
|
+
with pytest.raises(ValueError, match="does not exist"):
|
|
112
|
+
load_dataset(tmp_path / "asdf")
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def test_not_dkist_asdf(tmp_path):
|
|
116
|
+
af = asdf.AsdfFile({"hello": "world"})
|
|
117
|
+
af.write_to(tmp_path / "test.asdf")
|
|
118
|
+
|
|
119
|
+
with pytest.raises(TypeError, match="not a valid DKIST"):
|
|
120
|
+
load_dataset(tmp_path / "test.asdf")
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def generate_asdf_folder(tmp_path, asdf_path, filenames):
|
|
124
|
+
for fname in filenames:
|
|
125
|
+
shutil.copy(asdf_path, tmp_path / fname)
|
|
126
|
+
|
|
127
|
+
return tmp_path
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@pytest.mark.parametrize(("filename", "match"), [
|
|
131
|
+
("VBI_L1_20231016T184519_AJQWW.asdf", True),
|
|
132
|
+
("VBI_L1_20231016T184519_AAAA.asdf", False),
|
|
133
|
+
("VBI_L1_20231016T184519_AJQWW_user_tools.asdf", True),
|
|
134
|
+
("VBI_L1_20231016T184519_AJQWW_metadata.asdf", True),
|
|
135
|
+
("DL-NIRSP_L1_20231016T184519_AJQWW.asdf", True),
|
|
136
|
+
("DL-NIRSP_L1_20231016T184519_AJQWW_user_tools.asdf", True),
|
|
137
|
+
("DL-NIRSP_L1_20231016T184519_AJQWW_metadata.asdf", True),
|
|
138
|
+
("VISP_L1_99999999T184519_AAAAAAA.asdf", True),
|
|
139
|
+
("VISP_L1_20231016T888888_AAAAAAA_user_tools.asdf", True),
|
|
140
|
+
("VISP_L1_20231016T184519_AAAAAAA_metadata.asdf", True),
|
|
141
|
+
("VISP_L1_20231016T184519_AAAAAAA_unknown.asdf", False),
|
|
142
|
+
("VISP_L1_20231016T184519.asdf", False),
|
|
143
|
+
("wibble.asdf", False),
|
|
144
|
+
])
|
|
145
|
+
def test_asdf_regex(filename, match):
|
|
146
|
+
m = re.match(ASDF_FILENAME_PATTERN, filename)
|
|
147
|
+
assert bool(m) is match
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
@pytest.mark.parametrize(("filenames", "indices"), [
|
|
151
|
+
pytest.param(("VBI_L1_20231016T184519_AJQWW.asdf",), 0, id="Single no suffix"),
|
|
152
|
+
pytest.param(("VBI_L1_20231016T184519_AJQWW_user_tools.asdf",), 0, id="single _user_tools"),
|
|
153
|
+
pytest.param(("VBI_L1_20231016T184519_AJQWW_metadata.asdf",), 0, id="single _metadata"),
|
|
154
|
+
pytest.param(("VBI_L1_20231016T184519_AJQWW_unknown.asdf",), 0, id="single _unknown"),
|
|
155
|
+
pytest.param(("VBI_L1_20231016T184519_AJQWW.asdf",
|
|
156
|
+
"VBI_L1_20231016T184519_AJQWW_user_tools.asdf",), 1, id="none & _user_tools"),
|
|
157
|
+
pytest.param(("VBI_L1_20231016T184519_AJQWW.asdf",
|
|
158
|
+
"VBI_L1_20231016T184519_AJQWW_user_tools.asdf",
|
|
159
|
+
"VBI_L1_20231016T184519_AJQWW_metadata.asdf",), 2, id="_user_tools & _metadata"),
|
|
160
|
+
pytest.param(("VBI_L1_20231016T184519_AJQWW.asdf",
|
|
161
|
+
"VBI_L1_20231016T184519_AJQWW_user_tools.asdf",
|
|
162
|
+
"VBI_L1_20231016T184519_AJQWW_metadata.asdf",
|
|
163
|
+
"VBI_L1_20231016T184519_AJQWW_unknown.asdf"), (2, 3), id="_user_tools & _metadata & _unknown"),
|
|
164
|
+
pytest.param(("random.asdf",
|
|
165
|
+
"VBI_L1_20231016T184519_AJQWW_user_tools.asdf",), (0, 1), id="other pattern & _user_tools"),
|
|
166
|
+
pytest.param(("random.asdf",
|
|
167
|
+
"VBI_L1_not_a_proper_name.asdf",
|
|
168
|
+
"VBI_L1_20231016T184519_AJQWW_user_tools.asdf",
|
|
169
|
+
"VBI_L1_20231016T184519_AJQWW_metadata.asdf",), (0, 1, 3), id="2 other patterns & _user_tools & _metadata"),
|
|
170
|
+
pytest.param(("VBI_L1_20231016T184519_AJQWW.asdf",
|
|
171
|
+
"VISP_L1_20231016T184519_AJQWW.asdf",), (0, 1), id="Two patterns, no suffix"),
|
|
172
|
+
pytest.param(("VBI_L1_20231016T184519_AAAAA.asdf",
|
|
173
|
+
"VBI_L1_20231016T184519_AAAAA_metadata.asdf",
|
|
174
|
+
"VBI_L1_20231116T184519_BBBBBBB.asdf",
|
|
175
|
+
"VBI_L1_20231216T184519_CCCCCCC.asdf",
|
|
176
|
+
"VBI_L1_20231216T184519_CCCCCCC_user_tools.asdf"), (1, 2, 4), id="Three patterns, mixed suffixes"),
|
|
177
|
+
])
|
|
178
|
+
def test_select_asdf(tmp_path, asdf_path, filenames, indices, mocker):
|
|
179
|
+
asdf_folder = generate_asdf_folder(tmp_path, asdf_path, filenames)
|
|
180
|
+
|
|
181
|
+
asdf_file_paths = tuple(asdf_folder / fname for fname in filenames)
|
|
182
|
+
|
|
183
|
+
load_from_asdf = mocker.patch("dkist.dataset.loader._load_from_asdf")
|
|
184
|
+
load_from_iterable = mocker.patch("dkist.dataset.loader._load_from_iterable")
|
|
185
|
+
|
|
186
|
+
# The load_dataset call should throw a warning if any files are skipped, but
|
|
187
|
+
# not otherwise, the warning should have the filenames of any skipped files in
|
|
188
|
+
tuple_of_indices = indices if isinstance(indices, tuple) else (indices,)
|
|
189
|
+
if len(tuple_of_indices) == len(filenames):
|
|
190
|
+
datasets = load_dataset(asdf_folder)
|
|
191
|
+
else:
|
|
192
|
+
files_to_be_skipped = set(filenames).difference([filenames[i] for i in tuple_of_indices])
|
|
193
|
+
with pytest.warns(DKISTUserWarning, match=f".*[{'|'.join([re.escape(f) for f in files_to_be_skipped])}].*"):
|
|
194
|
+
datasets = load_dataset(asdf_folder)
|
|
195
|
+
|
|
196
|
+
if isinstance(indices, numbers.Integral):
|
|
197
|
+
load_from_asdf.assert_called_once_with(asdf_file_paths[indices])
|
|
198
|
+
else:
|
|
199
|
+
calls = load_from_iterable.mock_calls
|
|
200
|
+
# We need to assert that _load_from_iterable is called with the right
|
|
201
|
+
# paths but in a order-invariant way.
|
|
202
|
+
assert len(calls) == 1
|
|
203
|
+
assert set(calls[0].args[0]) == {asdf_file_paths[i] for i in indices}
|
|
@@ -77,12 +77,16 @@ def test_tiled_dataset_from_components(dataset):
|
|
|
77
77
|
@pytest.mark.parametrize("share_zscale", [True, False], ids=["share_zscale", "indpendent_zscale"])
|
|
78
78
|
def test_tileddataset_plot(share_zscale):
|
|
79
79
|
from dkist.data.sample import VBI_AJQWW
|
|
80
|
-
|
|
80
|
+
ori_ds = load_dataset(VBI_AJQWW)
|
|
81
81
|
newtiles = []
|
|
82
|
-
for tile in
|
|
82
|
+
for tile in ori_ds.flat:
|
|
83
83
|
newtiles.append(tile.rebin((1, 8, 8), operation=np.sum))
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
# ndcube 2.3.0 introduced a deepcopy for rebin, this broke our dataset validation
|
|
85
|
+
# https://github.com/sunpy/ndcube/issues/815
|
|
86
|
+
for tile in newtiles:
|
|
87
|
+
tile.meta["inventory"] = ori_ds.inventory
|
|
88
|
+
ds = TiledDataset(np.array(newtiles).reshape(ori_ds.shape), inventory=newtiles[0].inventory)
|
|
89
|
+
fig = plt.figure(figsize=(12, 15))
|
|
86
90
|
ds.plot(0, share_zscale=share_zscale)
|
|
87
91
|
return plt.gcf()
|
|
88
92
|
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import shutil
|
|
2
|
-
|
|
3
|
-
import pytest
|
|
4
|
-
from parfive import Results
|
|
5
|
-
|
|
6
|
-
import asdf
|
|
7
|
-
|
|
8
|
-
from dkist import Dataset, TiledDataset, load_dataset
|
|
9
|
-
from dkist.data.test import rootdir
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@pytest.fixture
|
|
13
|
-
def single_asdf_in_folder(tmp_path, asdf_path):
|
|
14
|
-
shutil.copy(asdf_path, tmp_path)
|
|
15
|
-
return tmp_path
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
@pytest.fixture
|
|
19
|
-
def multiple_asdf_in_folder(tmp_path, asdf_path):
|
|
20
|
-
shutil.copy(asdf_path, tmp_path)
|
|
21
|
-
shutil.copy(asdf_path, tmp_path / "second_asdf.asdf")
|
|
22
|
-
return tmp_path
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@pytest.fixture
|
|
26
|
-
def asdf_path():
|
|
27
|
-
return rootdir / "eit_dataset-1.1.0.asdf"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@pytest.fixture
|
|
31
|
-
def asdf_str(asdf_path):
|
|
32
|
-
return asdf_path.as_posix()
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
@pytest.fixture
|
|
36
|
-
def asdf_tileddataset_path():
|
|
37
|
-
return rootdir / "test_tiled_dataset-1.0.0_dataset-1.0.0.asdf"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@pytest.fixture
|
|
41
|
-
def single_asdf_in_folder_str(single_asdf_in_folder):
|
|
42
|
-
return single_asdf_in_folder.as_posix()
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
@pytest.fixture
|
|
46
|
-
def fixture_finder(request):
|
|
47
|
-
if isinstance(request.param, (list, tuple)):
|
|
48
|
-
return [request.getfixturevalue(i) for i in request.param]
|
|
49
|
-
return request.getfixturevalue(request.param)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
@pytest.mark.parametrize("fixture_finder", [
|
|
53
|
-
"asdf_path",
|
|
54
|
-
"asdf_str",
|
|
55
|
-
"single_asdf_in_folder",
|
|
56
|
-
"single_asdf_in_folder_str",
|
|
57
|
-
],
|
|
58
|
-
indirect=True
|
|
59
|
-
)
|
|
60
|
-
def test_load_single_dataset(fixture_finder):
|
|
61
|
-
ds = load_dataset(fixture_finder)
|
|
62
|
-
assert isinstance(ds, Dataset)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
@pytest.mark.parametrize("fixture_finder", [
|
|
66
|
-
["asdf_path", "asdf_str", "single_asdf_in_folder", "single_asdf_in_folder_str"],
|
|
67
|
-
("asdf_path", "asdf_str", "single_asdf_in_folder", "single_asdf_in_folder_str"),
|
|
68
|
-
],
|
|
69
|
-
indirect=True
|
|
70
|
-
)
|
|
71
|
-
def test_load_multiple(fixture_finder):
|
|
72
|
-
datasets = load_dataset(fixture_finder)
|
|
73
|
-
assert isinstance(datasets, list)
|
|
74
|
-
assert all(isinstance(ds, Dataset) for ds in datasets)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
def test_load_from_results(asdf_path, asdf_str):
|
|
78
|
-
res = Results([asdf_path])
|
|
79
|
-
ds = load_dataset(res)
|
|
80
|
-
assert isinstance(ds, Dataset)
|
|
81
|
-
|
|
82
|
-
res = Results([asdf_str, asdf_str])
|
|
83
|
-
ds = load_dataset(res)
|
|
84
|
-
assert isinstance(ds, list)
|
|
85
|
-
assert all(isinstance(ds, Dataset) for ds in ds)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
def test_multiple_from_dir(multiple_asdf_in_folder):
|
|
89
|
-
ds = load_dataset(multiple_asdf_in_folder)
|
|
90
|
-
assert isinstance(ds, list)
|
|
91
|
-
assert len(ds) == 2
|
|
92
|
-
assert all(isinstance(d, Dataset) for d in ds)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
def test_tiled_dataset(asdf_tileddataset_path):
|
|
96
|
-
ds = load_dataset(asdf_tileddataset_path)
|
|
97
|
-
assert isinstance(ds, TiledDataset)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
def test_errors(tmp_path):
|
|
101
|
-
with pytest.raises(TypeError, match="Input type dict"):
|
|
102
|
-
load_dataset({})
|
|
103
|
-
|
|
104
|
-
with pytest.raises(ValueError, match="No asdf file found"):
|
|
105
|
-
load_dataset(tmp_path)
|
|
106
|
-
|
|
107
|
-
with pytest.raises(ValueError, match="does not exist"):
|
|
108
|
-
load_dataset(tmp_path / "asdf")
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def test_not_dkist_asdf(tmp_path):
|
|
112
|
-
af = asdf.AsdfFile({"hello": "world"})
|
|
113
|
-
af.write_to(tmp_path / "test.asdf")
|
|
114
|
-
|
|
115
|
-
with pytest.raises(TypeError, match="not a valid DKIST"):
|
|
116
|
-
load_dataset(tmp_path / "test.asdf")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|