Commit 5a7f78a0 authored by Moritz Huetten's avatar Moritz Huetten
Browse files

updated doc and version 0.2.0

parent e794bf3c
Pipeline #65835 canceled with stage
......@@ -30,3 +30,22 @@ with MAGICEventSource(input_url=file_name) as source:
...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
......@@ -152,7 +152,7 @@ class MAGICEventSource(EventSource):
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_alt = r".*_M\d_\d_(\d+)_.*"
if len(re.findall(mask_data, file_name)) > 0:
......
......@@ -10,7 +10,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
setup(
name='ctapipe_io_magic',
packages=find_packages(),
version='0.1',
version='0.2.0',
description='ctapipe plugin for reading of the calibrated MAGIC files',
long_description=long_description,
long_description_content_type='text/markdown',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment