Skip to content
Snippets Groups Projects
Commit 6c167a59 authored by Rebecca Ewing's avatar Rebecca Ewing
Browse files

gstlal_ll_dq: remove to_hdf5 function

parent e749c363
No related branches found
No related tags found
1 merge request!237gstlal_ll_dq: remove to_hdf5 function
Pipeline #429013 passed with warnings
......@@ -21,10 +21,7 @@
from collections import deque
import logging
from optparse import OptionParser
import os
import shutil
import h5py
import numpy
from scipy import signal
import yaml
......@@ -132,22 +129,6 @@ class NoiseTracker(object):
for route in self.routes:
self.datadeq[route].clear()
# Save a "latest" psd
# NOTE: The PSD is special, we just record it. No min/median/max
if self.injections==False:
thisdir = os.path.join(self.out_path, core.gps_to_leaf_directory(buf.t0))
core.makedir(thisdir)
psd_name = "%s-PSD-%d-100.hdf5" % (self.instrument, round(int(buf.t0), -2))
self.to_hdf5(os.path.join(thisdir, psd_name), {"freq": psd_freq, "asd": psd_data, "time": numpy.array([int(buf.t0)])})
def to_hdf5(self, path, datadict):
tmppath = "/dev/shm/%s" % path.replace("/","_") + ".tmp"
f = h5py.File(tmppath, "w")
for k, v in datadict.items():
f[k] = v
f.close()
shutil.move(tmppath, path)
#
# =============================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment