Commit d4ebc56e authored by Holger Niemann's avatar Holger Niemann
Browse files

Update V3.3.1: fix in the make FOV function for AEF50

parent 112e2f70
......@@ -4,7 +4,7 @@ Created on Wed Oct 25 15:51:46 2017
updated on Tue Aug 21 10:20:00 2018
last update on Fr Nov 23 15:37:00 2018
Version: 3.3.0
Version: 3.3.1
(Numbering: #of big changes(OP1.2a download V1, OP1.2b download V2, heatflux V3) . #of updates to add functionalities . #number of updates for bug fixes )
@author: holn
"""
......@@ -506,7 +506,7 @@ def download_hot_cold_reference_by_times(port,exposure,starttime=150390720000000
else:
return False,0,0
def download_background_by_program(port,program,exposure,version=0,testmode=False,verbose=0):
def download_background_by_program(port,program,exposure,camera_filter=0,version=0,testmode=False,verbose=0):
'''
returned exist,time,frame
'''
......@@ -519,7 +519,7 @@ def download_background_by_program(port,program,exposure,version=0,testmode=Fals
# stoptime=prog[1]['trigger']['1'][0]
exist, starttime, stoptime, _ = get_trigger_from_PID(program, port, testmode, verbose=verbose-1)
if exist:
return download_background_by_times(port,starttime,stoptime,exposure,version)
return download_background_by_times(port,starttime,stoptime,exposure,camera_filter=camera_filter,version=version)
else:#except:
print("download_background_by_program: Error! cannot find the program {0}".format(program))
return False,0,0
......@@ -2691,9 +2691,11 @@ def make_FOV_mask(port):
r1=points[2]
if port==50:
exposure=50
cfilter=1
else:
exposure=9
da,time,back=download_background_by_program(port,"20171109.045",exposure)
cfilter=0
da,time,back=download_background_by_program(port,"20171109.045",exposure,camera_filter=cfilter)
# fig = plt.figure()
# plt.imshow(back,vmin=np.average(back)-200,vmax=np.average(back)+500)
# inner_circle = mlt.patches.Circle((x0,y0), r1,color = 'r', fill = False)
......@@ -2715,7 +2717,7 @@ def make_FOV_mask(port):
else:
plt.imsave(config_path+portcamdict['OP1.2a']['AEF'+str(port)]+"\\"+"AEF"+str(port)+"_FOV.png",FOV)
else:
raise Exception("make_FOV_mask: cannot find the background frame to create the FOV file")
raise Exception("make_FOV_mask: cannot find the background frame to create the FOV file",exposure,port)
def get_FOV_mask(port):
"""
......
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