adjtomo / pysep

Seismogram Extraction and Processing: Seismic data retrieval and record sections
https://pysep.readthedocs.io
MIT License
29 stars 15 forks source link

Bugfix: incorrect RecSec xlim_s indexing #123

Closed bch0w closed 1 year ago

bch0w commented 1 year ago

The RecordSection parameter xlim_s, when used in conjunction with the 'scale_by' == normalize would identify the section of waveform to check max amplitudes, with which it would normalize the remainder of the trace.

Previously it was selecting sections of the waveform using the time value from xlim_s, rather than the index value required (time * sampling rate), which caused the incorrect section of waveform to be used for trace normalization.

This PR fixes this bug by converting the time values in xlim_s to index values for selecting max amplitudes fro trace normalization