Skip to content
GitLab
Menu
Projects
Groups
Snippets
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
fe76322f
Commit
fe76322f
authored
Dec 10, 2018
by
Holger Niemann
Browse files
update V3.0.2: update also the plot example to the changes, and a small bugfix
parent
43a0dbe8
Changes
2
Hide whitespace changes
Inline
Side-by-side
downloadversionIRdata.py
View file @
fe76322f
...
...
@@ -2622,7 +2622,7 @@ def extract_heatflux_profile_from_DL(time,images,profile,finger=None,timewindow=
Fingermap
=
np
.
asarray
(
mapping
[
'Finger_ID'
][
0
],
dtype
=
np
.
int
)
locs
=
np
.
where
(
Fingermap
==
fingerID
)
S
=
mapping
[
's'
][
locs
]
q
=
images
[
Tid_start
:
Tid_end
][
locs
]
q
=
np
.
asarray
([
images
[
i
][
locs
]
for
i
in
range
(
Tid_start
,
Tid_end
)])
return
True
,
time
[
Tid_start
:
Tid_end
],
S
,
q
else
:
if
verbose
>
0
:
...
...
plot_heatflux_example.py
View file @
fe76322f
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 29 17:41:40 2018
V3.0.
0
V3.0.
2
@author: holn
"""
import
numpy
as
np
...
...
@@ -12,13 +12,13 @@ if __name__=='__main__':
#%% loading data
print
(
datetime
.
datetime
.
now
(),
"start"
)
status
,
times
,
images
=
IR
.
download_heatflux_by_program
(
20
,
"20171109.008"
,
timewindow
=
3.1
,
version
=
1
,
threads
=
1
,
verbose
=
5
)
status
,
times
,
images
=
IR
.
download_heatflux_by_program
(
20
,
"20171109.008"
,
timewindow
=
0.9
,
version
=
1
,
threads
=
1
,
verbose
=
5
)
print
(
'done'
)
#%% plotting data
status2
,
time
,
s
,
q
=
IR
.
extract_heatflux_profile_from_DL
((
np
.
asarray
(
times
)
-
times
[
0
])
/
1e9
,
images
,
profile
=
"TM3h_5_5"
,
time
point
=
1
,
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
,
0.5
]
,
verbose
=
5
)
plt
.
figure
()
plt
.
imshow
(
images
[
220
]
/
1e6
)
plt
.
imshow
(
images
[
-
1
]
/
1e6
)
plt
.
clim
([
0
,
4
])
plt
.
tick_params
(
axis
=
'both'
,
# changes apply to the x-axis
which
=
'both'
,
# both major and minor ticks are affected
...
...
@@ -30,14 +30,27 @@ 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 - 2.2s - AEF20IR - in MWm2.png'
,
dpi
=
300
,
bbox_inches
=
'tight'
)
plt
.
figure
()
plt
.
plot
(
s
,
q
/
1e6
,
'ko-'
)
plt
.
xlabel
(
"s [m]"
,
fontsize
=
26
)
plt
.
ylabel
(
"q [MW/m2]"
,
fontsize
=
26
)
plt
.
tick_params
(
labelsize
=
26
)
plt
.
title
(
"20171109.008 heat flux profile for TM3, finger 5, profile 5 @1s"
,
fontsize
=
26
)
plt
.
grid
()
plt
.
ylim
(
bottom
=
0
)
plt
.
show
()
\ No newline at end of file
plt
.
savefig
(
'20171109.008 - '
+
str
(
round
((
np
.
asarray
(
times
[
-
1
])
-
times
[
0
])
/
1e9
,
2
))
+
' - AEF20IR - in MWm2.png'
,
dpi
=
300
,
bbox_inches
=
'tight'
)
if
len
(
np
.
shape
(
q
))
==
1
:
plt
.
figure
()
plt
.
plot
(
s
,
q
/
1e6
,
'ko-'
)
plt
.
xlabel
(
"s [m]"
,
fontsize
=
26
)
plt
.
ylabel
(
"q [MW/m2]"
,
fontsize
=
26
)
plt
.
tick_params
(
labelsize
=
26
)
plt
.
title
(
"20171109.008 heat flux profile for TM3, finger 5, profile 5 @1s"
,
fontsize
=
26
)
plt
.
grid
()
plt
.
ylim
(
bottom
=
0
)
plt
.
show
()
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
)
plt
.
xlabel
(
"time [s]"
,
fontsize
=
26
)
plt
.
ylabel
(
"s [m]"
,
fontsize
=
26
)
plt
.
tick_params
(
labelsize
=
26
)
cb
=
plt
.
colorbar
()
cb
.
set_label
(
'heatflux in MW/m²'
,
rotation
=
270
,
labelpad
=
15
,
fontsize
=
26
)
cb
.
ax
.
tick_params
(
labelsize
=
26
)
plt
.
title
(
"20171109.008 heat flux profile for TM3, finger 5, profile 5"
,
fontsize
=
26
)
plt
.
show
()
\ No newline at end of file
Write
Preview
Supports
Markdown
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