Skip to content
Snippets Groups Projects
Commit c6401729 authored by Aaron Viets's avatar Aaron Viets
Browse files

lal_transferfunction: use it with async = False

parent 0a4b0a2d
No related branches found
No related tags found
No related merge requests found
......@@ -677,7 +677,7 @@ def clean_data(pipeline, signal, signal_rate, witnesses, witness_rate, fft_lengt
transfer_functions = mkinterleave(pipeline, numpy.insert(witness_tees, 0, resampled_signal, axis = 0))
if obsready is not None:
transfer_functions = mkgate(pipeline, transfer_functions, obsready, 1)
transfer_functions = pipeparts.mkgeneric(pipeline, transfer_functions, "lal_transferfunction", fft_length = fft_length, fft_overlap = fft_overlap, num_ffts = num_ffts, update_samples = update_samples, make_fir_filters = -1, update_after_gap = True)
transfer_functions = pipeparts.mkgeneric(pipeline, transfer_functions, "lal_transferfunction", fft_length = fft_length, fft_overlap = fft_overlap, num_ffts = num_ffts, update_samples = update_samples, make_fir_filters = -1, update_after_gap = True, async = False)
signal_minus_noise = [signal_tee]
for i in range(0, len(witnesses)):
minus_noise = pipeparts.mkgeneric(pipeline, witness_tees[i], "lal_tdwhiten", kernel = default_fir_filter, latency = fft_length / 2, taper_length = 20 * fft_length)
......
......@@ -64,8 +64,8 @@ def audioresample_01(pipeline, name):
head = pipeparts.mkcapsfilter(pipeline, head, "audio/x-raw,format=F64LE,rate=16384")
head = calibration_parts.mkinterleave(pipeline, [head, identity])
#pipeparts.mknxydumpsink(pipeline, head, "resampled_data.txt")
head = pipeparts.mkgeneric(pipeline, head, "splitcounter")
pipeparts.mkgeneric(pipeline, head, "lal_transferfunction", fft_length = rate, fft_overlap = rate / 2, num_ffts = 1000, update_samples = rate * test_duration, filename = "audioresample_tf.txt", async = False)
# head = pipeparts.mkgeneric(pipeline, head, "splitcounter")
pipeparts.mkgeneric(pipeline, head, "lal_transferfunction", fft_length = rate, fft_overlap = rate / 2, num_ffts = 1000, update_samples = rate * test_duration, filename = "audioresample_tf.txt")
#
# done
......
......@@ -144,31 +144,23 @@ def lal_transferfunction_03(pipeline, name):
#
hoft = test_common.test_src(pipeline, buffer_length = buffer_length, wave = 5, volume = 1, freq = 512, channels = channels, rate = rate, test_duration = test_duration, width = width, verbose = False)
# hoftadd = test_common.test_src(pipeline, buffer_length = buffer_length, wave = 0, volume = 1, freq = 2048, channels = channels, rate = rate, test_duration = test_duration, width = width, verbose = False)
# hoft = calibration_parts.mkadder(pipeline, calibration_parts.list_srcs(pipeline, hoft, hoftadd))
#hoft = calibration_parts.highpass(pipeline, hoft, rate)
hoft = pipeparts.mktee(pipeline, hoft)
pipeparts.mkfakesink(pipeline, hoft)
difference = test_common.test_src(pipeline, buffer_length = buffer_length, wave = 5, volume = 0.001, channels = channels, rate = rate, test_duration = test_duration, width = width, verbose = False)
difference = pipeparts.mktee(pipeline, difference)
difference2 = test_common.test_src(pipeline, buffer_length = buffer_length, wave = 5, volume = 0.001, freq = 4096, channels = channels, rate = rate, test_duration = test_duration, width = width, verbose = False)
# difference2 = pipeparts.mktee(pipeline, difference2)
hoft2 = calibration_parts.mkadder(pipeline, calibration_parts.list_srcs(pipeline, hoft, difference))
# hoft2 = pipeparts.mkshift(pipeline, hoft2, shift = 305176)
# hoft2 = pipeparts.mkaudioamplify(pipeline, hoft2, -1)
hoft2 = pipeparts.mktee(pipeline, hoft2)
hoft3 = calibration_parts.mkadder(pipeline, calibration_parts.list_srcs(pipeline, hoft, difference2))
hoft3 = pipeparts.mktee(pipeline, hoft3)
# hoft3 = test_common.test_src(pipeline, buffer_length = buffer_length, wave = 5, volume = 0.1, channels = channels, rate = rate, test_duration = test_duration, width = width, verbose = False)
clean_data = calibration_parts.clean_data(pipeline, hoft, rate, calibration_parts.list_srcs(pipeline, hoft2, hoft3), rate, rate / 8, rate / 16, 32, rate * 100)
pipeparts.mknxydumpsink(pipeline, hoft, "%s_hoft.txt" % name)
pipeparts.mknxydumpsink(pipeline, hoft2, "%s_hoft2.txt" % name)
pipeparts.mknxydumpsink(pipeline, difference, "%s_difference.txt" % name)
# pipeparts.mknxydumpsink(pipeline, difference2, "%s_difference2.txt" % name)
pipeparts.mknxydumpsink(pipeline, clean_data, "%s_out.txt" % name)
return pipeline
......
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