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
07c10e03
Commit
07c10e03
authored
8 months ago
by
Karim Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
fix: use if/raise instead of assert
parent
aa60bebc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1035
feat[Jungfrau][Dark]: use CalibrationData to retrieve prior CCVs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cal_tools/calcat_interface2.py
+4
-2
4 additions, 2 deletions
src/cal_tools/calcat_interface2.py
with
4 additions
and
2 deletions
src/cal_tools/calcat_interface2.py
+
4
−
2
View file @
07c10e03
...
...
@@ -500,8 +500,10 @@ class CalibrationData(Mapping):
begin_at_strategy
=
"
closest
"
,
):
accepted_strategies
=
[
"
closest
"
,
"
prior
"
]
strategy_error_msg
=
f
"
Invalid begin_at_strategy. Expected one of
{
accepted_strategies
}
"
assert
begin_at_strategy
in
accepted_strategies
,
strategy_error_msg
if
begin_at_strategy
not
in
accepted_strategies
:
raise
ValueError
(
"
Invalid begin_at_strategy.
"
f
"
Expected one of
{
accepted_strategies
}
"
)
if
calibrations
is
None
:
calibrations
=
set
(
condition
.
calibration_types
)
...
...
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