Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Bold
IR_data_access
Commits
de606bea
Commit
de606bea
authored
Feb 19, 2020
by
Holger Niemann
Browse files
Bugfix/Hotfix: Badpixel corrections was not applied for 7 cameras in OP1.2a --> fixed
parent
3d4f0f86
Changes
1
Hide whitespace changes
Inline
Side-by-side
downloadversionIRdata.py
View file @
de606bea
...
...
@@ -300,6 +300,9 @@ def download_NUC_by_times(port, starttime, stoptime, exposure, testmode=False, v
def
get_NUC_by_program
(
port
,
program
,
exposure
,
version
=
0
,
testmode
=
False
,
verbose
=
0
):
'''
Loads NUC elements (gain, offset cold image, bad pixels) for an IR camera
in a given port and time interval. Depending on time and camera, reconstruct
the cold frame and/or compute the gain, offset from the hot and cold frame.
'''
# prog=get_program_from_PID(program)
# try:
...
...
@@ -382,7 +385,12 @@ def get_NUC_by_times(port, starttime, stoptime, t_exp, version=0, testmode=False
else
:
if
verbose
>
0
:
print
(
'get_NUC_by_times: downloading NUC'
)
return
download_NUC_by_times
(
port
,
starttime
,
stoptime
,
t_exp
,
testmode
=
testmode
)
NUC_DL
=
download_NUC_by_times
(
port
,
starttime
,
stoptime
,
t_exp
,
testmode
=
testmode
)
#True, images, ['gain', 'offset', 'cold', 'badpixels', 'gain_error', 'offset_error']
if
NUC_DL
[
0
]:
badpixels
=
find_badpixels
(
port
,
NUC_DL
[
1
][
0
],
NUC_DL
[
1
][
1
],
niterations
=
10
,
tolerance
=
10
,
verbose
=
verbose
-
1
)
NUC_DL
[
1
][
3
]
=
badpixels
return
NUC_DL
elif
OP
==
"OP1.2b"
:
gain_error
=
0
offset_error
=
0
...
...
@@ -2538,7 +2546,7 @@ def get_calib_data(port, program=None, t0=None, t1=None, t6=None, emissivity=0.8
# treat cameras with and w/o filters differently
if
cfilter
==
0
and
not
Camera
.
split
(
"_"
)[
0
]
==
"Infratec"
:
# --- I
nfratec
Camera case ---
# --- I
rcam
Camera case ---
if
verbose
>
0
:
print
(
'get_calib_data: getting NUC arrays'
)
NUC_DL
=
get_NUC_by_times
(
port
,
t0
,
t1
,
t_exp
,
version
,
testmode
,
verbose
=
verbose
-
1
)
#download_NUC_by_times(port, t0, t1, t_exp, version)
...
...
@@ -2585,7 +2593,7 @@ def get_calib_data(port, program=None, t0=None, t1=None, t6=None, emissivity=0.8
raise
Warning
(
"get_calib_data: cannot find the first frame of the discharge, reconstruction failed"
)
# return False, 0, LUT, 0, gain, offset, badpixels, t_exp, cfilter, gain_error, offset_error
else
:
# --- I
rcam
Camera case ---
# --- I
nfratec
Camera case ---
gain
=
0
offset
=
0
badpixels
=
0
...
...
@@ -3399,8 +3407,36 @@ def extract_temperature_profile_from_DL(port, time, images, profile, finger=None
------
port: int or str
the camera port as number or full string (e.g. 'AEF10')
return exist, time, s in m, heat flux in W/m2
time_point default (None) returns entire shot.
time: array or numpy array
the time vector for the given images
images: numpy array
temperature flux images, from which the profile should be extracted
profile:
finger:
time_window:
inputchecked:
verbose: integer, optional
feedback level (details of print messages)
reference_time : float, optional, default is 0
reference timepoint for the mapping data
RESULT
------
exist: boolean
indicates whether data was found (True) or not (False)
time
s in m
heat flux in W/m2
NOTES
-----
"""
goon
=
True
if
time_window
==
None
:
...
...
@@ -3719,6 +3755,8 @@ the following functions are copied from W7xrest.read_restdb to remove this depen
def
read_restdb_old
(
request_url
):
"""
Reads JSON data from W7-X REST API
INPUT
------
Returns
------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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