Skip to content
Snippets Groups Projects
Commit 41a9988b authored by Kien Le's avatar Kien Le
Browse files

Fix problem with detecting data type

We are currently skipping waveform files by inspecting the name of the
file. However, for some Centaur and Pegasus data sets whose station name
match a pattern used to filter waveform files, all their files are
skipped. We fix this problem by moving the check for waveform files.
parent fcd84a31
No related branches found
No related tags found
No related merge requests found
Pipeline #2944 failed with stage
in 5 minutes and 23 seconds
......@@ -268,10 +268,6 @@ def get_data_type_from_file(
'VP', 'VL', 'VL', 'VH',
'UN', 'UP', 'UL', 'UH']
if any(x in path2file.name for x in wf_chan_posibilities):
# Skip checking waveform files which aren't signature channels
return None, False
file = open(path2file, 'rb')
chans_in_stream = set()
data_type = None
......@@ -290,6 +286,9 @@ def get_data_type_from_file(
return
chan = record.record_metadata.channel
if any([wf_pattern in chan for wf_pattern in wf_chan_posibilities]):
# Skip checking waveform files which aren't signature channels
return None, False
if is_multiplex is None:
chans_in_stream.add(chan)
if len(chans_in_stream) > 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment