Commit 832a8116 authored by Patrick Godwin's avatar Patrick Godwin

gstlal_ll_dq, gstlal_ll_inspiral_aggregator: update to deal with API changes from ligo-scald

parent 517934ba
Pipeline #53668 passed with stages
in 24 minutes and 44 seconds
......@@ -127,11 +127,11 @@ class PSDHandler(simplehandler.Handler):
self.last_reduce_time = int(round(buftime,-2))
logging.info("reducing data and writing PSD snapshot for %d @ %d" % (buftime, int(aggregator.now())))
data = {route: {self.instrument: (list(self.timedeq), list(self.datadeq[route]))} for route in self.routes}
data = {route: {self.instrument: {'time': list(self.timedeq), 'fields': {'data': list(self.datadeq[route])}}} for route in self.routes}
### store and reduce noise / range history
for route in self.routes:
agg_sink.store_and_reduce(route, data[route], 'data', tags='ifo', aggregates=("min", "median", "max"))
agg_sink.store_columns(route, data[route], 'data', tags='ifo', aggregate="max")
### flush buffers
self.timedeq.clear()
......
......@@ -124,7 +124,8 @@ if __name__ == '__main__':
start = timeit.default_timer()
for route in routes:
logging.info("storing and reducing timeseries for measurement: %s" % route)
agg_sink.store_and_reduce(route, datadata[route], 'data', tags='job', aggregates=options.data_type)
for aggregate in options.data_type:
agg_sink.store_columns(route, datadata[route], 'data', tags='job', aggregate=aggregate)
elapsed = timeit.default_timer() - start
logging.info("time to store/reduce timeseries: %.1f s" % elapsed)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment