Skip to content
Snippets Groups Projects
  1. Nov 29, 2022
  2. Nov 22, 2022
    • Erin (Josh) Rigler's avatar
      Merge branch 'process_inchannels_not_outchannels_AverageAlgorithm_update01' into 'master' · 10bdca98
      Erin (Josh) Rigler authored
      Small fix requiring a length-1 list to be indexed
      
      See merge request !200
      10bdca98
    • Erin (Josh) Rigler's avatar
      Small fix requiring a length-1 list to be indexed · 5e1ca4cc
      Erin (Josh) Rigler authored
      Writing unit tests for Controller configurations is tricky, so I
      didn't do it, and this tiny-but-impactful bug slipped in. I did
      test this on the stagin server this time, and the processing pipe-
      line should work after this is deployed.
      5e1ca4cc
    • Erin (Josh) Rigler's avatar
      Merge branch 'process_inchannels_not_outchannels_AverageAlgorithm' into 'master' · c771ea55
      Erin (Josh) Rigler authored
      Now process inchannels, not outchannels
      
      See merge request !199
      c771ea55
    • Erin (Josh) Rigler's avatar
      Now process inchannels, not outchannels · e7f9f8ef
      Erin (Josh) Rigler authored
      The original version of AverageAlgorithm.py seemed to be written
      to process the Controller's `--outchannels`. It "worked" for several
      years because `--outchannels` defaulted to `--inchannels`. But what
      we actually always wanted was to process `--inchannels`.
      
      Mostly this was just a matter of semantics, but when I recently added
      the ability to average fewer than the full complement of inputs, it
      was also necessary to change the `can_produce_data()` method to check
      for "any" instead of "all" channels, which in turn required that the
      AverageAlgorithm class properly instantiate its `_inchannels` and
      `_outchannels` class variables, instead of just set them to `None`.
      
      To briefly explain the different changes in this commit:
      
      - added `Algorithm.__init__(self, inchannels=[channel])` to ensure that
        can_produce_data() would work when run via programmatic interface.
      - added `Algorithm.configure(self, arguments)` to AverageAlgorithm.configure()
        to ensure that can_produce_data() would work when run via Controller.py.
      - changed all variations of `outchannel` to `inchannel`
      - cleaned up where class variables were modified inside process() method
      e7f9f8ef
  3. Nov 21, 2022
  4. 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
  5. Nov 18, 2022
    • Erin (Josh) Rigler's avatar
      Make AverageAlgorithm require **any** inputs · b8523fc4
      Erin (Josh) Rigler authored
      Recent attempts to change the AverageAlgorithm to allow fewer than the full
      complement of inputs when calculating a mutli-station average were thwarted
      by the default can_produce_data() method in the parent Algorithm class, which
      required all inputs to be present, when what we now want is **any** inputs to
      be present.
      b8523fc4
  6. Nov 16, 2022
  7. Nov 15, 2022
  8. Nov 14, 2022
    • Erin (Josh) Rigler's avatar
      Use self.observatories to determine number of inputs · 0dcdead5
      Erin (Josh) Rigler authored
      Previously use the number of traces in the input Stream. This could
      be fewer than the number of desired observatories if a given input's
      data was completely missing.
      0dcdead5
    • Erin (Josh) Rigler's avatar
      Add start/end options AverageAlgorithm's min_count · c946f502
      Erin (Josh) Rigler authored
      The recently added `min_count` option to AverageAlgorithm.py leads to some
      undesirable behavior when realtime data, with asynchronous inputs, are being
      processed. By adding the ability to specify an interval over which `min_count`
      is applied, some of this undesirable behavior can be mitigated.
      
      In particular, if the `realtime` option is specified via the controller, and
      `min_count` is defined, the minimum number of inputs will be allowed only for
      time steps prior to `(UTCDateTime.now() - realtime)`; the full complement of
      inputs will be required to calculate averages more recent than that. One
      drawback is that if an input observatory goes offline for an extended period,
      the Dst index will be calculated with a persistent lag `realtime` seconds long.
      
      A user can always override this admittedly ad-hoc default behavior using the
      `min_count_start` and `min_count_end` options.
      c946f502
    • Erin (Josh) Rigler's avatar
      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
  9. Nov 10, 2022
  10. Nov 09, 2022
    • Erin (Josh) Rigler's avatar
      Add --average-min-count option to AverageAlgorithm · 4d3d8bd5
      Erin (Josh) Rigler authored
      - added a `min_count` keyword to the AvergeAlgorithm's __init__() method;
      - added a --average-min-count option via the add_arguments() classmethod;
      - set `self.min_count = arguments.average_min_count` in configure() method;
      - refactored process() method to respect `min_count`, but now it defaults
        to a requirement that all inputs be valid (this modified a recent merge
        by @awernle that only required that any inputs be valid;
      - modified AverageAlgorithm_test.py to properly assess things in light
        of the change to default behavior just mentioned.
      4d3d8bd5
  11. Nov 04, 2022
  12. Nov 02, 2022
  13. Oct 24, 2022
  14. Oct 21, 2022
Loading