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
404d2cb9
Commit
404d2cb9
authored
Dec 03, 2019
by
Moritz Huetten
Browse files
MAGIC reader compatible with ctapipe 0.7.0.post98
parent
5d11d4e9
Pipeline
#64873
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
ctapipe_io_magic/__init__.py
View file @
404d2cb9
...
...
@@ -80,7 +80,7 @@ class MAGICEventSource(EventSource):
geom
=
CameraGeometry
.
from_name
(
'MAGICCam'
)
self
.
magic_tel_description
=
TelescopeDescription
(
name
=
'MAGIC'
,
tel_type
=
'MAGIC'
,
optics
=
optics
,
camera
=
geom
)
self
.
magic_tel_descriptions
=
{
1
:
self
.
magic_tel_description
,
2
:
self
.
magic_tel_description
}
self
.
magic
_subarray
=
SubarrayDescription
(
'MAGIC'
,
self
.
magic_tel_positions
,
self
.
magic_tel_descriptions
)
self
.
_subarray
_info
=
SubarrayDescription
(
'MAGIC'
,
self
.
magic_tel_positions
,
self
.
magic_tel_descriptions
)
@
staticmethod
def
is_compatible
(
file_mask
):
...
...
@@ -175,6 +175,10 @@ class MAGICEventSource(EventSource):
return
run
@
property
def
subarray
(
self
):
return
self
.
_subarray_info
def
_generator
(
self
):
"""
The default event generator. Return the stereo event
...
...
@@ -276,9 +280,6 @@ class MAGICEventSource(EventSource):
data
.
dl0
.
tels_with_data
=
tels_with_data
data
.
trig
.
tels_with_trigger
=
tels_with_data
# Setting the instrument sub-array
data
.
inst
.
subarray
=
self
.
magic_subarray
yield
data
counter
+=
1
...
...
@@ -387,9 +388,6 @@ class MAGICEventSource(EventSource):
data
.
dl0
.
tels_with_data
=
tels_with_data
data
.
trig
.
tels_with_trigger
=
tels_with_data
# Setting the instrument sub-array
data
.
inst
.
subarray
=
self
.
magic_subarray
yield
data
counter
+=
1
...
...
@@ -498,9 +496,6 @@ class MAGICEventSource(EventSource):
data
.
dl0
.
tels_with_data
=
tels_with_data
data
.
trig
.
tels_with_trigger
=
tels_with_data
# Setting the instrument sub-array
data
.
inst
.
subarray
=
self
.
magic_subarray
yield
data
counter
+=
1
...
...
@@ -559,7 +554,7 @@ class MAGICEventSourceMC(EventSource):
geom
=
CameraGeometry
.
from_name
(
'MAGICCam'
)
self
.
magic_tel_description
=
TelescopeDescription
(
name
=
'MAGIC'
,
tel_type
=
'MAGIC'
,
optics
=
optics
,
camera
=
geom
)
self
.
magic_tel_descriptions
=
{
1
:
self
.
magic_tel_description
,
2
:
self
.
magic_tel_description
}
self
.
magic
_subarray
=
SubarrayDescription
(
'MAGIC'
,
self
.
magic_tel_positions
,
self
.
magic_tel_descriptions
)
self
.
_subarray
_info
=
SubarrayDescription
(
'MAGIC'
,
self
.
magic_tel_positions
,
self
.
magic_tel_descriptions
)
@
staticmethod
def
is_compatible
(
file_name
):
...
...
@@ -600,6 +595,10 @@ class MAGICEventSourceMC(EventSource):
return
is_magic_root_file
@
property
def
subarray
(
self
):
return
self
.
_subarray_info
def
_generator
(
self
):
"""
The default event generator. Return the stereo event
...
...
@@ -682,9 +681,6 @@ class MAGICEventSourceMC(EventSource):
data
.
dl0
.
tels_with_data
=
tels_with_data
data
.
trig
.
tels_with_trigger
=
tels_with_data
# Setting the instrument sub-array
data
.
inst
.
subarray
=
self
.
magic_subarray
# mc = data.mc.tel[self.mc_file.telescope]
# mc.dc_to_pe = array_event['laser_calibrations'][tel_id]['calib']
# mc.pedestal = array_event['camera_monitorings'][tel_id]['pedestal']
...
...
@@ -781,9 +777,6 @@ class MAGICEventSourceMC(EventSource):
data
.
dl0
.
tels_with_data
=
tels_with_data
data
.
trig
.
tels_with_trigger
=
tels_with_data
# Setting the instrument sub-array
data
.
inst
.
subarray
=
self
.
magic_subarray
# mc = data.mc.tel[self.mc_file.telescope]
# mc.dc_to_pe = array_event['laser_calibrations'][tel_id]['calib']
# mc.pedestal = array_event['camera_monitorings'][tel_id]['pedestal']
...
...
Moritz Huetten
@mhuetten
mentioned in issue
#1 (closed)
·
Dec 03, 2019
mentioned in issue
#1 (closed)
mentioned in issue #1
Toggle commit list
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