@@ 1726-1744 (lines=19) @@ | ||
1723 | assert dataset.psf.psf_map.data.shape == (4, 66, 768) |
|
1724 | ||
1725 | ||
1726 | @requires_dependency("healpy") |
|
1727 | def test_map_dataset_create_hpx_geom_partial(geom_hpx_partial): |
|
1728 | ||
1729 | dataset = MapDataset.create(**geom_hpx_partial, binsz_irf=2 * u.deg) |
|
1730 | ||
1731 | assert isinstance(dataset.counts.geom, HpxGeom) |
|
1732 | assert dataset.counts.data.shape == (3, 90) |
|
1733 | ||
1734 | assert isinstance(dataset.background.geom, HpxGeom) |
|
1735 | assert dataset.background.data.shape == (3, 90) |
|
1736 | ||
1737 | assert isinstance(dataset.exposure.geom, HpxGeom) |
|
1738 | assert dataset.exposure.data.shape == (4, 90) |
|
1739 | ||
1740 | assert isinstance(dataset.edisp.edisp_map.geom, HpxGeom) |
|
1741 | assert dataset.edisp.edisp_map.data.shape == (4, 3, 24) |
|
1742 | ||
1743 | assert isinstance(dataset.psf.psf_map.geom, HpxGeom) |
|
1744 | assert dataset.psf.psf_map.data.shape == (4, 66, 24) |
|
1745 | ||
1746 | ||
1747 | @requires_dependency("healpy") |
|
@@ 1705-1723 (lines=19) @@ | ||
1702 | assert_allclose(npred_ref.data, npred.data, rtol=1e-2) |
|
1703 | ||
1704 | ||
1705 | @requires_dependency("healpy") |
|
1706 | def test_map_dataset_create_hpx_geom(geom_hpx): |
|
1707 | ||
1708 | dataset = MapDataset.create(**geom_hpx, binsz_irf=10 * u.deg) |
|
1709 | ||
1710 | assert isinstance(dataset.counts.geom, HpxGeom) |
|
1711 | assert dataset.counts.data.shape == (3, 12288) |
|
1712 | ||
1713 | assert isinstance(dataset.background.geom, HpxGeom) |
|
1714 | assert dataset.background.data.shape == (3, 12288) |
|
1715 | ||
1716 | assert isinstance(dataset.exposure.geom, HpxGeom) |
|
1717 | assert dataset.exposure.data.shape == (4, 12288) |
|
1718 | ||
1719 | assert isinstance(dataset.edisp.edisp_map.geom, HpxGeom) |
|
1720 | assert dataset.edisp.edisp_map.data.shape == (4, 3, 768) |
|
1721 | ||
1722 | assert isinstance(dataset.psf.psf_map.geom, HpxGeom) |
|
1723 | assert dataset.psf.psf_map.data.shape == (4, 66, 768) |
|
1724 | ||
1725 | ||
1726 | @requires_dependency("healpy") |