Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
ToolBox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
SCS
ToolBox
Commits
ced0d2cd
Commit
ced0d2cd
authored
2 years ago
by
Laurent Mercadier
Browse files
Options
Downloads
Patches
Plain Diff
raise ValueError if sase is unknownn
parent
0229c1b9
No related branches found
No related tags found
1 merge request
!234
Only use bunch pattern table when necessary
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/toolbox_scs/misc/bunch_pattern.py
+5
-1
5 additions, 1 deletion
src/toolbox_scs/misc/bunch_pattern.py
with
5 additions
and
1 deletion
src/toolbox_scs/misc/bunch_pattern.py
+
5
−
1
View file @
ced0d2cd
...
...
@@ -35,7 +35,7 @@ def npulses_has_changed(run, sase='sase3', run_mnemonics=None):
"""
Checks if the number of pulses has changed during the run for
a specific location `sase` (=
'
sase1
'
,
'
sase3
'
,
'
scs_ppl
'
or
'
laser
'
)
If the source is not found, returns True.
If the source is not found
in the run
, returns True.
Parameters
----------
...
...
@@ -52,6 +52,10 @@ def npulses_has_changed(run, sase='sase3', run_mnemonics=None):
True if the number of pulses has changed or the source was not
found, False if the number of pulses did not change.
"""
sase_list
=
[
'
sase1
'
,
'
sase3
'
,
'
laser
'
,
'
scs_ppl
'
]
if
sase
not
in
sase_list
:
raise
ValueError
(
f
"
Unknow sase location
'
{
sase
}
'
. Expected one in
"
f
"
{
sase_list
}
"
)
if
run_mnemonics
is
None
:
run_mnemonics
=
mnemonics_for_run
(
run
)
if
sase
==
'
scs_ppl
'
:
...
...
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