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

Update to V2.8.0 (this time complete): FLIR data can now be downloaded, port...

Update to V2.8.0 (this time complete): FLIR data can now be downloaded, port accepts now strings and numbers
parent 13971823
<<<<<<< HEAD
26.09.2018:
update downloadversionIRdata:
- include FLIR into the downloadscript, Case1 (V2.8.0)
25.09.2018:
update downloadversionIRdata:
- improved performance (V2.7.1), implement switch between test and ArchiveDB (V2.7.0)
13.09.2018:
update downloadversionIRdata:
- bugfixes, verbose level passed now throw, V2.6.1
12.09.2018:
update downloadversionIRdata:
- ToDo list added
- file added to create temperature HDF5 files
21.08.2018:
update downloadversionIRdata:
- remove dependency on readrestdb V2.6.0
- include version number, now 2.5.3 into the files
- bug fixes for downloadversion IRdata
- improvement of exception handling, replace some exception with warnings and improve error messages
......@@ -19,4 +33,16 @@ changes in downloadversionIRdata:
bugfixes in downloadversionIRdata:
- fixed: stepwise download of data in blocks of 2 seconds (used the wrong indices)
- fixed: not find the infratecfilter
- fixed: wrong time intervall for TC divertor data
\ No newline at end of file
- fixed: wrong time intervall for TC divertor data
Versions:
V3.0.0: download of heat flux data not also possible
V2.8.0: add FLIR camera into the downloadroutine, adapt the port interface, that it accept strings and numbers, numbers are automatically used for QRT
V2.7.1: prove the temperature calculation, less ram usage
V2.7.0: implement dependency on upload_config; switch between ArchiveDB and Test archive possible
V2.6.1: bugfixes with verbose level
V2.6.0: dependency on read_restdb removed
V2.5.3: version number included; improved exception handeling
V2.0.0: upgrade an changes to download OP1.2b data, changes of the method and what is stored
V1.1.0: download of thermocouples implemented
V1.0.0: download test of OP1.2a data
\ No newline at end of file
......@@ -11,15 +11,15 @@ if __name__=='__main__':
import downloadversionIRdata as IR_DL
import numpy as np
localpath=""
time_s=4
time_s=13
programlist = ["20171018.011"]
ports=[51]
programlist = ["20180920.010","20180920.049"]
ports=[31]
for program in programlist:
for port in ports:
try:
exist,dimof,data1,valid=IR_DL.get_temp_from_raw_by_program_V2(portnr=port,program=program,time_s=time_s,threads=4)
exist,dimof,data1,valid=IR_DL.get_temp_from_raw_by_program(portnr=port,program=program,time_s=time_s,threads=4,verbose=5)
if exist:
print("data found")
stream="images"
......@@ -27,10 +27,13 @@ if __name__=='__main__':
data1=data1.swapaxes(0,2)
data1=data1.swapaxes(0,1)
dtype = str(data1.dtype)
tmpfile = localpath+"AEF"+str(port)+"_"+program+"_int_temp_V2"
tmpfile = localpath+"AEF"+str(port)+"_"+program+"_temp_V2"
tmpfile += ".h5"
with h5.File(tmpfile, 'w') as f:
f.create_dataset('timestamps', data=dimof, dtype='uint64' )#,compression="gzip")
f.create_dataset(stream, data=data1, dtype='uint16' , chunks = (np.shape(data1)[0],np.shape(data1)[1],1))
dset=f.create_dataset(stream, shape=np.shape(data1),dtype=dtype , chunks = (np.shape(data1)[0],np.shape(data1)[1],1))
data1=np.ascontiguousarray(data1)
dset.write_direct(data1)
del data1
except Exception as E:
print(E)
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 5 09:26:06 2018
Version: 2.7.0
Version: 2.8.0
@author: holn
constants and config parameters
"""
......@@ -50,7 +50,8 @@ portcamdict={
'AEF40': 'IRCam_Caleo768kL_0701',
'AEF41': 'IRCam_Caleo768kL_0902',
'AEF50': 'Infratec_9312907',
'AEF51': 'IRCam_Caleo768kL_0905'}
'AEF51': 'IRCam_Caleo768kL_0905',
'AEK51': 'FLIR_SC8303_00037'}
}
camlimdict={
......
# -*- coding: utf-8 -*-
"""
Created on Wed May 9 14:56:32 2018
Version: 2.5.3
Version: 2.8.0
@author: Holger Niemann, Peter Drewelow, Yu Gao
mainly to clean up the downloadversionIRdata code
......@@ -20,7 +20,6 @@ from os.path import join, basename
import glob
import datetime
def get_OP_by_time(time_ns=None, shot_no=None, program_str=None):
'''Derives operation phase (OP) of W7-X based on either:
a nanosacond time stamp, a MDSplus style shot no. or a program ID.
......@@ -62,7 +61,6 @@ def get_OP_by_time(time_ns=None, shot_no=None, program_str=None):
else:
return None
def bestimmtheitsmass_general(data,fit):
R=0
if len(fit)==len(data):
......@@ -222,7 +220,6 @@ def find_outlier_pixels(frame,tolerance=3,worry_about_edges=True,plot_it=False):
return bad_pixels
def correct_images(images,badpixels):
print('correct_images: New routine restore_bad_pixels() is used and can be called directly. Check out "help(restore_bad_pixels)"')
if type(badpixels)!=int:
......@@ -479,4 +476,20 @@ def load_ref_images(port, exposuretime):
def reconstruct_coldframe (exposuretime, sT, a, bnew, coldref):
cirebuild = a * sT + bnew * exposuretime + coldref
return cirebuild
\ No newline at end of file
return cirebuild
#%% other functions
def check_dublicates(array):
a = array
import collections
return [item for item, count in collections.Counter(a).items() if count > 1]
def check_dublicates_2(array):
seen = set()
uniq = []
for x in array:
if x not in seen:
uniq.append(x)
seen.add(x)
return uniq,seen
\ No newline at end of file
......@@ -5,6 +5,7 @@ download:
- implement absolute calibration
- implement download of the stored temperature data (After the upload)
- implement download of the stored heat flux data (After the upload)
- implement download of FLIR data
upload:
- upload the new nucing files for AEF50 (the workaround)
......@@ -12,5 +13,7 @@ upload:
- upload scene models
- upload temperature
- upload heat flux data
- upload FLIR data
- upload FLIR LUT
This diff is collapsed.
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