示例#1
0
 def test_ex1d(self):
     specrange = (0, self.nspec)
     mask = np.zeros(self.image.shape, dtype=int)
     ny = 20
     flux, ivar = ex1d(self.image, mask, self.psf, yrange=[0,ny],
         readnoise=1.0, specrange=specrange)
     self.assertEqual(flux.shape, ivar.shape)
     self.assertEqual(flux.shape[0], self.nspec)
     self.assertEqual(flux.shape[1], ny)
示例#2
0
 def test_ex1d(self):
     specrange = (0, self.nspec)
     mask = np.zeros(self.image.shape, dtype=int)
     ny = 20
     flux, ivar = ex1d(self.image, mask, self.psf, yrange=[0,ny],
         readnoise=1.0, specrange=specrange)
     self.assertEqual(flux.shape, ivar.shape)
     self.assertEqual(flux.shape[0], self.nspec)
     self.assertEqual(flux.shape[1], ny)
示例#3
0
 def test_ex1d_model(self):
     specrange = (2, self.nspec)
     mask = np.zeros(self.image.shape, dtype=int)
     ny = 20
     flux, ivar, model = ex1d(self.image, mask, self.psf, yrange=[ny,2*ny],
         readnoise=1.0, specrange=specrange, model=True)
     self.assertEqual(flux.shape, ivar.shape)
     self.assertEqual(flux.shape[0], self.nspec-2)
     self.assertEqual(flux.shape[1], ny)
     self.assertEqual(self.image.shape, model.shape)
示例#4
0
 def test_ex1d_model(self):
     specrange = (2, self.nspec)
     mask = np.zeros(self.image.shape, dtype=int)
     ny = 20
     flux, ivar, model = ex1d(self.image, mask, self.psf, yrange=[ny,2*ny],
         readnoise=1.0, specrange=specrange, model=True)
     self.assertEqual(flux.shape, ivar.shape)
     self.assertEqual(flux.shape[0], self.nspec-2)
     self.assertEqual(flux.shape[1], ny)
     self.assertEqual(self.image.shape, model.shape)