Skip to content
Snippets Groups Projects
Commit 11e89da7 authored by Patrick Godwin's avatar Patrick Godwin
Browse files

gstlal_fake_frames: fix frame output so that output directory names are...

gstlal_fake_frames: fix frame output so that output directory names are consistent based on LDG standards
parent 3b4c0c81
No related branches found
No related tags found
No related merge requests found
......@@ -171,15 +171,6 @@ from glue.ligolw import utils as ligolw_utils
### ------
###
##
# Return the number of digits in a number
#
def digits(num):
if float(num) == 0:
return 1
else:
return int(numpy.ceil(numpy.log10(float(num))))
##
# Extract and validate the command line options
......@@ -341,8 +332,8 @@ head = pipeparts.mkframecppchannelmux(pipeline, {"%s:%s" % (instrument, options.
## 11) Write the frames to disk
head = pipeparts.mkframecppfilesink(pipeline, head, frame_type = options.frame_type)
# Put O(100) frames in each directory
head.connect("notify::timestamp", pipeparts.framecpp_filesink_ldas_path_handler, (options.output_path, digits(options.gps_start_time) - digits(options.frame_duration * options.frames_per_file * 100)))
# Put O(100000 s) frames in each directory
head.connect("notify::timestamp", pipeparts.framecpp_filesink_ldas_path_handler, (options.output_path, 5))
# Run it
if pipeline.set_state(Gst.State.READY) == Gst.StateChangeReturn.FAILURE:
......
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