SeismicData / pyasdf

Python Interface to ASDF based on ObsPy
http://seismicdata.github.io/pyasdf/
BSD 3-Clause "New" or "Revised" License
53 stars 30 forks source link

Add microseconds to waveform name if necessary. #45

Closed jes-p closed 6 years ago

jes-p commented 6 years ago

[WIP, just found the tests folder] This pull request fixes #44 by checking for a start and end time within the same second, then adding microseconds if necessary. PR's to ASDF_definition and asdf_validate address this potential change to the ASDF file.

I don't think it's necessary to add the additional check

if s == e:
    raise ValueError("Some sensible error message")

The goal was to avoid rejecting separate waveforms that matched timestamps in seconds but not microseconds. If the start and end still match in microseconds that probably just means an npts=0 trace was added. Maybe someone has a reason to do this?

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.1%) to 89.024% when pulling b32f11616bb5a89ee0ee45d523ed8f76b9208dec on jes-p:master into c976927284efdec1264d652d47e4d0048dfe6f5c on SeismicData:master.