コード例 #1
0
 def test_full_well(self):
     self.seg.full_well = self.full_well
     times = np.arange(0, 2000, self.seg.exptime)
     for i, time in enumerate(times):
         image = imutils.unbias_and_trim(self.seg.image,
                                         self.amp_geom.serial_overscan,
                                         self.amp_geom.imaging)
         Ne_mean = imutils.mean(image) * self.seg.gain
         self.assertTrue(Ne_mean <= self.full_well)
         self.seg.expose_flat(intensity=self.intensity)
コード例 #2
0
def flats(imagefile, verbose=False):
    result = {}
    ccd = makeAmplifierGeometry(imagefile)
    for segment in range(1, 16 + 1):
        image_untrimmed = ImageF(imagefile, segment)  #imutils.dm_hdu(segment))
        amp = ccd[segment]
        flatmean = imutils.mean(imutils.unbias_and_trim \
                (image_untrimmed, overscan=ccd.serial_overscan, imaging=ccd.imaging))
        result[segment] = flatmean
    return result
コード例 #3
0
 def test_expose_flat(self):
     times = np.arange(0, 1000, self.seg.exptime)
     for i, time in enumerate(times):
         image = imutils.unbias_and_trim(self.seg.image,
                                         self.amp_geom.serial_overscan,
                                         self.amp_geom.imaging)
         image_mean = imutils.mean(image)
         illum = i * self.intensity * self.seg.exptime / self.seg.gain
         if i != 0:
             self.assertTrue((illum - image_mean) / illum < 3e-4)
         self.seg.expose_flat(intensity=self.intensity)