Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Holger Niemann
IR_data_access
Commits
1520f50b
Commit
1520f50b
authored
Jan 15, 2020
by
Holger Niemann
Browse files
Merge branch 'Holgers' into 'master'
Holgers See merge request
!43
parents
b84fad53
ae53838d
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
IR_image_tools.py
View file @
1520f50b
This diff is collapsed.
Click to expand it.
downloadversionIRdata.py
View file @
1520f50b
This diff is collapsed.
Click to expand it.
plot_IR_data.py
View file @
1520f50b
...
...
@@ -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
[
22
0
])
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
...
...
plot_heatflux_example.py
View file @
1520f50b
...
...
@@ -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
))
+
' - AEF
20
IR - 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))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment