示例#1
0
 def test_EPERTask_run_parallel(self):
     "Test the EPERTask.run method for the parallel direction."
     ccd = sensorTest.MaskedCCD(self.fits_file)
     task = sensorTest.EPERTask()
     task.config.direction = 'p'
     task.config.cti = True
     task.config.verbose = self.verbose
     cti, bias_ests = task.run(self.fits_file, 1, range(1, 17),
                               self.overscans)
     nrows = ccd.amp_geom.imaging.getHeight()
     cti_expected = (float(self.overscans * self.overscan_value) /
                     float(self.imaging_value) / float(nrows))
     for amp in ccd:
         self.assertEqual(cti[amp].value, cti_expected)
示例#2
0
 def test_EPERTask_run_serial(self):
     "Test the EPERTask.run method for the serial direction."
     ccd = sensorTest.MaskedCCD(self.fits_file)
     task = sensorTest.EPERTask()
     task.config.direction = 's'
     task.config.cti = True
     task.config.verbose = self.verbose
     cti, bias_ests = task.run(self.fits_file, 1, range(1, 17),
                               self.overscans)
     ncols = (ccd.amp_geom.prescan.getWidth() +
              ccd.amp_geom.imaging.getWidth())
     cti_expected = (float(self.overscans * self.overscan_value) /
                     float(self.imaging_value) / float(ncols))
     for amp in ccd:
         self.assertEqual(cti[amp].value, cti_expected)
示例#3
0
 def test_subimage_serial(self):
     "Test the SubImage class for the serial direction."
     ccd = sensorTest.MaskedCCD(self.fits_file)
     task = sensorTest.EPERTask()
     task.config.direction = 's'
     task.config.verbose = self.verbose
     for amp in ccd:
         subimage = SubImage(ccd, amp, self.overscans, task)
         lastcol = ccd.amp_geom.imaging.getMaxX()
         nrows = ccd.amp_geom.imaging.getHeight()
         last_imaging_col = subimage(lastcol).getImage().getArray().flatten()
         self.assertEqual(nrows, len(last_imaging_col))
         self.assertEqual(nrows*self.imaging_value, sum(last_imaging_col))
         for icol in range(1, self.overscans+1):
             overscan_col = subimage(lastcol + icol)
             self.assertEqual(nrows*self.overscan_value,
                              sum(overscan_col.getImage().getArray().flatten()))
示例#4
0
 def test_subimage_parallel(self):
     "Test the SubImage class for the parallel direction."
     ccd = sensorTest.MaskedCCD(self.fits_file)
     task = sensorTest.EPERTask()
     task.config.direction = 'p'
     task.config.verbose = self.verbose
     for amp in ccd:
         subimage = SubImage(ccd, amp, self.overscans, task)
         lastrow = ccd.amp_geom.imaging.getMaxY()
         ncols = ccd.amp_geom.imaging.getWidth()
         last_imaging_row = subimage(lastrow).getImage().getArray().flatten()
         self.assertEqual(ncols, len(last_imaging_row))
         self.assertEqual(ncols*self.imaging_value, sum(last_imaging_row))
         for irow in range(1, self.overscans+1):
             overscan_row = subimage(lastrow + irow)
             self.assertEqual(ncols*self.overscan_value,
                              sum(overscan_row.getImage().getArray().flatten()))