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
06ad6a49
Commit
06ad6a49
authored
Dec 04, 2021
by
Alessio Berti
Browse files
Update tests.
parent
bb78f684
Pipeline
#116643
failed with stage
in 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ctapipe_io_magic/tests/test_magic_event_source.py
View file @
06ad6a49
...
...
@@ -68,7 +68,6 @@ def test_len():
def
test_geom
():
dataset
=
get_dataset_path
(
"20131004_M1_05029747.003_Y_MagicCrab-W0.40+035.root"
)
dataset
=
dataset
.
replace
(
'_M1_'
,
'_M*_'
)
with
MAGICEventSource
(
input_url
=
dataset
)
as
source
:
event
=
next
(
source
.
_generator
())
...
...
@@ -78,7 +77,6 @@ def test_geom():
def
test_eventseeker
():
dataset
=
get_dataset_path
(
"20131004_M1_05029747.003_Y_MagicCrab-W0.40+035.root"
)
dataset
=
dataset
.
replace
(
'_M1_'
,
'_M*_'
)
with
MAGICEventSource
(
input_url
=
dataset
)
as
source
:
seeker
=
EventSeeker
(
source
)
...
...
@@ -92,12 +90,9 @@ def test_eventseeker():
def
test_eventcontent
():
dataset
=
get_dataset_path
(
"20131004_M1_05029747.003_Y_MagicCrab-W0.40+035.root"
)
dataset
=
dataset
.
replace
(
'_M1_'
,
'_M*_'
)
with
MAGICEventSource
(
input_url
=
dataset
)
as
source
:
seeker
=
EventSeeker
(
source
)
event
=
seeker
.
get_event_index
(
0
)
assert
event
.
dl1
.
tel
[
1
].
image
[
0
]
==
-
0.53125
assert
event
.
dl1
.
tel
[
2
].
image
[
0
]
==
2.2265625
assert
event
.
dl1
.
tel
[
1
].
peak_time
[
0
]
==
49.125
assert
event
.
dl1
.
tel
[
2
].
peak_time
[
0
]
==
23.5625
Write
Preview
Markdown
is supported
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