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
71be4d28
Commit
71be4d28
authored
Jan 27, 2021
by
Alessio Berti
Browse files
Fix to be able to use relative paths in the event source.
parent
eb631d6b
Pipeline
#92299
failed with stage
in 8 minutes and 28 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
ctapipe_io_magic/__init__.py
View file @
71be4d28
...
...
@@ -8,6 +8,7 @@ import logging
import
glob
import
re
import
os.path
from
pathlib
import
Path
import
numpy
as
np
...
...
@@ -109,7 +110,8 @@ class MAGICEventSource(EventSource):
the 'input_url' parameter.
"""
self
.
file_list
=
glob
.
glob
(
kwargs
[
'input_url'
])
file_path
=
Path
(
kwargs
[
'input_url'
])
self
.
file_list
=
glob
.
glob
(
str
(
file_path
.
absolute
()))
if
not
self
.
file_list
:
raise
ValueError
(
"Unreadable or wrong wildcard file path given."
)
self
.
file_list
.
sort
()
...
...
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