Skip to content
Snippets Groups Projects
  1. Feb 18, 2025
    • Erin (Josh) Rigler's avatar
      TimeseriesUtility Updates: · 18cece6d
      Erin (Josh) Rigler authored
      - better handle hour and day intervals in create_empty_trace
      - enode_stream now handles "STEIM" encoding
      - fixed bug in pad_and_trim_trace
      18cece6d
  2. Apr 22, 2024
  3. Apr 17, 2024
  4. May 08, 2023
    • Erin (Josh) Rigler's avatar
      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
  5. Dec 08, 2022
    • Erin (Josh) Rigler's avatar
      Fix has_any_channels method · 195c4240
      Erin (Josh) Rigler authored
      The has_any_channels method in TimeseriesUtility.py did not properly
      handle streams with multiple traces with the same channel, but different
      stations (or networks, or locations). It should work now.
      195c4240
  6. Nov 19, 2022
    • Erin (Josh) Rigler's avatar
      Check for gaps in multi-observatory Stream · c24e2e9c
      Erin (Josh) Rigler authored
      The method TimeseriesUtility.get_stream_gaps() would over-write gaps[channel] if
      there were multiple Traces in a stream that were the same channel, but different
      observatories. This is a typical situation when using the AverageAlgorithm.
      c24e2e9c
  7. Nov 09, 2021
  8. Sep 16, 2021
  9. Aug 25, 2021
  10. Apr 14, 2021
  11. Apr 12, 2021
  12. Apr 07, 2021
  13. Apr 06, 2021
  14. Dec 17, 2020
  15. Oct 26, 2020
  16. Oct 07, 2020
  17. Jun 02, 2020
    • Erin (Josh) Rigler's avatar
      TimeseriesUtility.pad_and_trim_trace trim fix · 1f6bc71f
      Erin (Josh) Rigler authored
      Applied the same fix to the trim logic in method
      TimeseriesUtility.pad_and_trim_trace() as previously applied
      to the pad logic. Added a unit test that would have failed
      using the old logic.
      1f6bc71f
    • Erin (Josh) Rigler's avatar
      Pass unit tests again · 09ad155f
      Erin (Josh) Rigler authored
      The first attempt to fix TimeseriesUtility.pad_and_trim_trace() broke
      a unit test. I'm not sure I agree with what the unit test defined as
      passing, but I do understand the logic. This now satisfies the logic
      of the unit test(s), while still fixing the floating point precision
      problem to the default resolution of UTCDateTime objects (that is,
      1e-6 or microseconds)
      09ad155f
  18. Jun 01, 2020
    • Erin (Josh) Rigler's avatar
      Fix TimeseriesUtility.pad_and_trim_trace · 3703dda2
      Erin (Josh) Rigler authored
      I ran into a floating point precision issue when padding a trace out
      to the requested starttime when the data block returned by the Edge
      miniseed factory (but this is not an Edge issue, per se) was less
      than what was requested.
      
      My solution was to use `round()` instead of `int()` when converting
      a time differential to a discrete number of samples. I'm confident
      this is a robust fix for padding. I'm not sure if it also the proper
      approach to the trimming, which seems to be a bit more sophisticated
      in that is uses the `ceil()` method. In any case, I request some
      feedback before merging this deceptively simple PR.
      3703dda2
  19. Apr 29, 2020
  20. Mar 06, 2020
  21. Mar 03, 2020
  22. Feb 20, 2020
  23. Dec 16, 2019
  24. Dec 05, 2019
  25. Nov 09, 2018
Loading