Commit 1520f50b authored by Holger Niemann's avatar Holger Niemann
Browse files

Merge branch 'Holgers' into 'master'

Holgers

See merge request !43
parents b84fad53 ae53838d
This diff is collapsed.
This diff is collapsed.
......@@ -7,22 +7,31 @@ loading IR data and printing plots
@author: pdd
"""
import numpy as np
#import numpy as np
import datetime
import downloadversionIRdata as downIR
import matplotlib.pyplot as plt
import datetime
if __name__=='__main__':
if __name__ == '__main__':
#%% loading data
print(datetime.datetime.now(),"start")
status,time,images,valid=downIR.get_temp_from_raw_by_program(10,"20180801.017",time_window=2.5,emi=0.8,T_version=2,version=0,threads=1,give_ERROR=False,verbose=5)
print(datetime.datetime.now(), "start")
status, time, images, valid = downIR.get_temp_from_raw_by_program(10,
"20180920.017",
time_window=[1, 1.1],
emi=0.8,
T_version=2,
version=0,
threads=1,
give_ERROR=False,
verbose=5)
print('fertig')
#%% plotting data
plt.figure()
plt.imshow(images[220])
plt.clim([280,630])
plt.imshow(images[0], cmap=plt.jet())
plt.clim([280, 630])
plt.tick_params(axis='both', # changes apply to the x-axis
which='both', # both major and minor ticks are affected
bottom='off', # ticks along the bottom edge are off
......
......@@ -9,22 +9,24 @@ import downloadversionIRdata as IR
import matplotlib.pyplot as plt
import datetime
port=51 # 20
program="20180927.017"#"20180904.007"#"20171207.022" # "20181004.012"
port = 51 # 20
program = "20180814.024"#"20171207.027"#"20181016.023"#"20180927.017"#"20180904.007"#"20171207.022" # "20181004.012"
profile = "TM3h_5_7"
if __name__=='__main__':
#%% loading data
print(datetime.datetime.now(),"start")
status,times,images=IR.download_heatflux_by_program(port,program,time_window=6.5,version=2,threads=1,verbose=5,testmode=False)
status,times,images=IR.download_heatflux_by_program(port,program,time_window=[0,2],version=2,threads=1,verbose=5,testmode=False)
print('done')
#%% plotting data
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=None,verbose=5,testmode=False)
status2,time,s,q=IR.extract_heatflux_profile_from_DL((np.asarray(times)-times[0])/1e9,images,profile=profile,time_window=[0.5,1.5],verbose=5,testmode=False)
plt.figure()
plt.imshow(images[-1]/1e6)
plt.clim([0,4])
plt.imshow(images[0]/1e6)
plt.clim([0,1])
plt.tick_params(axis='both', # changes apply to the x-axis
which='both', # both major and minor ticks are affected
bottom='off', # ticks along the bottom edge are off
......@@ -35,20 +37,20 @@ if __name__=='__main__':
labelbottom='off') # labels along the bottom edge are off
c_ax = plt.colorbar()
c_ax.set_label('q [MW/m2]')
plt.savefig('20171109.008 - '+str(round((np.asarray(times[-1])-times[0])/1e9,2))+' - AEF20IR - in MWm2.png', dpi=300, bbox_inches='tight')
plt.savefig(program+' - '+str(round((np.asarray(times[-1])-times[0])/1e9,2))+' - AEF{0}IR - in MWm2.png'.format(port), dpi=300, bbox_inches='tight')
if len(np.shape(q))==1 or np.shape(q)[0]==1:
if np.shape(q)[0]==1:
q=q[0]
plt.figure()
plt.plot(s,q/1e6,'ko-')
plt.xlabel("s [m]",fontsize=26)
plt.ylabel("q [MW/m2]",fontsize=26)
plt.xlabel("s [m]", fontsize=26)
plt.ylabel("q [MW/m2]", fontsize=26)
plt.tick_params(labelsize=26)
plt.title("{0} heat flux profile for TM3, finger 5, profile 5 @1s".format(program),fontsize=26)
plt.title("{0} heat flux profile for {1}, finger {2}, profile {3} @1s".format(program,profile.split("_")[0],profile.split("_")[1],profile.split("_")[2]),fontsize=26)
plt.grid()
plt.ylim(bottom=0)
plt.ylim(bottom = 0)
plt.show()
elif len(np.shape(q))==2:
elif len(np.shape(q)) == 2:
plt.figure()
X,Y=np.meshgrid(time,s)
plt.pcolor(X,Y,q.swapaxes(0,1)/1e6,vmin=0)
......@@ -58,7 +60,7 @@ if __name__=='__main__':
cb=plt.colorbar()
cb.set_label('heatflux in MW/m²', rotation=270, labelpad=15,fontsize=26)
cb.ax.tick_params(labelsize=26)
plt.title("{0} heat flux profile for TM3, finger 5, profile 5".format(program),fontsize=26)
plt.title("{0} heat flux profile for {1}, finger {2}, profile {3} @1s".format(program,profile.split("_")[0],profile.split("_")[1],profile.split("_")[2]),fontsize=26)
plt.show()
# status3,mapping=IR.download_heatflux_scene_model_reference(port,program=program,verbose=0)
# bild=np.zeros((768,1024))
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