Skip to content

Instantly share code, notes, and snippets.

@joleroi
Created April 10, 2018 11:09
Show Gist options
  • Save joleroi/4eaaa91729cc0888f94ab121f71cb186 to your computer and use it in GitHub Desktop.
Save joleroi/4eaaa91729cc0888f94ab121f71cb186 to your computer and use it in GitHub Desktop.
running test
running build
running build_py
copying gammapy/_compiler.c -> build/lib.linux-x86_64-3.5/gammapy
running build_ext
building 'gammapy._compiler' extension
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/kingj/Software/miniconda3/envs/headversions/include/python3.5m -c gammapy/_compiler.c -o build/temp.linux-x86_64-3.5/gammapy/_compiler.o
gcc -pthread -shared -L/home/kingj/Software/miniconda3/envs/headversions/lib -Wl,-rpath=/home/kingj/Software/miniconda3/envs/headversions/lib,--no-as-needed build/temp.linux-x86_64-3.5/gammapy/_compiler.o -L/home/kingj/Software/miniconda3/envs/headversions/lib -lpython3.5m -o build/lib.linux-x86_64-3.5/gammapy/_compiler.cpython-35m-x86_64-linux-gnu.so
skipping 'gammapy/detect/_test_statistics_cython.c' Cython extension (up-to-date)
skipping 'gammapy/maps/_sparse.c' Cython extension (up-to-date)
Gammapy test data availability:
gammapy-extra ... yes
hess ............ yes
Gammapy environment variables:
GAMMAPY_EXTRA = /home/kingj/Software/gammapy-extra
Setting matplotlib backend to "agg" for the tests.
============================= test session starts ==============================
platform linux -- Python 3.5.3, pytest-3.2.3, py-1.4.33, pluggy-0.4.0
Running tests with gammapy version 0.8.dev5702.
Running tests in lib.linux-x86_64-3.5/gammapy docs.
Date: 2018-04-10T12:54:34
Platform: Linux-3.13.0-144-generic-x86_64-with-debian-jessie-sid
Executable: /home/kingj/Software/miniconda3/envs/headversions/bin/python
Full Python Version:
3.5.3 |Continuum Analytics, Inc.| (default, Mar 6 2017, 11:58:13)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15
Numpy: 1.12.1
Scipy: 0.19.0
Matplotlib: 2.0.2
h5py: not available
Pandas: 0.20.2
cython: 0.25.2
skimage: not available
sklearn: 0.18.1
uncertainties: 3.0.1
iminuit: 1.2
astropy: 3.0.dev20201
regions: 0.3.dev475
healpy: 1.10.3
sherpa: ciao4.10b1-py3.5-linux-x86_64.egg
gammapy: 0.8.dev5702
naima: not available
reproject: 0.3.1
photutils: not available
aplpy: 1.1.1
Using Astropy options: remote_data: none.
rootdir: /tmp/gammapy-test-asj28m08, inifile: setup.cfg
plugins: arraydiff-0.2
collected 1247 items / 1 skipped
gammapy/astro/population/tests/test_simulate.py ........
gammapy/astro/population/tests/test_spatial.py ....................ssssssssss..........ssssssssss
gammapy/astro/source/tests/test_pulsar.py ......
gammapy/astro/source/tests/test_pwn.py ..
gammapy/astro/source/tests/test_snr.py .....
gammapy/background/tests/test_energy_offset_array.py .........
gammapy/background/tests/test_fov.py .
gammapy/background/tests/test_fov_cube.py xXXxxx
gammapy/background/tests/test_models.py ..xxXx.....
gammapy/background/tests/test_off_data_background_maker.py .
gammapy/background/tests/test_reflected.py ....
gammapy/background/tests/test_ring.py ....
gammapy/catalog/tests/test_core.py ..........
gammapy/catalog/tests/test_fermi.py ...........................................................
gammapy/catalog/tests/test_gammacat.py sssssssssssssssssssss...................
gammapy/catalog/tests/test_hawc.py .....
gammapy/catalog/tests/test_hess.py .......................
gammapy/catalog/tests/test_registry.py .....
gammapy/catalog/tests/test_snrcat.py x
gammapy/catalog/tests/test_utils.py ...
gammapy/catalog/tests/test_xmatch.py .
gammapy/cube/tests/test_basic_cube.py ...
gammapy/cube/tests/test_core.py ...................
gammapy/cube/tests/test_cube_pipe.py .
gammapy/cube/tests/test_exposure.py ..
gammapy/cube/tests/test_images.py .ss
gammapy/cube/tests/test_models.py ....
gammapy/cube/tests/test_sherpa_.py ...
gammapy/cube/tests/test_utils.py ..
gammapy/data/tests/test_data_manager.py .
gammapy/data/tests/test_data_store.py ..............
gammapy/data/tests/test_event_list.py ......x
gammapy/data/tests/test_gti.py ..
gammapy/data/tests/test_hdu_index_table.py ..
gammapy/data/tests/test_obs_group.py .s.
gammapy/data/tests/test_obs_stats.py ...
gammapy/data/tests/test_obs_summary.py ....x......
gammapy/data/tests/test_obs_table.py ...
gammapy/data/tests/test_observationlist.py .
gammapy/data/tests/test_observers.py .
gammapy/data/tests/test_pointing.py ........X
gammapy/data/tests/test_target.py .
gammapy/datasets/tests/test_fermi.py ...............sssss
gammapy/datasets/tests/test_load.py ..
gammapy/datasets/tests/test_make.py ...x
gammapy/detect/tests/test_cwt.py ................
gammapy/detect/tests/test_kernel.py ...
gammapy/detect/tests/test_lima.py ..
gammapy/detect/tests/test_matched_filter.py .x
gammapy/detect/tests/test_test_statistics.py s
gammapy/image/models/tests/test_gauss.py ............
gammapy/image/models/tests/test_shapes.py ...........................ssss.
gammapy/image/models/tests/test_theta.py ....x
gammapy/image/tests/test_asmooth.py .
gammapy/image/tests/test_basic.py s.
gammapy/image/tests/test_catalog.py s...
gammapy/image/tests/test_core.py .......................ss..ss..................
gammapy/image/tests/test_lists.py .......
gammapy/image/tests/test_measure.py .....
gammapy/image/tests/test_plotting.py ...
gammapy/image/tests/test_profile.py ............
gammapy/image/tests/test_radial_profile.py .
gammapy/image/tests/test_utils.py xsss.
gammapy/irf/tests/test_background.py .....
gammapy/irf/tests/test_effective_area.py ....
gammapy/irf/tests/test_energy_dispersion.py ...............
gammapy/irf/tests/test_fits_prod.py ..
gammapy/irf/tests/test_irf_write.py ....
gammapy/irf/tests/test_psf_3d.py ........
gammapy/irf/tests/test_psf_analytical.py ....
gammapy/irf/tests/test_psf_check.py .
gammapy/irf/tests/test_psf_core.py ...
gammapy/irf/tests/test_psf_king.py ...
gammapy/irf/tests/test_psf_table.py .....x
gammapy/maps/tests/test_base.py ...........
gammapy/maps/tests/test_geom.py .............................
gammapy/maps/tests/test_hpxmap.py .................................................................................................FFFFFF..................
gammapy/maps/tests/test_hpxsparse.py .....
gammapy/maps/tests/test_sparse.py ...........
gammapy/maps/tests/test_wcs.py ................................................
gammapy/maps/tests/test_wcsnd.py ............................................................................................xxxxx..xxx.....................FF.F.FFFFF..........
gammapy/scripts/tests/test_cta_irf.py x.
gammapy/scripts/tests/test_cta_sensitivity.py .xX
gammapy/scripts/tests/test_cta_utils.py ...
gammapy/scripts/tests/test_image_bin.py .
gammapy/scripts/tests/test_image_fit.py ...
gammapy/scripts/tests/test_image_pipe.py .
gammapy/scripts/tests/test_image_ts.py ssss
gammapy/scripts/tests/test_info.py ..
gammapy/scripts/tests/test_main.py ...
gammapy/scripts/tests/test_spectrum_pipe.py .
gammapy/spectrum/tests/test_core.py ............
gammapy/spectrum/tests/test_cosmic_ray.py .
gammapy/spectrum/tests/test_crab.py ......
gammapy/spectrum/tests/test_diffuse.py .
gammapy/spectrum/tests/test_energy_group.py ..........x.....x....
gammapy/spectrum/tests/test_extract.py ......
gammapy/spectrum/tests/test_fit.py ............x......
gammapy/spectrum/tests/test_flux_point.py .......x.......................................
gammapy/spectrum/tests/test_models.py ..............................
gammapy/spectrum/tests/test_obs_group.py x
gammapy/spectrum/tests/test_observation.py ..........
gammapy/spectrum/tests/test_powerlaw.py ....
gammapy/spectrum/tests/test_results.py ...
gammapy/spectrum/tests/test_simulation.py .....
gammapy/spectrum/tests/test_utils.py ...x.....
gammapy/stats/tests/test_data.py ..
gammapy/stats/tests/test_feldman_cousins.py ....
gammapy/stats/tests/test_fit_statistics.py xx..
gammapy/stats/tests/test_poisson.py ...........x.......
gammapy/stats/tests/test_significance.py .....
gammapy/stats/tests/test_utils.py .
gammapy/time/tests/test_exptest.py .
gammapy/time/tests/test_lightcurve.py ...........
gammapy/time/tests/test_models.py ..
gammapy/time/tests/test_period.py .
gammapy/time/tests/test_plot_periodogram.py .
gammapy/time/tests/test_simulate.py .
gammapy/utils/coordinates/tests/test_celestial.py .
gammapy/utils/coordinates/tests/test_other.py .
gammapy/utils/distributions/tests/test_general_random.py x
gammapy/utils/root/tests/test_convert.py sss
gammapy/utils/tests/test_array.py ..
gammapy/utils/tests/test_energy.py ..
gammapy/utils/tests/test_fits.py ....
gammapy/utils/tests/test_modeling.py ...
gammapy/utils/tests/test_nddata.py .........
gammapy/utils/tests/test_random.py ...
gammapy/utils/tests/test_scripts.py .
gammapy/utils/tests/test_table.py ...
gammapy/utils/tests/test_time.py ....
gammapy/utils/tests/test_units.py .
gammapy/utils/tests/test_wcs.py .
=================================== FAILURES ===================================
__________ test_hpxmap_pad[nside0-False-GAL-DISK(110.,75.,30.)-axes0] __________
nside = [4, 8], nested = False, coordsys = 'GAL', region = 'DISK(110.,75.,30.)'
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce3055358>]
@pytest.mark.parametrize(('nside', 'nested', 'coordsys', 'region', 'axes'),
hpx_test_partialsky_geoms)
def test_hpxmap_pad(nside, nested, coordsys, region, axes):
m = HpxNDMap(HpxGeom(nside=nside, nest=nested,
coordsys=coordsys, region=region, axes=axes))
m.set_by_pix(m.geom.get_idx(flat=True), 1.0)
cval = 2.2
> m_pad = m.pad(1, mode='constant', cval=cval)
gammapy/maps/tests/test_hpxmap.py:240:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gammapy/maps/hpxnd.py:254: in pad
geom = self.geom.pad(pad_width)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.hpx.HpxGeom object at 0x7f6cb29cf860>, pad_width = 1
def pad(self, pad_width):
# FIXME: Should this return an exception?
if self.is_allsky:
return copy.deepcopy(self)
idx = self.get_idx(flat=True)
idx_r = ravel_hpx_index(idx, self._maxpix)
# TODO: Pre-filter indices to find those close to the edge
idx_nb = self._get_neighbors(idx)
idx_nb = ravel_hpx_index(idx_nb, self._maxpix)
for i in range(pad_width):
# Mask of neighbors that are not contained in the geometry
> edge_msk = np.isin(idx_nb, idx_r, invert=True)
E AttributeError: module 'numpy' has no attribute 'isin'
gammapy/maps/hpx.py:1072: AttributeError
____________ test_hpxmap_pad[8-False-GAL-DISK(110.,75.,10.)-axes1] _____________
nside = 8, nested = False, coordsys = 'GAL', region = 'DISK(110.,75.,10.)'
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce30553c8>]
@pytest.mark.parametrize(('nside', 'nested', 'coordsys', 'region', 'axes'),
hpx_test_partialsky_geoms)
def test_hpxmap_pad(nside, nested, coordsys, region, axes):
m = HpxNDMap(HpxGeom(nside=nside, nest=nested,
coordsys=coordsys, region=region, axes=axes))
m.set_by_pix(m.geom.get_idx(flat=True), 1.0)
cval = 2.2
> m_pad = m.pad(1, mode='constant', cval=cval)
gammapy/maps/tests/test_hpxmap.py:240:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gammapy/maps/hpxnd.py:254: in pad
geom = self.geom.pad(pad_width)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.hpx.HpxGeom object at 0x7f6cb29d4208>, pad_width = 1
def pad(self, pad_width):
# FIXME: Should this return an exception?
if self.is_allsky:
return copy.deepcopy(self)
idx = self.get_idx(flat=True)
idx_r = ravel_hpx_index(idx, self._maxpix)
# TODO: Pre-filter indices to find those close to the edge
idx_nb = self._get_neighbors(idx)
idx_nb = ravel_hpx_index(idx_nb, self._maxpix)
for i in range(pad_width):
# Mask of neighbors that are not contained in the geometry
> edge_msk = np.isin(idx_nb, idx_r, invert=True)
E AttributeError: module 'numpy' has no attribute 'isin'
gammapy/maps/hpx.py:1072: AttributeError
____________ test_hpxmap_pad[8-False-GAL-DISK(110.,75.,10.)-axes2] _____________
nside = 8, nested = False, coordsys = 'GAL', region = 'DISK(110.,75.,10.)'
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce30552e8>, <gammapy.maps.geom.MapAxis object at 0x7f6ce3055400>]
@pytest.mark.parametrize(('nside', 'nested', 'coordsys', 'region', 'axes'),
hpx_test_partialsky_geoms)
def test_hpxmap_pad(nside, nested, coordsys, region, axes):
m = HpxNDMap(HpxGeom(nside=nside, nest=nested,
coordsys=coordsys, region=region, axes=axes))
m.set_by_pix(m.geom.get_idx(flat=True), 1.0)
cval = 2.2
> m_pad = m.pad(1, mode='constant', cval=cval)
gammapy/maps/tests/test_hpxmap.py:240:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gammapy/maps/hpxnd.py:254: in pad
geom = self.geom.pad(pad_width)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.hpx.HpxGeom object at 0x7f6cb3077128>, pad_width = 1
def pad(self, pad_width):
# FIXME: Should this return an exception?
if self.is_allsky:
return copy.deepcopy(self)
idx = self.get_idx(flat=True)
idx_r = ravel_hpx_index(idx, self._maxpix)
# TODO: Pre-filter indices to find those close to the edge
idx_nb = self._get_neighbors(idx)
idx_nb = ravel_hpx_index(idx_nb, self._maxpix)
for i in range(pad_width):
# Mask of neighbors that are not contained in the geometry
> edge_msk = np.isin(idx_nb, idx_r, invert=True)
E AttributeError: module 'numpy' has no attribute 'isin'
gammapy/maps/hpx.py:1072: AttributeError
_________ test_hpxmap_crop[nside0-False-GAL-DISK(110.,75.,30.)-axes0] __________
nside = [4, 8], nested = False, coordsys = 'GAL', region = 'DISK(110.,75.,30.)'
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce3055358>]
@pytest.mark.parametrize(('nside', 'nested', 'coordsys', 'region', 'axes'),
hpx_test_partialsky_geoms)
def test_hpxmap_crop(nside, nested, coordsys, region, axes):
m = HpxNDMap(HpxGeom(nside=nside, nest=nested,
coordsys=coordsys, region=region, axes=axes))
> m.crop(1)
gammapy/maps/tests/test_hpxmap.py:256:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gammapy/maps/hpxnd.py:275: in crop
geom = self.geom.crop(crop_width)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.hpx.HpxGeom object at 0x7f6cb2e20080>, crop_width = 1
def crop(self, crop_width):
if self.is_allsky:
raise ValueError('Cannot crop an all-sky map.')
idx = self.get_idx(flat=True)
idx_r = ravel_hpx_index(idx, self._maxpix)
# TODO: Pre-filter indices to find those close to the edge
idx_nb = self._get_neighbors(idx)
idx_nb = ravel_hpx_index(idx_nb, self._maxpix)
for i in range(crop_width):
# Mask of pixels that have at least one neighbor not
# contained in the geometry
> edge_msk = np.any(np.isin(idx_nb, idx_r, invert=True), axis=0)
E AttributeError: module 'numpy' has no attribute 'isin'
gammapy/maps/hpx.py:1100: AttributeError
____________ test_hpxmap_crop[8-False-GAL-DISK(110.,75.,10.)-axes1] ____________
nside = 8, nested = False, coordsys = 'GAL', region = 'DISK(110.,75.,10.)'
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce30553c8>]
@pytest.mark.parametrize(('nside', 'nested', 'coordsys', 'region', 'axes'),
hpx_test_partialsky_geoms)
def test_hpxmap_crop(nside, nested, coordsys, region, axes):
m = HpxNDMap(HpxGeom(nside=nside, nest=nested,
coordsys=coordsys, region=region, axes=axes))
> m.crop(1)
gammapy/maps/tests/test_hpxmap.py:256:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gammapy/maps/hpxnd.py:275: in crop
geom = self.geom.crop(crop_width)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.hpx.HpxGeom object at 0x7f6cb30d0320>, crop_width = 1
def crop(self, crop_width):
if self.is_allsky:
raise ValueError('Cannot crop an all-sky map.')
idx = self.get_idx(flat=True)
idx_r = ravel_hpx_index(idx, self._maxpix)
# TODO: Pre-filter indices to find those close to the edge
idx_nb = self._get_neighbors(idx)
idx_nb = ravel_hpx_index(idx_nb, self._maxpix)
for i in range(crop_width):
# Mask of pixels that have at least one neighbor not
# contained in the geometry
> edge_msk = np.any(np.isin(idx_nb, idx_r, invert=True), axis=0)
E AttributeError: module 'numpy' has no attribute 'isin'
gammapy/maps/hpx.py:1100: AttributeError
____________ test_hpxmap_crop[8-False-GAL-DISK(110.,75.,10.)-axes2] ____________
nside = 8, nested = False, coordsys = 'GAL', region = 'DISK(110.,75.,10.)'
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce30552e8>, <gammapy.maps.geom.MapAxis object at 0x7f6ce3055400>]
@pytest.mark.parametrize(('nside', 'nested', 'coordsys', 'region', 'axes'),
hpx_test_partialsky_geoms)
def test_hpxmap_crop(nside, nested, coordsys, region, axes):
m = HpxNDMap(HpxGeom(nside=nside, nest=nested,
coordsys=coordsys, region=region, axes=axes))
> m.crop(1)
gammapy/maps/tests/test_hpxmap.py:256:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gammapy/maps/hpxnd.py:275: in crop
geom = self.geom.crop(crop_width)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.hpx.HpxGeom object at 0x7f6cb2d45978>, crop_width = 1
def crop(self, crop_width):
if self.is_allsky:
raise ValueError('Cannot crop an all-sky map.')
idx = self.get_idx(flat=True)
idx_r = ravel_hpx_index(idx, self._maxpix)
# TODO: Pre-filter indices to find those close to the edge
idx_nb = self._get_neighbors(idx)
idx_nb = ravel_hpx_index(idx_nb, self._maxpix)
for i in range(crop_width):
# Mask of pixels that have at least one neighbor not
# contained in the geometry
> edge_msk = np.any(np.isin(idx_nb, idx_r, invert=True), axis=0)
E AttributeError: module 'numpy' has no attribute 'isin'
gammapy/maps/hpx.py:1100: AttributeError
___________ test_wcsndmap_downsample[None-10.0-GAL-AIT-skydir0-None] ___________
npix = None, binsz = 10.0, coordsys = 'GAL', proj = 'AIT'
skydir = <SkyCoord (ICRS): (ra, dec) in deg
( 110., 75.)>, axes = None
@pytest.mark.parametrize(('npix', 'binsz', 'coordsys', 'proj', 'skydir', 'axes'),
wcs_test_geoms)
def test_wcsndmap_downsample(npix, binsz, coordsys, proj, skydir, axes):
geom = WcsGeom.create(npix=npix, binsz=binsz,
proj=proj, coordsys=coordsys, axes=axes)
m = WcsNDMap(geom)
# Check whether we can downsample
if (np.all(np.mod(geom.npix[0], 2) == 0) and
np.all(np.mod(geom.npix[1], 2) == 0)):
> m2 = m.downsample(2, preserve_counts=True)
gammapy/maps/tests/test_wcsnd.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.wcsnd.WcsNDMap object at 0x7f6cb24c9f60>, factor = 2
preserve_counts = True
def downsample(self, factor, preserve_counts=True):
> from skimage.measure import block_reduce
E ImportError: No module named 'skimage'
gammapy/maps/wcsnd.py:445: ImportError
__________ test_wcsndmap_downsample[None-10.0-GAL-AIT-skydir1-axes1] ___________
npix = None, binsz = 10.0, coordsys = 'GAL', proj = 'AIT'
skydir = <SkyCoord (ICRS): (ra, dec) in deg
( 110., 75.)>
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce2bcac88>]
@pytest.mark.parametrize(('npix', 'binsz', 'coordsys', 'proj', 'skydir', 'axes'),
wcs_test_geoms)
def test_wcsndmap_downsample(npix, binsz, coordsys, proj, skydir, axes):
geom = WcsGeom.create(npix=npix, binsz=binsz,
proj=proj, coordsys=coordsys, axes=axes)
m = WcsNDMap(geom)
# Check whether we can downsample
if (np.all(np.mod(geom.npix[0], 2) == 0) and
np.all(np.mod(geom.npix[1], 2) == 0)):
> m2 = m.downsample(2, preserve_counts=True)
gammapy/maps/tests/test_wcsnd.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.wcsnd.WcsNDMap object at 0x7f6cb3066eb8>, factor = 2
preserve_counts = True
def downsample(self, factor, preserve_counts=True):
> from skimage.measure import block_reduce
E ImportError: No module named 'skimage'
gammapy/maps/wcsnd.py:445: ImportError
__________ test_wcsndmap_downsample[None-10.0-GAL-AIT-skydir3-axes3] ___________
npix = None, binsz = 10.0, coordsys = 'GAL', proj = 'AIT'
skydir = <SkyCoord (ICRS): (ra, dec) in deg
( 110., 75.)>
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce2bcacc0>, <gammapy.maps.geom.MapAxis object at 0x7f6ce2bcada0>]
@pytest.mark.parametrize(('npix', 'binsz', 'coordsys', 'proj', 'skydir', 'axes'),
wcs_test_geoms)
def test_wcsndmap_downsample(npix, binsz, coordsys, proj, skydir, axes):
geom = WcsGeom.create(npix=npix, binsz=binsz,
proj=proj, coordsys=coordsys, axes=axes)
m = WcsNDMap(geom)
# Check whether we can downsample
if (np.all(np.mod(geom.npix[0], 2) == 0) and
np.all(np.mod(geom.npix[1], 2) == 0)):
> m2 = m.downsample(2, preserve_counts=True)
gammapy/maps/tests/test_wcsnd.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.wcsnd.WcsNDMap object at 0x7f6ce2d59320>, factor = 2
preserve_counts = True
def downsample(self, factor, preserve_counts=True):
> from skimage.measure import block_reduce
E ImportError: No module named 'skimage'
gammapy/maps/wcsnd.py:445: ImportError
____________ test_wcsndmap_downsample[10-1.0-GAL-AIT-skydir5-None] _____________
npix = 10, binsz = 1.0, coordsys = 'GAL', proj = 'AIT'
skydir = <SkyCoord (ICRS): (ra, dec) in deg
( 110., 75.)>, axes = None
@pytest.mark.parametrize(('npix', 'binsz', 'coordsys', 'proj', 'skydir', 'axes'),
wcs_test_geoms)
def test_wcsndmap_downsample(npix, binsz, coordsys, proj, skydir, axes):
geom = WcsGeom.create(npix=npix, binsz=binsz,
proj=proj, coordsys=coordsys, axes=axes)
m = WcsNDMap(geom)
# Check whether we can downsample
if (np.all(np.mod(geom.npix[0], 2) == 0) and
np.all(np.mod(geom.npix[1], 2) == 0)):
> m2 = m.downsample(2, preserve_counts=True)
gammapy/maps/tests/test_wcsnd.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.wcsnd.WcsNDMap object at 0x7f6cb3075a90>, factor = 2
preserve_counts = True
def downsample(self, factor, preserve_counts=True):
> from skimage.measure import block_reduce
E ImportError: No module named 'skimage'
gammapy/maps/wcsnd.py:445: ImportError
____________ test_wcsndmap_downsample[10-1.0-GAL-AIT-skydir6-axes6] ____________
npix = 10, binsz = 1.0, coordsys = 'GAL', proj = 'AIT'
skydir = <SkyCoord (ICRS): (ra, dec) in deg
( 110., 75.)>
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce2bcac88>]
@pytest.mark.parametrize(('npix', 'binsz', 'coordsys', 'proj', 'skydir', 'axes'),
wcs_test_geoms)
def test_wcsndmap_downsample(npix, binsz, coordsys, proj, skydir, axes):
geom = WcsGeom.create(npix=npix, binsz=binsz,
proj=proj, coordsys=coordsys, axes=axes)
m = WcsNDMap(geom)
# Check whether we can downsample
if (np.all(np.mod(geom.npix[0], 2) == 0) and
np.all(np.mod(geom.npix[1], 2) == 0)):
> m2 = m.downsample(2, preserve_counts=True)
gammapy/maps/tests/test_wcsnd.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.wcsnd.WcsNDMap object at 0x7f6cb307d518>, factor = 2
preserve_counts = True
def downsample(self, factor, preserve_counts=True):
> from skimage.measure import block_reduce
E ImportError: No module named 'skimage'
gammapy/maps/wcsnd.py:445: ImportError
__________ test_wcsndmap_downsample[10-binsz7-GAL-AIT-skydir7-axes7] ___________
npix = 10, binsz = [1.0, 2.0], coordsys = 'GAL', proj = 'AIT'
skydir = <SkyCoord (ICRS): (ra, dec) in deg
( 110., 75.)>
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce2bcac88>]
@pytest.mark.parametrize(('npix', 'binsz', 'coordsys', 'proj', 'skydir', 'axes'),
wcs_test_geoms)
def test_wcsndmap_downsample(npix, binsz, coordsys, proj, skydir, axes):
geom = WcsGeom.create(npix=npix, binsz=binsz,
proj=proj, coordsys=coordsys, axes=axes)
m = WcsNDMap(geom)
# Check whether we can downsample
if (np.all(np.mod(geom.npix[0], 2) == 0) and
np.all(np.mod(geom.npix[1], 2) == 0)):
> m2 = m.downsample(2, preserve_counts=True)
gammapy/maps/tests/test_wcsnd.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.wcsnd.WcsNDMap object at 0x7f6cb3115550>, factor = 2
preserve_counts = True
def downsample(self, factor, preserve_counts=True):
> from skimage.measure import block_reduce
E ImportError: No module named 'skimage'
gammapy/maps/wcsnd.py:445: ImportError
____________ test_wcsndmap_downsample[10-1.0-GAL-AIT-skydir8-axes8] ____________
npix = 10, binsz = 1.0, coordsys = 'GAL', proj = 'AIT'
skydir = <SkyCoord (ICRS): (ra, dec) in deg
( 110., 75.)>
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce2bcacc0>, <gammapy.maps.geom.MapAxis object at 0x7f6ce2bcada0>]
@pytest.mark.parametrize(('npix', 'binsz', 'coordsys', 'proj', 'skydir', 'axes'),
wcs_test_geoms)
def test_wcsndmap_downsample(npix, binsz, coordsys, proj, skydir, axes):
geom = WcsGeom.create(npix=npix, binsz=binsz,
proj=proj, coordsys=coordsys, axes=axes)
m = WcsNDMap(geom)
# Check whether we can downsample
if (np.all(np.mod(geom.npix[0], 2) == 0) and
np.all(np.mod(geom.npix[1], 2) == 0)):
> m2 = m.downsample(2, preserve_counts=True)
gammapy/maps/tests/test_wcsnd.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.wcsnd.WcsNDMap object at 0x7f6ce2d70d68>, factor = 2
preserve_counts = True
def downsample(self, factor, preserve_counts=True):
> from skimage.measure import block_reduce
E ImportError: No module named 'skimage'
gammapy/maps/wcsnd.py:445: ImportError
__________ test_wcsndmap_downsample[10-binsz9-GAL-AIT-skydir9-axes9] ___________
npix = 10, binsz = [[1.0, 2.0, 3.0], [1.0, 2.0, 3.0]], coordsys = 'GAL'
proj = 'AIT', skydir = <SkyCoord (ICRS): (ra, dec) in deg
( 110., 75.)>
axes = [<gammapy.maps.geom.MapAxis object at 0x7f6ce2bcacc0>, <gammapy.maps.geom.MapAxis object at 0x7f6ce2bcada0>]
@pytest.mark.parametrize(('npix', 'binsz', 'coordsys', 'proj', 'skydir', 'axes'),
wcs_test_geoms)
def test_wcsndmap_downsample(npix, binsz, coordsys, proj, skydir, axes):
geom = WcsGeom.create(npix=npix, binsz=binsz,
proj=proj, coordsys=coordsys, axes=axes)
m = WcsNDMap(geom)
# Check whether we can downsample
if (np.all(np.mod(geom.npix[0], 2) == 0) and
np.all(np.mod(geom.npix[1], 2) == 0)):
> m2 = m.downsample(2, preserve_counts=True)
gammapy/maps/tests/test_wcsnd.py:355:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <gammapy.maps.wcsnd.WcsNDMap object at 0x7f6cb2b2ce10>, factor = 2
preserve_counts = True
def downsample(self, factor, preserve_counts=True):
> from skimage.measure import block_reduce
E ImportError: No module named 'skimage'
gammapy/maps/wcsnd.py:445: ImportError
= 14 failed, 1123 passed, 71 skipped, 35 xfailed, 5 xpassed in 287.27 seconds ==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment