Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
900c9d05
Commit
900c9d05
authored
1 year ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Try adding test for missing constant but module 'present'
parent
1ed72b68
No related branches found
No related tags found
1 merge request
!885
Revised CalCat API
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_calcat_interface2.py
+21
-4
21 additions, 4 deletions
tests/test_calcat_interface2.py
with
21 additions
and
4 deletions
tests/test_calcat_interface2.py
+
21
−
4
View file @
900c9d05
...
@@ -4,6 +4,7 @@ from cal_tools.calcat_interface2 import (
...
@@ -4,6 +4,7 @@ from cal_tools.calcat_interface2 import (
CalibrationData
,
CalibrationData
,
AGIPDConditions
,
AGIPDConditions
,
DSSCConditions
,
DSSCConditions
,
LPDConditions
,
SingleConstantVersion
,
SingleConstantVersion
,
)
)
...
@@ -67,11 +68,27 @@ def test_DSSC_modules_missing():
...
@@ -67,11 +68,27 @@ def test_DSSC_modules_missing():
)
)
# DSSC was used with only 3 quadrants at this point
# DSSC was used with only 3 quadrants at this point
modnos
=
list
(
range
(
4
))
+
list
(
range
(
8
,
16
))
modnos
=
list
(
range
(
4
))
+
list
(
range
(
8
,
16
))
assert
dssc_cd
.
aggregator_names
==
[
f
'
DSSC
{
m
:
02
}
'
for
m
in
modnos
]
assert
dssc_cd
.
aggregator_names
==
[
f
"
DSSC
{
m
:
02
}
"
for
m
in
modnos
]
assert
dssc_cd
.
module_nums
==
modnos
assert
dssc_cd
.
module_nums
==
modnos
assert
dssc_cd
.
qm_names
==
[
assert
dssc_cd
.
qm_names
==
[
f
"
Q
{
(
m
//
4
)
+
1
}
M
{
(
m
%
4
)
+
1
}
"
for
m
in
modnos
]
f
"
Q
{
(
m
//
4
)
+
1
}
M
{
(
m
%
4
)
+
1
}
"
for
m
in
modnos
]
@pytest.mark.requires_gpfs
def
test_LPD_constant_missing
():
lpd_cd
=
CalibrationData
.
from_condition
(
LPDConditions
(
memory_cells
=
200
,
sensor_bias_voltage
=
250
),
"
FXE_DET_LPD1M-1
"
,
event_at
=
"
2022-05-22T02:00:00
"
,
)
# Constants are missing for 1 module (LPD05), but it was still included in
# the PDUs for the detector, so it should still appear in the lists.
modnos
=
range
(
16
)
assert
lpd_cd
.
aggregator_names
==
[
f
"
DSSC
{
m
:
02
}
"
for
m
in
modnos
]
assert
lpd_cd
.
module_nums
==
modnos
assert
lpd_cd
.
qm_names
==
[
f
"
Q
{
(
m
//
4
)
+
1
}
M
{
(
m
%
4
)
+
1
}
"
for
m
in
modnos
]
assert
len
(
lpd_cd
[
"
Offset
"
].
module_nums
)
==
16
assert
len
(
lpd_cd
[
"
Offset
"
].
constants
)
==
15
@pytest.mark.xfail
@pytest.mark.xfail
...
...
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