Skip to content
Snippets Groups Projects
  • Erin (Josh) Rigler's avatar
    b662348c
    Modify TimeseriesUtility.py's split_trace() · b662348c
    Erin (Josh) Rigler authored
    The split_trace() function always dropped the last sample. This was
    seemingly part of a flawed logic designed to prevent traces being
    written to Edge by the MiniSeedInputClient that spanned midnight.
    This worked, but only if the original trace actually spanned midnight.
    For the majority of data that do not span midnight, this dropped a
    sample every time. The updated logic does what I believe was the
    original intent (that is, it breaks traces into more manageable
    chunks) without duplicating or losing any data. This is consistent
    with obspy's concept of data slices, where a starttime and endtime
    are always inclusive, but it deviates somewhat from MiniSeed logic,
    which assumes a starttime, plus a delta, plus a number of samples.
    
    It was necessary to update a couple unit tests for the MiniSeedFactory
    to work with this new logic, but I am certain that the original test
    logic was not based on anything but what the TimeseriesUtility.py
    function(s) returned when they were originally written.
    b662348c
    History
    Modify TimeseriesUtility.py's split_trace()
    Erin (Josh) Rigler authored
    The split_trace() function always dropped the last sample. This was
    seemingly part of a flawed logic designed to prevent traces being
    written to Edge by the MiniSeedInputClient that spanned midnight.
    This worked, but only if the original trace actually spanned midnight.
    For the majority of data that do not span midnight, this dropped a
    sample every time. The updated logic does what I believe was the
    original intent (that is, it breaks traces into more manageable
    chunks) without duplicating or losing any data. This is consistent
    with obspy's concept of data slices, where a starttime and endtime
    are always inclusive, but it deviates somewhat from MiniSeed logic,
    which assumes a starttime, plus a delta, plus a number of samples.
    
    It was necessary to update a couple unit tests for the MiniSeedFactory
    to work with this new logic, but I am certain that the original test
    logic was not based on anything but what the TimeseriesUtility.py
    function(s) returned when they were originally written.