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

2 more CI tests

parent 072ed57a
No related branches found
No related tags found
1 merge request!1CI development
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
Showing
with 208 additions and 94 deletions
*.gwf filter=lfs diff=lfs merge=lfs -text *.gwf filter=lfs diff=lfs merge=lfs -text
*.txt filter=lfs diff=lfs merge=lfs -text
...@@ -53,8 +53,8 @@ def compute_ASD_from_cache(pipeline, name): ...@@ -53,8 +53,8 @@ def compute_ASD_from_cache(pipeline, name):
clean = calibration_parts.hook_up(pipeline, data, "GDS-CALIB_STRAIN_CLEAN", ifo, 1.0, element_name_suffix = "1") clean = calibration_parts.hook_up(pipeline, data, "GDS-CALIB_STRAIN_CLEAN", ifo, 1.0, element_name_suffix = "1")
hoft = pipeparts.mkprogressreport(pipeline, hoft, "hoft") hoft = pipeparts.mkprogressreport(pipeline, hoft, "hoft")
clean = pipeparts.mkprogressreport(pipeline, clean, "clean") clean = pipeparts.mkprogressreport(pipeline, clean, "clean")
pipeparts.mkgeneric(pipeline, hoft, "lal_asd", filename = "tests/tests_pytest/ASD_data/hoft_asd.txt", fft_samples = 16 * 16384, overlap_samples = int(2 * 16384)) pipeparts.mkgeneric(pipeline, hoft, "lal_asd", filename = "tests/tests_pytest/ASD_data/hoft_asd.txt", fft_samples = 16384, overlap_samples = 8192)
pipeparts.mkgeneric(pipeline, clean, "lal_asd", filename = "tests/tests_pytest/ASD_data/clean_asd.txt", fft_samples = 16 * 16384, overlap_samples = int(2 * 16384)) pipeparts.mkgeneric(pipeline, clean, "lal_asd", filename = "tests/tests_pytest/ASD_data/clean_asd.txt", fft_samples = 16384, overlap_samples = 8192)
# #
# done # done
......
...@@ -71,10 +71,13 @@ gstlal_channels = ['GDS-CALIB_STRAIN', 'GDS-CALIB_STRAIN'] ...@@ -71,10 +71,13 @@ gstlal_channels = ['GDS-CALIB_STRAIN', 'GDS-CALIB_STRAIN']
# Set list of all channels # Set list of all channels
channel_list = [] channel_list = []
act_channels = ['SUS-ETMX_L3_CAL_LINE_OUT_DQ', 'SUS-ETMX_L2_CAL_LINE_OUT_DQ', 'SUS-ETMX_L1_CAL_LINE_OUT_DQ'] act_channels = ['SUS-ETMX_L3_CAL_LINE_OUT_DQ', 'SUS-ETMX_L2_CAL_LINE_OUT_DQ', 'SUS-ETMX_L1_CAL_LINE_OUT_DQ']
TDCF_channels = ['GDS-CALIB_KAPPA_TST_REAL', 'GDS-CALIB_KAPPA_TST_IMAGINARY', 'GDS-CALIB_KAPPA_PUM_REAL', 'GDS-CALIB_KAPPA_PUM_IMAGINARY', 'GDS-CALIB_KAPPA_UIM_REAL', 'GDS-CALIB_KAPPA_UIM_IMAGINARY']
for channel in act_channels: for channel in act_channels:
channel_list.append((ifo, channel)) channel_list.append((ifo, channel))
for channel in gstlal_channels: for channel in gstlal_channels:
channel_list.append((ifo, channel)) channel_list.append((ifo, channel))
for channel in TDCF_channels:
channel_list.append((ifo, channel))
# Read stuff we need from the filters file # Read stuff we need from the filters file
frequencies = [] frequencies = []
...@@ -83,22 +86,22 @@ act_corrections = [] ...@@ -83,22 +86,22 @@ act_corrections = []
act_line_names = ['ktst_esd', 'pum_act', 'uim_act'] act_line_names = ['ktst_esd', 'pum_act', 'uim_act']
EPICS = ['AT0_fT', 'AP0_fP', 'AU0_fU'] EPICS = ['AT0_fT', 'AP0_fP', 'AU0_fU']
for i in range(len(act_line_names)): for i in range(len(act_line_names)):
frequencies.append(float(filters["%s_line_freq" % act_line_names[i]])) frequencies.append(float(filters["%s_line_freq" % act_line_names[i]]))
act_corrections.append(float(filters["%s_re" % EPICS[i]])) act_corrections.append(float(filters["%s_re" % EPICS[i]]))
act_corrections.append(float(filters["%s_im" % EPICS[i]])) act_corrections.append(float(filters["%s_im" % EPICS[i]]))
act_time_advance = 0.00006103515625 act_time_advance = 0.00006103515625
for i in range(0, len(act_corrections) // 2): for i in range(0, len(act_corrections) // 2):
corr = act_corrections[2 * i] + 1j * act_corrections[2 * i + 1] corr = act_corrections[2 * i] + 1j * act_corrections[2 * i + 1]
corr *= numpy.exp(2.0 * numpy.pi * 1j * frequencies[i] * act_time_advance) corr *= numpy.exp(2.0 * numpy.pi * 1j * frequencies[i] * act_time_advance)
act_corrections[2 * i] = numpy.real(corr) act_corrections[2 * i] = numpy.real(corr)
act_corrections[2 * i + 1] = numpy.imag(corr) act_corrections[2 * i + 1] = numpy.imag(corr)
demodulated_act_list = [] demodulated_act_list = []
try: try:
arm_length = float(filters['arm_length']) arm_length = float(filters['arm_length'])
except: except:
arm_length = 3995.1 arm_length = 3995.1
# demodulation and averaging parameters # demodulation and averaging parameters
filter_time = 20 filter_time = 20
...@@ -117,56 +120,102 @@ rate_out = 1 ...@@ -117,56 +120,102 @@ rate_out = 1
def act2darm(pipeline, name): def act2darm(pipeline, name):
# Get actuation injection channels from the raw frames # Get actuation injection channels from the raw frames
act_inj_channels = [] act_inj_channels = []
raw_data = pipeparts.mklalcachesrc(pipeline, location = "tests/tests_pytest/raw_frames.cache", cache_dsc_regex = ifo) raw_data = pipeparts.mklalcachesrc(pipeline, location = "tests/tests_pytest/raw_frames.cache", cache_dsc_regex = ifo)
raw_data = pipeparts.mkframecppchanneldemux(pipeline, raw_data, do_file_checksum = False, skip_bad_files = True, channel_list = list(map("%s:%s".__mod__, channel_list))) raw_data = pipeparts.mkframecppchanneldemux(pipeline, raw_data, do_file_checksum = False, skip_bad_files = True, channel_list = list(map("%s:%s".__mod__, channel_list)))
for i in range(len(act_channels)): for i in range(len(act_channels)):
act_inj_channels.append(calibration_parts.hook_up(pipeline, raw_data, act_channels[i], ifo, 1.0)) act_inj_channels.append(calibration_parts.hook_up(pipeline, raw_data, act_channels[i], ifo, 1.0))
act_inj_channels[i] = calibration_parts.caps_and_progress(pipeline, act_inj_channels[i], "audio/x-raw,format=F64LE,channels=1,channel-mask=(bitmask)0x0", "act_inj_%d" % i) act_inj_channels[i] = calibration_parts.caps_and_progress(pipeline, act_inj_channels[i], "audio/x-raw,format=F64LE,channels=1,channel-mask=(bitmask)0x0", "act_inj_%d" % i)
act_inj_channels[i] = pipeparts.mktee(pipeline, act_inj_channels[i]) act_inj_channels[i] = pipeparts.mktee(pipeline, act_inj_channels[i])
# Demodulate the actuation injection channels at the lines of interest # Demodulate the actuation injection channels at the lines of interest
for i in range(len(frequencies)): for i in range(len(frequencies)):
demodulated_act = calibration_parts.demodulate(pipeline, act_inj_channels[i], frequencies[i], True, rate_out, filter_time, 0.5, prefactor_real = act_corrections[2 * i], prefactor_imag = act_corrections[2 * i + 1]) demodulated_act = calibration_parts.demodulate(pipeline, act_inj_channels[i], frequencies[i], True, rate_out, filter_time, 0.5, prefactor_real = act_corrections[2 * i], prefactor_imag = act_corrections[2 * i + 1])
demodulated_act_list.append(pipeparts.mktee(pipeline, demodulated_act)) demodulated_act_list.append(pipeparts.mktee(pipeline, demodulated_act))
cache_num = 0 cache_num = 0
for cache, channel, in zip(gstlal_frame_cache_list, gstlal_channels): for cache, channel, in zip(gstlal_frame_cache_list, gstlal_channels):
version = "Approx" if "Approx" in cache else "Exact"
# Get gstlal channels from the gstlal frames # Get gstlal channels from the gstlal frames
hoft_data = pipeparts.mklalcachesrc(pipeline, location = cache, cache_dsc_regex = ifo) hoft_data = pipeparts.mklalcachesrc(pipeline, location = cache, cache_dsc_regex = ifo)
hoft_data = pipeparts.mkframecppchanneldemux(pipeline, hoft_data, do_file_checksum = False, skip_bad_files = True, channel_list = list(map("%s:%s".__mod__, channel_list))) hoft_data = pipeparts.mkframecppchanneldemux(pipeline, hoft_data, do_file_checksum = False, skip_bad_files = True, channel_list = list(map("%s:%s".__mod__, channel_list)))
hoft = calibration_parts.hook_up(pipeline, hoft_data, channel, ifo, 1.0, element_name_suffix = "_%d" % cache_num) hoft = calibration_parts.hook_up(pipeline, hoft_data, channel, ifo, 1.0, element_name_suffix = "_%d" % cache_num)
hoft = calibration_parts.caps_and_progress(pipeline, hoft, "audio/x-raw,format=F64LE,channels=1,channel-mask=(bitmask)0x0", "%s_%d" % (channel, cache_num)) hoft = calibration_parts.caps_and_progress(pipeline, hoft, "audio/x-raw,format=F64LE,channels=1,channel-mask=(bitmask)0x0", "%s_%d" % (channel, cache_num))
deltal = pipeparts.mkaudioamplify(pipeline, hoft, arm_length) deltal = pipeparts.mkaudioamplify(pipeline, hoft, arm_length)
deltal = pipeparts.mktee(pipeline, deltal) deltal = pipeparts.mktee(pipeline, deltal)
for i in range(len(frequencies)): for i in range(len(frequencies)):
# Demodulate \DeltaL at each line # Demodulate \DeltaL at each line
demodulated_deltal = calibration_parts.demodulate(pipeline, deltal, frequencies[i], True, rate_out, filter_time, 0.5) demodulated_deltal = calibration_parts.demodulate(pipeline, deltal, frequencies[i], True, rate_out, filter_time, 0.5)
# Take ratio \DeltaL(f) / act(f)
deltaL_over_act = calibration_parts.complex_division(pipeline, demodulated_deltal, demodulated_act_list[i]) # Divide by a TDCF if needed
if 'tst' in act_line_names[i] or 'esd' in act_line_names[i]:
# Get KAPPA_TST
TDCF_real = "GDS-CALIB_KAPPA_TST_REAL"
TDCF_imag = "GDS-CALIB_KAPPA_TST_IMAGINARY"
TDCF_real = calibration_parts.hook_up(pipeline, hoft_data, TDCF_real, ifo, 1.0, element_name_suffix = "_%d" % cache_num)
TDCF_imag = calibration_parts.hook_up(pipeline, hoft_data, TDCF_imag, ifo, 1.0, element_name_suffix = "_%d" % cache_num)
TDCF = calibration_parts.merge_into_complex(pipeline, TDCF_real, TDCF_imag)
TDCF = calibration_parts.caps_and_progress(pipeline, TDCF, "audio/x-raw,format=Z128LE,channels=1,channel-mask=(bitmask)0x0", 'KAPPA_TST_%s' % version)
TDCF = calibration_parts.mkresample(pipeline, TDCF, 3, False, rate_out)
if "Approx" in cache:
# Only divide by the magnitude
TDCF = pipeparts.mkgeneric(pipeline, TDCF, "cabs")
TDCF = pipeparts.mktogglecomplex(pipeline, calibration_parts.mkmatmix(pipeline, TDCF, matrix = [[1.0, 0.0]]))
demodulated_deltal = calibration_parts.complex_division(pipeline, demodulated_deltal, TDCF)
elif 'pum' in act_line_names[i]:
# Get KAPPA_PUM
TDCF_real = "GDS-CALIB_KAPPA_PUM_REAL"
TDCF_imag = "GDS-CALIB_KAPPA_PUM_IMAGINARY"
TDCF_real = calibration_parts.hook_up(pipeline, hoft_data, TDCF_real, ifo, 1.0, element_name_suffix = "_%d" % cache_num)
TDCF_imag = calibration_parts.hook_up(pipeline, hoft_data, TDCF_imag, ifo, 1.0, element_name_suffix = "_%d" % cache_num)
TDCF = calibration_parts.merge_into_complex(pipeline, TDCF_real, TDCF_imag)
TDCF = calibration_parts.caps_and_progress(pipeline, TDCF, "audio/x-raw,format=Z128LE,channels=1,channel-mask=(bitmask)0x0", 'KAPPA_PUM_%s' % version)
TDCF = calibration_parts.mkresample(pipeline, TDCF, 3, False, rate_out)
if "Approx" in cache:
# Only divide by the magnitude
TDCF = pipeparts.mkgeneric(pipeline, TDCF, "cabs")
TDCF = pipeparts.mktogglecomplex(pipeline, calibration_parts.mkmatmix(pipeline, TDCF, matrix = [[1.0, 0.0]]))
demodulated_deltal = calibration_parts.complex_division(pipeline, demodulated_deltal, TDCF)
elif 'uim' in act_line_names[i]:
# Get KAPPA_UIM
TDCF_real = "GDS-CALIB_KAPPA_UIM_REAL"
TDCF_imag = "GDS-CALIB_KAPPA_UIM_IMAGINARY"
TDCF_real = calibration_parts.hook_up(pipeline, hoft_data, TDCF_real, ifo, 1.0, element_name_suffix = "_%d" % cache_num)
TDCF_imag = calibration_parts.hook_up(pipeline, hoft_data, TDCF_imag, ifo, 1.0, element_name_suffix = "_%d" % cache_num)
TDCF = calibration_parts.merge_into_complex(pipeline, TDCF_real, TDCF_imag)
TDCF = calibration_parts.caps_and_progress(pipeline, TDCF, "audio/x-raw,format=Z128LE,channels=1,channel-mask=(bitmask)0x0", 'KAPPA_UIM_%s' % version)
TDCF = calibration_parts.mkresample(pipeline, TDCF, 3, False, rate_out)
if "Approx" in cache:
# Only divide by the magnitude
TDCF = pipeparts.mkgeneric(pipeline, TDCF, "cabs")
TDCF = pipeparts.mktogglecomplex(pipeline, calibration_parts.mkmatmix(pipeline, TDCF, matrix = [[1.0, 0.0]]))
demodulated_deltal = calibration_parts.complex_division(pipeline, demodulated_deltal, TDCF)
# Take ratio \DeltaL(f) / act(f)
deltaL_over_act = calibration_parts.complex_division(pipeline, demodulated_deltal, demodulated_act_list[i])
# Take a running median # Take a running median
deltaL_over_act = pipeparts.mkgeneric(pipeline, deltaL_over_act, "lal_smoothkappas", array_size = int(rate_out * median_time), no_default = True, filter_latency = 0.5) deltaL_over_act = pipeparts.mkgeneric(pipeline, deltaL_over_act, "lal_smoothkappas", array_size = int(rate_out * median_time), no_default = True, filter_latency = 0.5)
# The first samples are not median'ed. Remove only half, since sometimes early data is important. # The first samples are not median'ed. Remove only half, since sometimes early data is important.
deltaL_over_act = calibration_parts.mkinsertgap(pipeline, deltaL_over_act, insert_gap = False, chop_length = 500000000 * median_time) deltaL_over_act = calibration_parts.mkinsertgap(pipeline, deltaL_over_act, insert_gap = False, chop_length = 500000000 * median_time)
# Find the magnitude # Find the magnitude
deltaL_over_act = pipeparts.mktee(pipeline, deltaL_over_act) deltaL_over_act = pipeparts.mktee(pipeline, deltaL_over_act)
magnitude = pipeparts.mkgeneric(pipeline, deltaL_over_act, "cabs") magnitude = pipeparts.mkgeneric(pipeline, deltaL_over_act, "cabs")
# Find the phase # Find the phase
phase = pipeparts.mkgeneric(pipeline, deltaL_over_act, "carg") phase = pipeparts.mkgeneric(pipeline, deltaL_over_act, "carg")
phase = pipeparts.mkaudioamplify(pipeline, phase, 180.0 / numpy.pi) phase = pipeparts.mkaudioamplify(pipeline, phase, 180.0 / numpy.pi)
# Interleave # Interleave
magnitude_and_phase = calibration_parts.mkinterleave(pipeline, [magnitude, phase]) magnitude_and_phase = calibration_parts.mkinterleave(pipeline, [magnitude, phase])
magnitude_and_phase = pipeparts.mkprogressreport(pipeline, magnitude_and_phase, name = "progress_sink_%s_%d_%d" % (channel, cache_num, i)) magnitude_and_phase = pipeparts.mkprogressreport(pipeline, magnitude_and_phase, name = "progress_sink_%s_%d_%d" % (channel, cache_num, i))
# Write to file # Write to file
pipeparts.mknxydumpsink(pipeline, magnitude_and_phase, "tests/tests_pytest/act_data/%s_%s_over_Act_%d_at_%0.1fHz.txt" % (ifo, channel.replace(' ', '_'), cache_num, frequencies[i])) pipeparts.mknxydumpsink(pipeline, magnitude_and_phase, "tests/tests_pytest/act_data/%s_%s_over_Act_%d_at_%0.1fHz.txt" % (ifo, channel.replace(' ', '_'), cache_num, frequencies[i]))
cache_num = cache_num + 1 cache_num = cache_num + 1
# #
# done # done
# #
return pipeline return pipeline
# #
# ============================================================================= # =============================================================================
...@@ -178,8 +227,8 @@ def act2darm(pipeline, name): ...@@ -178,8 +227,8 @@ def act2darm(pipeline, name):
def Act2darm(): def Act2darm():
test_common.build_and_run(act2darm, "act2darm", segment = segments.segment((LIGOTimeGPS(0, 1000000000 * gps_start_time), LIGOTimeGPS(0, 1000000000 * gps_end_time)))) test_common.build_and_run(act2darm, "act2darm", segment = segments.segment((LIGOTimeGPS(0, 1000000000 * gps_start_time), LIGOTimeGPS(0, 1000000000 * gps_end_time))))
rms('A') plot_act()
rms('A', 'E') rms('A')
plot_act() rms('A', 'E')
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
...@@ -16,11 +16,12 @@ ...@@ -16,11 +16,12 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import numpy as np import numpy as np
import sys
#def rms(hoft_f='hoft_asd.txt', clean_f='clean_asd.txt'): #def rms(hoft_f='hoft_asd.txt', clean_f='clean_asd.txt'):
def rms(d_type, typ='A'): def rms(d_type, typ='A'):
pcal_freq_list = [102.1, 1083.3, 1083.7, 17.1, 283.9, 33.4, 410.2, 410.3, 56.4, 77.7] pcal_freq_list = [102.1, 1083.7, 17.1, 283.9, 33.4, 410.3, 77.7]
act_freq_list = [15.6, 16.4, 17.6] act_freq_list = [15.6, 16.4, 17.6]
st_f_list = [] st_f_list = []
f_list = [] f_list = []
...@@ -58,26 +59,50 @@ def rms(d_type, typ='A'): ...@@ -58,26 +59,50 @@ def rms(d_type, typ='A'):
e_file = open('tests/tests_pytest/error_results.txt', 'a') e_file = open('tests/tests_pytest/error_results.txt', 'a')
for f in st_f_list: assert len(st_f_list) == len(f_list)
standard = np.loadtxt(f) for i in range(len(f_list)):
for f in f_list: standard = np.loadtxt(st_f_list[i])
data = np.loadtxt(f) data = np.loadtxt(f_list[i])
standard = np.transpose(standard)[-1] sum_sq = 0
data = np.transpose(data)[-1] std_idx = 0
sum_sq = 0 # Loop through the data and find values at the same time or frequency as the standard
for i in range(len(standard-3)): for j in range(len(data)):
if standard[i] != 0: if data[j][0] == standard[std_idx][0]:
sum_sq += abs(1 - data[i]/standard[i]) # Then check this data point
mean_sq = sum_sq/len(data) # If there are 3 columns in the file, then columns 2 and 3 are magnitude and phase
rms = np.sqrt(mean_sq) if(len(data[j]) == 3):
#try: data_value = data[j][1] * np.exp(1j * np.pi * data[j][2] / 180)
#assert rms < 1 standard_value = standard[std_idx][1] * np.exp(1j * np.pi * standard[std_idx][2] / 180)
#except AssertionError: sum_sq += (abs(1 - data_value/standard_value))**2
#s1 = 'bad ' + str(name) + ' data' + '\n' std_idx += 1
#e_file.write(s1) if std_idx == 57:
#finally: break
s2 = str(name) + ' rms = ' + str(rms) + '\n' else:
e_file.write(s2) data_value = data[j][1]
e_file.close() standard_value = standard[std_idx][1]
assert rms < 1 sum_sq += (abs(1 - data_value/standard_value))**2
#error between 1% and 10^-15 std_idx += 1
if std_idx == 8193:
break
# Make sure the data sets overlapped as expected
assert j > 0.8 * len(data)
if(len(data[0]) == 3):
assert std_idx == 57
else:
assert std_idx == 8193
mean_sq = sum_sq / std_idx
rms = np.sqrt(mean_sq)
e_file = open('tests/tests_pytest/error_results.txt', 'a')
s2 = str(name) + ' rms error = ' + str(rms)
if 'pcal' in name:
s2 += "at %f Hz" % pcal_freq_list[i]
elif 'act' in name:
s2 += "at %f Hz" % act_freq_list[i]
e_file.write(s2 + '\n')
e_file.close()
print(s2, file = sys.stderr)
assert rms < 0.001
...@@ -82,19 +82,19 @@ MonitorStatevector: No ...@@ -82,19 +82,19 @@ MonitorStatevector: No
ComputeExactKappas: No ComputeExactKappas: No
ComputeKappaTST: Yes ComputeKappaTST: Yes
ApplyKappaTST: No ApplyKappaTST: Yes
# Set this to have the \kappa_tst factors filter the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. # Set this to have the \kappa_tst factors filter the actuation chain with an adaptive filter that corrects for both magnitude and phase errors.
ApplyComplexKappaTST: Yes ApplyComplexKappaTST: No
ComputeKappaPUM: Yes ComputeKappaPUM: Yes
ApplyKappaPUM: No ApplyKappaPUM: Yes
# Set this to have the \kappa_p factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. # Set this to have the \kappa_p factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors.
ApplyComplexKappaPUM: Yes ApplyComplexKappaPUM: No
ComputeKappaUIM: Yes ComputeKappaUIM: Yes
ApplyKappaUIM: No ApplyKappaUIM: Yes
# Set this to have the \kappa_u factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. # Set this to have the \kappa_u factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors.
ApplyComplexKappaUIM: Yes ApplyComplexKappaUIM: No
ComputeKappaC: Yes ComputeKappaC: Yes
ApplyKappaC: Yes ApplyKappaC: Yes
......
...@@ -67,8 +67,8 @@ PipelineGraphFilename: None ...@@ -67,8 +67,8 @@ PipelineGraphFilename: None
Verbose: Yes Verbose: Yes
# Turn this on to write data presentation timestamps and real-time unix timestamps to file at the beginning and end of the pipeline, to measure latency # Turn this on to write data presentation timestamps and real-time unix timestamps to file at the beginning and end of the pipeline, to measure latency
TestLatency: No TestLatency: No
# Turn this on if you want continuous integration to test the latency. # Set this directory if you want continuous integration to test the latency. Otherwise, set name equal to None
CITestLatency: No CILatencyDir: None
# Turn this on to compute transfer functions for the filters by comparing output data to input data # Turn this on to compute transfer functions for the filters by comparing output data to input data
TestFilters: No TestFilters: No
# Turn this on to monitor the state vector # Turn this on to monitor the state vector
...@@ -82,19 +82,19 @@ MonitorStatevector: No ...@@ -82,19 +82,19 @@ MonitorStatevector: No
ComputeExactKappas: No ComputeExactKappas: No
ComputeKappaTST: Yes ComputeKappaTST: Yes
ApplyKappaTST: No ApplyKappaTST: Yes
# Set this to have the \kappa_tst factors filter the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. # Set this to have the \kappa_tst factors filter the actuation chain with an adaptive filter that corrects for both magnitude and phase errors.
ApplyComplexKappaTST: Yes ApplyComplexKappaTST: No
ComputeKappaPUM: Yes ComputeKappaPUM: Yes
ApplyKappaPUM: No ApplyKappaPUM: Yes
# Set this to have the \kappa_p factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. # Set this to have the \kappa_p factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors.
ApplyComplexKappaPUM: Yes ApplyComplexKappaPUM: No
ComputeKappaUIM: Yes ComputeKappaUIM: Yes
ApplyKappaUIM: No ApplyKappaUIM: Yes
# Set this to have the \kappa_u factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. # Set this to have the \kappa_u factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors.
ApplyComplexKappaUIM: Yes ApplyComplexKappaUIM: No
ComputeKappaC: Yes ComputeKappaC: Yes
ApplyKappaC: Yes ApplyKappaC: Yes
......
...@@ -67,8 +67,8 @@ PipelineGraphFilename: None ...@@ -67,8 +67,8 @@ PipelineGraphFilename: None
Verbose: Yes Verbose: Yes
# Turn this on to write data presentation timestamps and real-time unix timestamps to file at the beginning and end of the pipeline, to measure latency # Turn this on to write data presentation timestamps and real-time unix timestamps to file at the beginning and end of the pipeline, to measure latency
TestLatency: No TestLatency: No
# Turn this on if you want continuous integration to test the latency. # Set this directory if you want continuous integration to test the latency. Otherwise, set name equal to None
CITestLatency: No CILatencyDir: None
# Turn this on to compute transfer functions for the filters by comparing output data to input data # Turn this on to compute transfer functions for the filters by comparing output data to input data
TestFilters: No TestFilters: No
# Turn this on to monitor the state vector # Turn this on to monitor the state vector
......
...@@ -38,10 +38,16 @@ def Latency(): ...@@ -38,10 +38,16 @@ def Latency():
print("{} of {} frames with latency over 6s".format(sum(i > 6 for i in lat), len(lat)), file = sys.stderr) print("{} of {} frames with latency over 6s".format(sum(i > 6 for i in lat), len(lat)), file = sys.stderr)
print("Latency increased by {}s over {}s of data".format(lat_increase, o_gps[-1] - o_gps[0]), file = sys.stderr) print("Latency increased by {}s over {}s of data".format(lat_increase, o_gps[-1] - o_gps[0]), file = sys.stderr)
# 4-s latency is typical in this configuration. More than 5 s could
# indicate a problem, while less than 3 s could mean that the CI
# latency-testing pipeline is not running as it should be.
assert np.mean(lat) < 5 assert np.mean(lat) < 5
assert np.mean(lat) > 3
# There should be no large excursions (This may occasionally fail) # There should be no large excursions (This may occasionally fail)
assert max(lat) < 10 assert max(lat) < 10
assert min(lat) > 0
# There should not be numerous small excursions # There should not be numerous small excursions
assert sum(i > 6 for i in lat) < 10 assert sum(i > 6 for i in lat) < 10
assert sum(i < 2 for i in lat) < 10
assert lat_increase < 0.5 assert lat_increase < 0.5
...@@ -86,7 +86,7 @@ for name in pcal_line_names.split(','): ...@@ -86,7 +86,7 @@ for name in pcal_line_names.split(','):
pcal_corrections.append(float(filters["%s_corr_im" % name])) pcal_corrections.append(float(filters["%s_corr_im" % name]))
y_arm_pcal_corr = filters['y_arm_pcal_corr'] y_arm_pcal_corr = filters['y_arm_pcal_corr']
pcalx_freqs = [410.2,1083.3,33.43,56.39,77.73,102.13,283.91] pcalx_freqs = [33.43,77.73,102.13,283.91]
x_arm_pcal_corr = -1 * filters['y_arm_pcal_corr'] x_arm_pcal_corr = -1 * filters['y_arm_pcal_corr']
for f in pcalx_freqs: for f in pcalx_freqs:
pcalx_frequencies.append(float(f)) pcalx_frequencies.append(float(f))
...@@ -101,7 +101,7 @@ for f in pcalx_freqs: ...@@ -101,7 +101,7 @@ for f in pcalx_freqs:
all_frequencies = frequencies + pcalx_frequencies all_frequencies = frequencies + pcalx_frequencies
pcal_time_advance = 0.00006103515625 pcal_time_advance = 0 #.00006103515625
for i in range(len(pcal_corrections) // 2): for i in range(len(pcal_corrections) // 2):
corr = pcal_corrections[2 * i] + 1j * pcal_corrections[2 * i + 1] corr = pcal_corrections[2 * i] + 1j * pcal_corrections[2 * i + 1]
corr *= numpy.exp(2.0 * numpy.pi * 1j * frequencies[i] * pcal_time_advance) corr *= numpy.exp(2.0 * numpy.pi * 1j * frequencies[i] * pcal_time_advance)
...@@ -207,7 +207,7 @@ def pcal2darm(pipeline, name): ...@@ -207,7 +207,7 @@ def pcal2darm(pipeline, name):
def Pcal2darm(): def Pcal2darm():
test_common.build_and_run(pcal2darm, "pcal2darm", segment = segments.segment((LIGOTimeGPS(0, 1000000000 * gps_start_time), LIGOTimeGPS(0, 1000000000 * gps_end_time)))) test_common.build_and_run(pcal2darm, "pcal2darm", segment = segments.segment((LIGOTimeGPS(0, 1000000000 * gps_start_time), LIGOTimeGPS(0, 1000000000 * gps_end_time))))
plot_pcal()
rms('P') rms('P')
rms('P', 'E') rms('P', 'E')
plot_pcal()
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
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