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
5a7f78a0
Commit
5a7f78a0
authored
Dec 19, 2019
by
Moritz Huetten
Browse files
updated doc and version 0.2.0
parent
e794bf3c
Pipeline
#65835
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
5a7f78a0
...
@@ -30,3 +30,22 @@ with MAGICEventSource(input_url=file_name) as source:
...
@@ -30,3 +30,22 @@ with MAGICEventSource(input_url=file_name) as source:
...
some
processing
...
...
some
processing
...
```
```
The reader also works with multiple files parsed as wildcards, e.g.,
```
python
MAGICEventSource
(
input_url
=
data_dir
/*
.
root
)
```
This is necessary to load and match stereo events, which are automatically created if data files from M1 and M2 for the same run are loaded.
The reader is able to handle data or Monte Carlo files, which are automatically recognized. Note that the file names have to follow the convention:
-
`*_M[1-2]_RUNNUMBER.SUBRUNNR_Y_*.root`
for data
-
`*_M[1-2]_za??to??_?_RUNNUMBER_Y_*.root`
for Monte Carlos.
Note that currently, when loading multiple runs at once, the event ID is not unique.
#### Changelog
-
v0.1: Initial version
-
v0.2.0: Unification of data and MC reading
ctapipe_io_magic/__init__.py
View file @
5a7f78a0
...
@@ -152,7 +152,7 @@ class MAGICEventSource(EventSource):
...
@@ -152,7 +152,7 @@ class MAGICEventSource(EventSource):
A run number of the file.
A run number of the file.
"""
"""
mask_data
=
r
".*\d+_M\d+_(\d+)\.\d+_.*"
mask_data
=
r
".*\d+_M\d+_(\d+)\.\d+_
Y_
.*"
mask_mc
=
r
".*_M\d_za\d+to\d+_\d_(\d+)_Y_.*"
mask_mc
=
r
".*_M\d_za\d+to\d+_\d_(\d+)_Y_.*"
mask_mc_alt
=
r
".*_M\d_\d_(\d+)_.*"
mask_mc_alt
=
r
".*_M\d_\d_(\d+)_.*"
if
len
(
re
.
findall
(
mask_data
,
file_name
))
>
0
:
if
len
(
re
.
findall
(
mask_data
,
file_name
))
>
0
:
...
...
setup.py
View file @
5a7f78a0
...
@@ -10,7 +10,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
...
@@ -10,7 +10,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
setup
(
setup
(
name
=
'ctapipe_io_magic'
,
name
=
'ctapipe_io_magic'
,
packages
=
find_packages
(),
packages
=
find_packages
(),
version
=
'0.
1
'
,
version
=
'0.
2.0
'
,
description
=
'ctapipe plugin for reading of the calibrated MAGIC files'
,
description
=
'ctapipe plugin for reading of the calibrated MAGIC files'
,
long_description
=
long_description
,
long_description
=
long_description
,
long_description_content_type
=
'text/markdown'
,
long_description_content_type
=
'text/markdown'
,
...
...
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