Commit 1c90faa0 authored by Holger Niemann's avatar Holger Niemann
Browse files

Update 2.9.7 Bugfixes for OP1.2a download (was damage by an earlier update) and fullthreadfunction

parent 19006b99
......@@ -3,7 +3,7 @@
Created on Wed Oct 25 15:51:46 2017
updated on Tue Aug 21 10:20:00 2018
Version: 2.9.6
Version: 2.9.7
(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
"""
......@@ -469,7 +469,7 @@ def download_background_by_program(port,program,exposure,version=0):
def download_background_by_times(port,starttime,stoptime,exposure,camera_filter=0,version=0):
OP=IR_tools.get_OP_by_time(time_ns=starttime)
stream=portpathdict[OP]["AEF"+str(port)]+"background_"
larchivepath=archivepath+project+"/"+portpathdict[OP]["AEF"+str(port)]
larchivepath=archivepath+project+"/"+portpathdict[OP]["AEF"+str(port)]+"background_"
if version==0:
version=get_latest_version(stream+"DATASTREAM")
try:
......@@ -1600,7 +1600,6 @@ def get_temp_from_raw_by_program(portnr,program,time_s=0,emi=0.8,T_version=2,ver
if use_firstframe_as_background:
bim=apply_NUC([frames[0]],gain,offset)
background=get_average_background_recangle(portnr,bim[0])
print(port)
if give_ERROR:
success,frames,error_images=apply_calib_on_raw(frames,background,LUT,refT,gain,offset,gain_error,offset_error,False,give_ERROR,verbose=verbose-1)
else:
......@@ -1644,7 +1643,7 @@ def get_temp_from_raw_by_program(portnr,program,time_s=0,emi=0.8,T_version=2,ver
else:
raise Exception("unknown Program")
def get_temp_from_raw_by_program_fullthreads(portnr,program,time_s=0,emi=0.8,T_version=2,version=0,threads=1,give_ERROR=False,check_range=True):
def get_temp_from_raw_by_program_fullthreads(portnr,program,time_s=0,emi=0.8,T_version=2,version=0,threads=1,give_ERROR=False,check_range=True,verbose=0):
if threads==1 or not fastDL:
return get_temp_from_raw_by_program(portnr,program,time_s,emi,T_version,version,threads,give_ERROR)
else:
......@@ -1665,8 +1664,15 @@ def get_temp_from_raw_by_program_fullthreads(portnr,program,time_s=0,emi=0.8,T_v
goon=True
else:
goon=False
prog=get_program_from_PID(program)
if prog[0]:
t0=prog[1]['trigger']['0'][0]
t1=prog[1]['trigger']['1'][0]
t6=prog[1]['trigger']['6'][0]
else:
goon=False
if goon and not FLIR:
exist,background,LUT,refT,gain,offset,badpixels,t_exp,cfilter,gain_error,offset_error=get_calib_data(portnr,program,emi,T_version,version)
exist,background,LUT,refT,gain,offset,badpixels,t_exp,cfilter,gain_error,offset_error=get_calib_data(portnr,t0,t1,t6,emi,T_version,version,verbose=verbose-1)
FOV=get_FOV_mask(portnr)
prog=get_program_from_PID(program)
if prog[0]:
......
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