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
50a65338
Commit
50a65338
authored
8 months ago
by
Laurent Mercadier
Browse files
Options
Downloads
Patches
Plain Diff
Modify load() to look at both raw and proc folders
parent
711e3a11
No related branches found
No related tags found
1 merge request
!299
GH2 and XOX mnemonics
Pipeline
#145436
failed
8 months ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/toolbox_scs/load.py
+7
-8
7 additions, 8 deletions
src/toolbox_scs/load.py
with
7 additions
and
8 deletions
src/toolbox_scs/load.py
+
7
−
8
View file @
50a65338
...
@@ -39,7 +39,6 @@ log = logging.getLogger(__name__)
...
@@ -39,7 +39,6 @@ log = logging.getLogger(__name__)
def
load
(
proposalNB
=
None
,
runNB
=
None
,
def
load
(
proposalNB
=
None
,
runNB
=
None
,
fields
=
None
,
fields
=
None
,
subFolder
=
'
raw
'
,
display
=
False
,
display
=
False
,
validate
=
False
,
validate
=
False
,
subset
=
None
,
subset
=
None
,
...
@@ -48,6 +47,7 @@ def load(proposalNB=None, runNB=None,
...
@@ -48,6 +47,7 @@ def load(proposalNB=None, runNB=None,
extract_xgm
=
True
,
extract_xgm
=
True
,
extract_bam
=
True
,
extract_bam
=
True
,
bunchPattern
=
'
sase3
'
,
bunchPattern
=
'
sase3
'
,
parallelize
=
True
,
):
):
"""
"""
Load a run and extract the data. Output is an xarray with aligned
Load a run and extract the data. Output is an xarray with aligned
...
@@ -66,10 +66,6 @@ def load(proposalNB=None, runNB=None,
...
@@ -66,10 +66,6 @@ def load(proposalNB=None, runNB=None,
{
"
extra
"
: {
'
source
'
:
'
SCS_CDIFFT_MAG/SUPPLY/CURRENT
'
,
{
"
extra
"
: {
'
source
'
:
'
SCS_CDIFFT_MAG/SUPPLY/CURRENT
'
,
'
key
'
:
'
actual_current.value
'
,
'
key
'
:
'
actual_current.value
'
,
'
dim
'
: None}}
'
dim
'
: None}}
subFolder: str
'
raw
'
,
'
proc
'
(processed) or
'
all
'
(both
'
raw
'
and
'
proc
'
) to access
data from either or both of those folders. If
'
all
'
is used, sources
present in
'
proc
'
overwrite those in
'
raw
'
. The default is
'
raw
'
.
display: bool
display: bool
whether to show the run.info or not
whether to show the run.info or not
validate: bool
validate: bool
...
@@ -97,10 +93,13 @@ def load(proposalNB=None, runNB=None,
...
@@ -97,10 +93,13 @@ def load(proposalNB=None, runNB=None,
bunchPattern: str
bunchPattern: str
bunch pattern used to extract the Fast ADC pulses.
bunch pattern used to extract the Fast ADC pulses.
A string or a dict as in::
A string or a dict as in::
{
'
FFT_PD2
'
:
'
sase3
'
,
'
ILH_I0
'
:
'
scs_ppl
'
}
{
'
FFT_PD2
'
:
'
sase3
'
,
'
ILH_I0
'
:
'
scs_ppl
'
}
Ignored if extract_digitizers=False.
Ignored if extract_digitizers=False.
parallelize: bool
from EXtra-Data: enable or disable opening files in parallel.
Particularly useful if creating child processes is not allowed
(e.g. in a daemonized multiprocessing.Process).
Returns
Returns
-------
-------
...
@@ -114,8 +113,8 @@ def load(proposalNB=None, runNB=None,
...
@@ -114,8 +113,8 @@ def load(proposalNB=None, runNB=None,
>>>
run
,
data
=
tb
.
load
(
2212
,
208
,
[
'
SCS_SA3
'
,
'
MCP2apd
'
,
'
nrj
'
])
>>>
run
,
data
=
tb
.
load
(
2212
,
208
,
[
'
SCS_SA3
'
,
'
MCP2apd
'
,
'
nrj
'
])
"""
"""
runFolder
=
find_run_path
(
proposalNB
,
runNB
,
subFolder
)
runFolder
=
find_run_path
(
proposalNB
,
runNB
,
'
raw
'
)
run
=
ed
.
RunDirectory
(
runFolder
)
run
=
ed
.
open_run
(
proposalNB
,
runNB
,
data
=
'
all
'
,
parallelize
=
parallelize
)
if
subset
is
not
None
:
if
subset
is
not
None
:
run
=
run
.
select_trains
(
subset
)
run
=
run
.
select_trains
(
subset
)
if
fields
is
None
:
if
fields
is
None
:
...
...
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