Skip to content
Snippets Groups Projects
  • Erin (Josh) Rigler's avatar
    2a4d71e1
    Fix __create_trace() in StreamConverter_test.py · 2a4d71e1
    Erin (Josh) Rigler authored
    A "feature" in obspy is that the stats.npts metadata object is not
    automatically calculated if a Trace is created by passing in a Stats
    object (instead of a simple dictionary). The Trace still contained
    the data array, which is probably why this issue wasn't discovered
    sooner, but something as simple as trace.times() is broken if npts
    is not specified. It's amazing this wasn't discovered sooner, given
    how many times traces get "created" throughout geomag-algoriothms.
    Probably, we should survey the codebase to make sure this isn't a
    problem elsewhere.
    2a4d71e1
    History
    Fix __create_trace() in StreamConverter_test.py
    Erin (Josh) Rigler authored
    A "feature" in obspy is that the stats.npts metadata object is not
    automatically calculated if a Trace is created by passing in a Stats
    object (instead of a simple dictionary). The Trace still contained
    the data array, which is probably why this issue wasn't discovered
    sooner, but something as simple as trace.times() is broken if npts
    is not specified. It's amazing this wasn't discovered sooner, given
    how many times traces get "created" throughout geomag-algoriothms.
    Probably, we should survey the codebase to make sure this isn't a
    problem elsewhere.
StreamConverter_test.py 12.76 KiB