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

Change how sizes of traces are determined

parent 308b00a9
No related branches found
No related tags found
No related merge requests found
Pipeline #2712 failed with stage
in 3 minutes
...@@ -349,7 +349,10 @@ def read_mseed_trace_spr_less_than_or_equal_1(trace: Trace) -> Dict: ...@@ -349,7 +349,10 @@ def read_mseed_trace_spr_less_than_or_equal_1(trace: Trace) -> Dict:
tr['startTmEpoch'] = trace.stats.starttime.timestamp tr['startTmEpoch'] = trace.stats.starttime.timestamp
tr['endTmEpoch'] = trace.stats.endtime.timestamp tr['endTmEpoch'] = trace.stats.endtime.timestamp
tr['samplerate'] = trace.stats.sampling_rate tr['samplerate'] = trace.stats.sampling_rate
tr['size'] = trace.stats.npts if hasattr(trace.stats, 'actual_npts'):
tr['size'] = trace.stats.actual_npts
else:
tr['size'] = trace.stats.npts
""" """
trace time start with 0 => need to add with epoch starttime trace time start with 0 => need to add with epoch starttime
times and data have type ndarray times and data have type ndarray
...@@ -388,7 +391,10 @@ def read_mseed_trace_spr_greater_than_1( ...@@ -388,7 +391,10 @@ def read_mseed_trace_spr_greater_than_1(
tr['samplerate'] = trace.stats.sampling_rate tr['samplerate'] = trace.stats.sampling_rate
tr['startTmEpoch'] = trace.stats['starttime'].timestamp tr['startTmEpoch'] = trace.stats['starttime'].timestamp
tr['endTmEpoch'] = trace.stats['endtime'].timestamp tr['endTmEpoch'] = trace.stats['endtime'].timestamp
tr['size'] = trace.stats.npts if hasattr(trace.stats, 'actual_npts'):
tr['size'] = trace.stats.actual_npts
else:
tr['size'] = trace.stats.npts
if trace.stats.channel.startswith('MassPos'): if trace.stats.channel.startswith('MassPos'):
data = convert_reftek_masspos_data(trace.data) data = convert_reftek_masspos_data(trace.data)
else: else:
......
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