Commit 3fc6ea13 authored by Alessio Berti's avatar Alessio Berti
Browse files

In MarsRun, return empty dicts/arrays when file list is empty (e.g. when...

In MarsRun, return empty dicts/arrays when file list is empty (e.g. when reading file only from one1 telescope)
parent dd76f9ba
...@@ -980,6 +980,11 @@ class MarsRun: ...@@ -980,6 +980,11 @@ class MarsRun:
event_data['file_edges'] = [0] event_data['file_edges'] = [0]
# if no file in the list (e.g. when reading mono information), then simply
# return empty dicts/array
if len(file_list) == 0:
return event_data, monitoring_data, mcheader_data
drive_data = dict() drive_data = dict()
drive_data['mjd'] = np.array([]) drive_data['mjd'] = np.array([])
drive_data['zd'] = np.array([]) drive_data['zd'] = np.array([])
......
Markdown is supported
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