Created
August 4, 2014 13:03
-
-
Save cdeil/ca385fe7271a6a9bfdb2 to your computer and use it in GitHub Desktop.
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
=============================================================== FAILURES ================================================================ | |
________________________________________________________ test_compute_npred_cube ________________________________________________________ | |
@pytest.mark.skipif('not HAS_SCIPY') | |
def test_compute_npred_cube(): | |
# A quickly implemented check - should be improved | |
filenames = FermiGalacticCenter.filenames() | |
spectral_cube = GammaSpectralCube.read(filenames['diffuse_model']) | |
exposure_cube = GammaSpectralCube.read(filenames['exposure_cube']) | |
counts_cube = FermiGalacticCenter.counts() | |
energy_bounds = Quantity([10, 30, 100, 500], 'GeV') | |
# Reproject spectral cube onto exposure cube | |
spectral_cube = spectral_cube.reproject_to(exposure_cube) | |
# Compute npred cube | |
npred_cube = compute_npred_cube(spectral_cube, | |
exposure_cube, | |
energy_bounds) | |
expected_sum = counts_cube.data.sum() | |
actual_sum = np.nan_to_num(npred_cube.data).sum() | |
# Check npredicted is same order of magnitude of true counts | |
assert_allclose(expected_sum, actual_sum, rtol=1) | |
# PSF convolve the npred cube | |
npred_cube_convolved = convolve_npred_cube(npred_cube, max_offset=3, | |
> resolution=0.1) | |
E TypeError: convolve_npred_cube() takes at least 3 arguments (3 given) | |
gammapy/spectral_cube/tests/test_core.py:164: TypeError | |
_______________________________________________________ test_convolve_npred_cube ________________________________________________________ | |
@pytest.mark.skipif('not HAS_SCIPY') | |
def test_convolve_npred_cube(): | |
filenames = FermiGalacticCenter.filenames() | |
spectral_cube = GammaSpectralCube.read(filenames['diffuse_model']) | |
exposure_cube = GammaSpectralCube.read(filenames['exposure_cube']) | |
energy_bounds = Quantity([10, 30, 100, 500], 'GeV') | |
# Reproject spectral cube onto exposure cube | |
spectral_cube = spectral_cube.reproject_to(exposure_cube) | |
# Compute npred cube | |
npred_cube = compute_npred_cube(spectral_cube, | |
exposure_cube, | |
energy_bounds) | |
# PSF convolve the npred cube | |
npred_cube_convolved = convolve_npred_cube(npred_cube, max_offset=5, | |
> resolution=1) | |
E TypeError: convolve_npred_cube() takes at least 3 arguments (3 given) | |
gammapy/spectral_cube/tests/test_core.py:189: TypeError | |
================================ 2 failed, 167 passed, 9 skipped, 20 xfailed, 4 xpassed in 27.94 seconds ================================ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment