예제 #1
0
파일: test_core.py 프로젝트: peroju/gammapy
 def test_io(self, tmp_path):
     self.spec.write(tmp_path / "tmp.fits")
     spec2 = CountsSpectrum.read(tmp_path / "tmp.fits")
     assert_quantity_allclose(spec2.energy.edges, self.bins)
예제 #2
0
 def test_io(self, tmpdir):
     filename = tmpdir / "test.fits"
     self.spec.write(filename)
     spec2 = CountsSpectrum.read(filename)
     assert_quantity_allclose(spec2.energy.edges, self.bins)