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

update to V2.9.4: bug fixes for AEF50 download, cleaning a little bit the...

update to V2.9.4: bug fixes for AEF50 download, cleaning a little bit the code, changes in the upload code to fix extra frames for FLIR
parent aea4b269
......@@ -13,8 +13,8 @@ if __name__=='__main__':
localpath=""
time_s=13
programlist = ["20180920.010","20180920.049"]
ports=[31]
programlist = ["20171121.013"]
ports=[10]
for program in programlist:
for port in ports:
......
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 5 09:26:06 2018
Version: 2.8.0
Version: 2.9.4
@author: holn
constants and config parameters
"""
......@@ -28,6 +28,8 @@ except Exception as E:
# raise Exception("Config file was not loaded properly",E)
#%% Dictionaries
project="W7X"
project_ana="W7XAnalysis"
portcamdict={
'OP1.2a':{
'AEF10': 'IRCam_Caleo768kL_0901',
......@@ -53,6 +55,32 @@ portcamdict={
'AEF51': 'IRCam_Caleo768kL_0905',
'AEK51': 'FLIR_SC8303_00037'}
}
portpathdict={
'OP1.2a':{
'AEF10': 'QRT_IRCAM/AEF10_',
'AEF11': 'QRT_IRCAM/AEF11_',
'AEF20': 'QRT_IRCAM/AEF20_',
'AEF21': 'QRT_IRCAM/AEF21_',
'AEF30': 'QRT_IRCAM/AEF30_',
'AEF31': 'QRT_IRCAM/AEF31_',
'AEF40': 'QRT_IRCAM/AEF40_',
'AEF41': 'QRT_IRCAM/AEF41_',
'AEF50': 'QRT_IRCAM/AEF50_',
'AEF51': 'QRT_IRCAM/AEF51_'},
'OP1.2b':{
'AEF10': 'QRT_IRCAM/AEF10_',
'AEF11': 'QRT_IRCAM/AEF11_',
'AEF20': 'QRT_IRCAM/AEF20_',
'AEF21': 'QRT_IRCAM/AEF21_',
'AEF30': 'QRT_IRCAM/AEF30_',
'AEF31': 'QRT_IRCAM/AEF31_',
'AEF40': 'QRT_IRCAM/AEF40_',
'AEF41': 'QRT_IRCAM/AEF41_',
'AEF50': 'QRT_IRCAM/AEF50_',
'AEF51': 'QRT_IRCAM/AEF51_',
'AEK51': 'QSR07_FLIR/AEK51_'}
}
camlimdict={
'IRCam_Caleo768kL_0901':
......
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 26 16:01:06 2017
Version: 2.7.0
Version: 2.9.4
@author: holn
"""
......@@ -49,12 +49,12 @@ ports = ['AEF10', 'AEF11',
'AEF20', 'AEF21',
'AEF30', 'AEF31',
'AEF40', 'AEF41',
'AEF50', 'AEF51']
'AEF50', 'AEF51','AEK51']
cameras = ['IRCAM', 'IRCAM',
'IRCAM', 'IRCAM',
'IRCAM', 'IRCAM',
'IRCAM', 'IRCAM',
'INFRATEC', 'IRCAM']
'INFRATEC', 'IRCAM','FLIR']
Tup = [ False, True,
True, True,
True, False,
......@@ -64,7 +64,7 @@ pc_list = ['Pc-e4-qrt-7', 'Pc-e4-qrt-2',
'Pc-e4-qrt-3', 'Pc-e4-qrt-4',
'Pc-dia-ws-16', 'Pc-e4-qrt-6',
'Pc-dia-ws-17', 'Pc-dia-ws-18',
'Pc-e4-qrt-5', 'Pc-e4-qrt-1']
'Pc-e4-qrt-5', 'Pc-e4-qrt-1','PC-HC-MESS-2']
try:
cFile=open("upload_config")
for line in cFile:
......@@ -372,14 +372,21 @@ try:
metadata2['purpose']='experiment'
#['ROI_h', 'ROI_w', 'ROI_x', 'ROI_y', 'Size',
#'bitdepth', 'camera_temp_C', 'divertor_temp_K', 'frame_number',
#'frame_rate', 'integration_time_us', 'sensor_temp_C', 'timestamp']
else:
#'frame_rate', 'integration_time_us', 'sensor_temp_C', 'timestamp']
elif cameras[i]=="INFRATEC":
metadata1['cameraname']= 'INFRATEC_IMAGEIR9300'
metadata2['cameraname']= 'INFRATEC_IMAGEIR9300'
metadata1['purpose']='background'
metadata2['purpose']='experiment'
#metadata2['multi_exposure']=np.asarray(attri2['multi_exposure'])[0]
#metadata1['multi_exposure']=np.asarray(attri1['multi_exposure'])[0]
elif cameras[i]=="FLIR":
metadata1['cameraname']= 'FLIR_SC8303_00037'
metadata2['cameraname']= 'FLIR_SC8303_00037'
metadata1['purpose']='background'
metadata2['purpose']='experiment'
else:
raise Exception("unknown camera")
if date[0]>=2018:
metadata1['software_version']=hf1['images'].attrs['software_version'].decode("UTF-8")
metadata1['filter']=int(np.asarray(attri1['filter'])[0])
......@@ -425,6 +432,10 @@ try:
wrong2,correction_list2=IRup.check_timevector_framenumbers(time2,framenumber2)
time1_0=time1.copy()
time2_0=time2.copy()
if cameras[i]=="FLIR":
wrong3,correction_list3=IRup.check_extra_frames_FLIR(time2,framenumber2)
wrong2=wrong2 or wrong3
correction_list2=correction_list3+correction_list2
if wrong1:
sensor1=np.delete(sensor1,correction_list1)
chip1=np.delete(chip1,correction_list1)
......
This diff is collapsed.
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 24 11:24:52 2017
Version: 2.7.0
Version: 2.9.4
@author: holn
"""
......@@ -1190,10 +1190,26 @@ def check_timevector_framenumbers(timevector,framenumbervector):
indizes=np.where(np.asarray(framenumbervector)==framelist[i])[0]
for j in range(1,len(indizes)):
list_of_double_frames_to_delete.append(indizes[j])
except:
wrong=True
if len(list_of_double_frames_to_delete)>1:
wrong=True
return wrong,list_of_double_frames_to_delete
def check_extra_frames_FLIR(timevector,framenumbervector):
wrong=False
list_of_double_frames_to_delete=[]
for i in range(1,len(timevector)):
if (timevector[i]-timevector[i-1])/1e9>30:
if i >10:
raise Exception("the time gap is found later than 10 frames!!!! stopping here")
else:
wrong=True
for j in range(i):
list_of_double_frames_to_delete.append(i)
return wrong,list_of_double_frames_to_delete
"""
from read_restdb.py by Henning Thomsen copied read_restdb
......
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