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
3cc98c16
Commit
3cc98c16
authored
3 years ago
by
Laurent Mercadier
Browse files
Options
Downloads
Patches
Plain Diff
Modified mnemonics_for_run() to take proposalNB and runNB as inputs
parent
569b56ad
No related branches found
No related tags found
1 merge request
!142
Newton
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/toolbox_scs/mnemonics_machinery.py
+14
-7
14 additions, 7 deletions
src/toolbox_scs/mnemonics_machinery.py
with
14 additions
and
7 deletions
src/toolbox_scs/mnemonics_machinery.py
+
14
−
7
View file @
3cc98c16
...
...
@@ -9,7 +9,7 @@
import
logging
from
.constants
import
mnemonics
as
_mnemonics
from
extra_data
import
open_run
__all__
=
[
'
mnemonics_for_run
'
]
...
...
@@ -17,15 +17,20 @@ __all__ = [
log
=
logging
.
getLogger
(
__name__
)
def
mnemonics_for_run
(
run
):
def
mnemonics_for_run
(
prop_or_run
,
runNB
=
None
):
"""
Returns the availble ToolBox mnemonics for a give extra_data
DataCollection
DataCollection
, or a given proposal + run number.
Parameters
----------
run: extra_data DataCollection
The run to check for mnemonics
prop_or_run: extra_data DataCollection or int
The run (DataCollection) to check for mnemonics.
Alternatively, the proposal number (int), for which the runNB
is also required.
runNB: int
The run number. Only used if the first argument is the proposal
number.
Returns
-------
...
...
@@ -35,9 +40,11 @@ def mnemonics_for_run(run):
Example
-------
>>>
import
toolbox_scs
as
tb
>>>
run
,
_
=
tb
.
load
(
2212
,
213
)
>>>
tb
.
mnemonics_for_run
(
run
)
>>>
tb
.
mnemonics_for_run
(
2212
,
213
)
"""
run
=
prop_or_run
if
runNB
is
not
None
:
run
=
open_run
(
prop_or_run
,
runNB
)
result
=
{}
for
m
in
_mnemonics
:
version
=
mnemo_version_index
(
run
,
m
)
...
...
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