Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CCS
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marko Mecina
CCS
Commits
805dc77e
Commit
805dc77e
authored
1 year ago
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
use PT2000 calibration for FEE HK CCD temperature
parent
fd40e614
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Ccs/calibrations_SMILE.py
+16
-9
16 additions, 9 deletions
Ccs/calibrations_SMILE.py
with
16 additions
and
9 deletions
Ccs/calibrations_SMILE.py
+
16
−
9
View file @
805dc77e
...
@@ -523,13 +523,20 @@ SIGNAL_DBS_IASW = {SIGNAL_IASW_DBS[k]: k for k in SIGNAL_IASW_DBS}
...
@@ -523,13 +523,20 @@ SIGNAL_DBS_IASW = {SIGNAL_IASW_DBS[k]: k for k in SIGNAL_IASW_DBS}
def
cal_pt1000
(
temp
):
def
cal_pt1000
(
temp
):
return
cal_ptx
(
temp
,
1000
)
def
cal_pt2000
(
temp
):
return
cal_ptx
(
temp
,
2000
)
def
cal_ptx
(
temp
,
R0
):
"""
"""
Standard DIN EN 60751 PT
1000
transfer curve (-200 - 850°C)
Standard DIN EN 60751 PT
X
transfer curve (-200 - 850°C)
:param temp: temperature in °C
:param temp: temperature in °C
:return: resistance in Ohm
:return: resistance in Ohm
"""
"""
R0
=
1000
A
=
3.9083e-3
A
=
3.9083e-3
B
=
-
5.775e-7
B
=
-
5.775e-7
C
=
-
4.183e-12
C
=
-
4.183e-12
...
@@ -547,22 +554,22 @@ def cal_pt1000(temp):
...
@@ -547,22 +554,22 @@ def cal_pt1000(temp):
_ptx
=
np
.
arange
(
-
200
,
851
)
_ptx
=
np
.
arange
(
-
200
,
851
)
_pty
=
cal_pt
1
000
(
_ptx
)
_pty
=
cal_pt
2
000
(
_ptx
)
_pt
1
000_curve_inv
=
sp
.
interpolate
.
interp1d
(
_pty
,
_ptx
,
kind
=
'
cubic
'
,
fill_value
=
'
extrapolate
'
)
# inverse PT
1
000 curve for Ohm to °C conversion
_pt
2
000_curve_inv
=
sp
.
interpolate
.
interp1d
(
_pty
,
_ptx
,
kind
=
'
cubic
'
,
fill_value
=
'
extrapolate
'
)
# inverse PT
2
000 curve for Ohm to °C conversion
def
t_ccd_fee_adu_to_deg
(
adu
,
ccd
):
def
t_ccd_fee_adu_to_deg
(
adu
,
ccd
):
"""
"""
For CCD temperature reported in FEE HK
For CCD temperature reported in FEE HK
. Uses PT2000?
:param adu:
:param adu:
:param ccd:
:param ccd:
:return:
:return:
"""
"""
if
ccd
==
2
:
if
ccd
==
2
:
return
_pt
1
000_curve_inv
(
adu
*
FEE_CCD2TsA_gain
+
FEE_CCD2TsA_offset
)
return
_pt
2
000_curve_inv
(
adu
*
FEE_CCD2TsA_gain
+
FEE_CCD2TsA_offset
)
elif
ccd
==
4
:
elif
ccd
==
4
:
return
_pt
1
000_curve_inv
(
adu
*
FEE_CCD4TsB_gain
+
FEE_CCD4TsB_offset
)
return
_pt
2
000_curve_inv
(
adu
*
FEE_CCD4TsB_gain
+
FEE_CCD4TsB_offset
)
else
:
else
:
raise
ValueError
(
"
CCD must be either 2 or 4!
"
)
raise
ValueError
(
"
CCD must be either 2 or 4!
"
)
...
@@ -576,9 +583,9 @@ def t_ccd_fee_deg_to_adu(t, ccd):
...
@@ -576,9 +583,9 @@ def t_ccd_fee_deg_to_adu(t, ccd):
:return:
:return:
"""
"""
if
ccd
==
2
:
if
ccd
==
2
:
return
(
cal_pt
1
000
(
t
)
-
FEE_CCD2TsA_offset
)
/
FEE_CCD2TsA_gain
return
(
cal_pt
2
000
(
t
)
-
FEE_CCD2TsA_offset
)
/
FEE_CCD2TsA_gain
elif
ccd
==
4
:
elif
ccd
==
4
:
return
(
cal_pt
1
000
(
t
)
-
FEE_CCD4TsB_offset
)
/
FEE_CCD4TsB_gain
return
(
cal_pt
2
000
(
t
)
-
FEE_CCD4TsB_offset
)
/
FEE_CCD4TsB_gain
else
:
else
:
raise
ValueError
(
"
CCD must be either 2 or 4!
"
)
raise
ValueError
(
"
CCD must be either 2 or 4!
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment