Commit 63fe626d authored by Monica Rainer's avatar Monica Rainer
Browse files

Fix masterflat creation

parent 2130052b
...@@ -133,9 +133,10 @@ class GBFlats(): ...@@ -133,9 +133,10 @@ class GBFlats():
combineflat = ccdproc.Combiner(self.flatcorr) combineflat = ccdproc.Combiner(self.flatcorr)
# mask the pixels using ron/gain # mask the pixels using ron/gain
combineflat.sigma_clipping(func=np.ma.mean, dev_func=varie.stdcombine) #combineflat.sigma_clipping(func=np.ma.mean, dev_func=varie.stdcombine)
combineflat.sigma_clipping(func=np.ma.median, dev_func=varie.stdcombine)
mflat = combineflat.average_combine() mflat = combineflat.average_combine()
mflat.data = np.asarray(mflat.data, dtype='float32') mflat.data = np.asarray(mflat.data, dtype='float32')
hea = self.flatlist[0].header hea = self.flatlist[0].header
......
...@@ -87,7 +87,8 @@ def badpix(image,bad_mask,inverse_mask): ...@@ -87,7 +87,8 @@ def badpix(image,bad_mask,inverse_mask):
def stdcombine(x,axis): def stdcombine(x,axis):
#return np.ma.sqrt((np.ma.absolute(x- np.ma.mean(x)) /CONFIG['GAIN']) + ((CONFIG['RON']/CONFIG['GAIN']) ** 2)) #return np.ma.sqrt((np.ma.absolute(x- np.ma.mean(x)) /CONFIG['GAIN']) + ((CONFIG['RON']/CONFIG['GAIN']) ** 2))
return np.ma.sqrt(np.ma.mean((np.ma.absolute(x- np.ma.mean(x)) /CONFIG['GAIN']) + ((CONFIG['RON']/CONFIG['GAIN']) ** 2))) #return np.ma.sqrt(np.ma.mean((np.ma.absolute(x- np.ma.mean(x)) /CONFIG['GAIN']) + ((CONFIG['RON']/CONFIG['GAIN']) ** 2)))
return np.ma.sqrt(np.ma.mean((np.ma.absolute(x- np.ma.median(x)) /CONFIG['GAIN']) + ((CONFIG['RON']/CONFIG['GAIN']) ** 2)))
#--------------------- Build the extraction mask ------------------- #--------------------- Build the extraction mask -------------------
......
Markdown is supported
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