Commit 29aaaffa authored by Holger Niemann's avatar Holger Niemann
Browse files

bug fix due to movement of the analysed data from Test into ArchiveDB on the 2.4.2019

parent c508f913
...@@ -2835,7 +2835,7 @@ def get_heatflux_profile(port,profile,finger=None,timepoint=1,program=None,tstar ...@@ -2835,7 +2835,7 @@ def get_heatflux_profile(port,profile,finger=None,timepoint=1,program=None,tstar
return False,0,0,0 return False,0,0,0
def extract_heatflux_profile_from_DL(time,images,profile,finger=None,time_window=1, def extract_heatflux_profile_from_DL(time,images,profile,finger=None,time_window=1,
inputchecked=False,verbose=0): inputchecked=False,verbose=0,testmode=False):
""" """
return exist,time,s in m, heat flux in W/m2 return exist,time,s in m, heat flux in W/m2
time_point default (None) returns entire shot. time_point default (None) returns entire shot.
...@@ -2879,7 +2879,7 @@ def extract_heatflux_profile_from_DL(time,images,profile,finger=None,time_window ...@@ -2879,7 +2879,7 @@ def extract_heatflux_profile_from_DL(time,images,profile,finger=None,time_window
else: else:
fingerID=finger*100+profile fingerID=finger*100+profile
### okay finderID is fine, data is given, lets get the mapping ### okay finderID is fine, data is given, lets get the mapping
exist,mapping=download_heatflux_mapping_reference() exist,mapping=download_heatflux_mapping_reference(testmode=testmode)
if exist: if exist:
Fingermap=np.asarray(mapping['Finger_ID'][0],dtype=np.int) Fingermap=np.asarray(mapping['Finger_ID'][0],dtype=np.int)
locs=np.where(Fingermap==fingerID) locs=np.where(Fingermap==fingerID)
......
...@@ -5,7 +5,7 @@ V3.2.0 ...@@ -5,7 +5,7 @@ V3.2.0
@author: holn @author: holn
""" """
import numpy as np import numpy as np
import IR_data_access.downloadversionIRdata as IR import downloadversionIRdata as IR
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import datetime import datetime
...@@ -16,12 +16,12 @@ if __name__=='__main__': ...@@ -16,12 +16,12 @@ if __name__=='__main__':
#%% loading data #%% loading data
print(datetime.datetime.now(),"start") print(datetime.datetime.now(),"start")
status,times,images=IR.download_heatflux_by_program(port,program,time_window=0.9,version=1,threads=1,verbose=5) status,times,images=IR.download_heatflux_by_program(port,program,time_window=0.9,version=1,threads=1,verbose=5,testmode=False)
print('done') print('done')
#%% plotting data #%% plotting data
if status: if status:
status2,time,s,q=IR.extract_heatflux_profile_from_DL((np.asarray(times)-times[0])/1e9,images,profile="TM3h_5_5",time_window=0.5,verbose=5) status2,time,s,q=IR.extract_heatflux_profile_from_DL((np.asarray(times)-times[0])/1e9,images,profile="TM3h_5_5",time_window=0.5,verbose=5,testmode=False)
plt.figure() plt.figure()
plt.imshow(images[-1]/1e6) plt.imshow(images[-1]/1e6)
plt.clim([0,4]) plt.clim([0,4])
......
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