Commit c2287032 authored by GZhao's avatar GZhao
Browse files

update flat refdata

parent bff1392e
Pipeline #8527 passed with stage
in 0 seconds
......@@ -325,7 +325,7 @@ class CpicVisEmccd(object):
self.switch = {
'bias_vp': True,
'bias_hp': True,
'bias_ci': True,
'bias_ci': False,
'bias_shift': True,
'cic': True,
'dark': True,
......@@ -337,6 +337,7 @@ class CpicVisEmccd(object):
'cosmicray': True,
'blooming': True,
'em_blooming': True,
'poisson': True,
}
self.dark_file = cpism_refdata + '/camera/emccd_dark_current.fits'
......@@ -613,7 +614,6 @@ class CpicVisEmccd(object):
log.debug(
f"nonlinear effect added with coefficient {nonlinear_coefficient}")
image += (image / fullwell)**2 * nonlinear_coefficient * fullwell
return image
def time_syn(self, t, readout=True, initial=False):
......@@ -836,10 +836,15 @@ class CpicVisEmccd(object):
img_bias = np.zeros(self.bias_shape, dtype=int)
if self.switch['poisson']:
image = np.random.poisson(image)
else:
image = np.round(image).astype(int)
img_bias[
self.pscan2: -self.oscan2,
self.pscan1: -self.oscan1
] = np.random.poisson(image)
] = image
image = img_bias
if self.switch['shutter']:
......@@ -862,6 +867,8 @@ class CpicVisEmccd(object):
em_fix = self.em_fix_fuc_fit(emgain) * emgain
image = np.random.gamma(image, em_fix) + image * (emgain - em_fix)
fits.writeto("image.fits", image, overwrite=True)
if self.switch['em_blooming']:
image = self.emregester_blooming(image)
......
band: f662
emgain: 200
emset: -1
expt: 100
emset: 180
expt: 10
nframe: 2
obsid: '42100000002'
rotation: 0
......@@ -17,7 +16,7 @@ gnc_info:
POS_ANG0: 0.0
POSI0_X: 35
POSI0_Y: 49
POSI0_Z: 18
POSI0_Z: 18cd
VELO0_X: 36
VELO0_Y: 24
VELO0_Z: 18
......
band: f661
emgain: 200
emset: -1
expt: 100
# emgain: 100
emset: 180
expt: 30
nframe: 2
obsid: '40100000005'
rotation: 30
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment