Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ievgen Vovk
ctapipe_io_magic
Commits
1d72e17d
Commit
1d72e17d
authored
Nov 29, 2021
by
Alessio Berti
Browse files
Assign run number and mc flag.
parent
3a9b0221
Pipeline
#116182
failed with stage
in 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ctapipe_io_magic/__init__.py
View file @
1d72e17d
...
...
@@ -117,15 +117,8 @@ class MAGICEventSource(EventSource):
run_numbers
=
run_info
[
0
]
is_mc_runs
=
run_info
[
1
]
self
.
run_numbers
,
indices
=
np
.
unique
(
run_numbers
,
return_index
=
True
)
is_mc_runs
=
[
is_mc_runs
[
i
]
for
i
in
indices
]
is_mc_runs
=
np
.
unique
(
is_mc_runs
)
# Checking if runt type (data/MC) is consistent:
if
len
(
is_mc_runs
)
>
1
:
raise
ValueError
(
"Loaded files contain data and MC runs. Please load only data OR Monte Carlos."
)
self
.
is_mc
=
is_mc_runs
[
0
]
self
.
run_numbers
=
run_numbers
self
.
is_mc
=
is_mc_runs
# Retrieving the data level (so far HARDCODED Sorcerer)
self
.
datalevel
=
DataLevel
.
DL1_IMAGES
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment