Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update astropy to 4.0.2 to fix fits 1d issue #102

Merged
merged 3 commits into from Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions environment.yml
Expand Up @@ -5,7 +5,6 @@ channels:
- default
dependencies:
- python=3.7
- astropy
- numpy
- ipython
- jupyter
Expand All @@ -21,6 +20,7 @@ dependencies:
- sphinx_rtd_theme
- pip
- pip:
- nbsphinx
- sphinx_automodapi
- uproot~=3.0
- astropy>=4.0.2,<5
- nbsphinx
- sphinx_automodapi
- uproot~=3.0
20 changes: 5 additions & 15 deletions pyirf/tests/test_eventdisplay_comparison.py
Expand Up @@ -36,21 +36,11 @@ def test_eventdisplay_example(caplog):
caplog.set_level(logging.WARNING, logger="fits_schema")

# check that each HDU respects the OGADF schema
AEFF_2D.validate_hdu(output_hdul["EFFECTIVE_AREA"], onerror="log")
EDISP_2D.validate_hdu(output_hdul["ENERGY_DISPERSION"], onerror="log")
PSF_TABLE.validate_hdu(output_hdul["PSF"], onerror="log")
BKG_2D.validate_hdu(output_hdul["BACKGROUND"], onerror="log")
RAD_MAX.validate_hdu(output_hdul["RAD_MAX"], onerror="log")

errors_to_ignore = {
# error due to astropy bug, which should be fixed in 4.0.2.
# TODO: remove when we require astropy >= 4.0.2
"Dimensionality of rows is 0, should be 1",
}

assert all(rec.message in errors_to_ignore for rec in caplog.records)

# compare to reference
AEFF_2D.validate_hdu(output_hdul["EFFECTIVE_AREA"], onerror="raise")
EDISP_2D.validate_hdu(output_hdul["ENERGY_DISPERSION"], onerror="raise")
PSF_TABLE.validate_hdu(output_hdul["PSF"], onerror="raise")
BKG_2D.validate_hdu(output_hdul["BACKGROUND"], onerror="raise")
RAD_MAX.validate_hdu(output_hdul["RAD_MAX"], onerror="raise")

f = uproot.open(ROOT_DIR / "data" / IRF_FILE)
sensitivity_ed = f['DiffSens'] * u.Unit('erg s-1 cm-2')
Expand Down
2 changes: 1 addition & 1 deletion pyirf/version.py
@@ -1 +1 @@
__version__ = "0.3.0"
__version__ = "0.3.0.post1"
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -29,7 +29,7 @@
packages=find_packages(),
include_package_data=True,
install_requires=[
"astropy~=4.0",
"astropy~=4.0,>=4.0.2",
HealthyPear marked this conversation as resolved.
Show resolved Hide resolved
"matplotlib",
"numpy>=1.18",
"pandas",
Expand Down