diff --git a/gstlal-calibration/bin/gstlal_compute_strain b/gstlal-calibration/bin/gstlal_compute_strain index 15bfdbf381b5aa0f0e250d14ff0a31f8f84fc782..8ef91ae4066eb841493ef1030613f40d91a5eefa 100755 --- a/gstlal-calibration/bin/gstlal_compute_strain +++ b/gstlal-calibration/bin/gstlal_compute_strain @@ -523,6 +523,10 @@ else: print("Warning: Could not find expected fs in filters file or config file. Setting to zero.") fs_squared_default = 0 +# fs_squared_default cannot be exactly zero, as it is later the deniminator of a division +if fs_squared_default == 0: + fs_squared_default = 0.01 + fs_default = numpy.sqrt(complex(fs_squared_default)) if "srcQ" in filters: diff --git a/gstlal-calibration/tests/check_calibration/ASD_plots b/gstlal-calibration/tests/check_calibration/ASD_plots index 798c3f6a5ac603528785275dc94cfe3883283424..c79861094e37aa2cf6d60917060890e4f4e4d54a 100755 --- a/gstlal-calibration/tests/check_calibration/ASD_plots +++ b/gstlal-calibration/tests/check_calibration/ASD_plots @@ -80,7 +80,14 @@ filename_suffix = options.filename_suffix ASDs = [] ratios = [] for i in range(0, len(frame_cache_list)): - ASDs.append(TimeSeries.read(frame_cache_list[i], '%s:%s' % (ifo, channel_list[i]), start = start_time, end = end_time).asd(4, 2, method = 'lal_median')) + cache = open(frame_cache_list[i], 'r').readlines() + new_cache = [] + for gwf_file in cache: + gwf_file = str(gwf_file).split("localhost", 1)[1].strip() + new_cache.append(gwf_file) + data = TimeSeries.read(new_cache, '%s:%s' % (ifo, channel_list[i]), start = start_time, end = end_time) + ASDs.append(data.asd(16, 8, method = 'lal_median')) + #ASDs.append(TimeSeries.read(frame_cache_list[i], '%s:%s' % (ifo, channel_list[i]), start = start_time, end = end_time).asd(4, 2, method = 'lal_median')) if i > 0: ratios.append(ASDs[i] / ASDs[0]) diff --git a/gstlal-calibration/tests/check_calibration/demod_ratio_timeseries.py b/gstlal-calibration/tests/check_calibration/demod_ratio_timeseries.py index 598a541c8c1d70a58da20b7fb6e7f7e7cdd706cb..2234a103db444eeef7ad61fb6e6d47e758790e71 100644 --- a/gstlal-calibration/tests/check_calibration/demod_ratio_timeseries.py +++ b/gstlal-calibration/tests/check_calibration/demod_ratio_timeseries.py @@ -202,7 +202,8 @@ for i in range(0, len(freq_list)): # Make plots plt.figure(figsize = (10, 10)) plt.subplot(211) - plt.plot(times, magnitudes[0], colors[0], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz} \ [\mu = %0.4f, \sigma = %0.4f]$' % (freq_list[i][0], numpy.mean(magnitudes[0]), numpy.std(magnitudes[0]))) + #plt.plot(times, magnitudes[0], colors[0], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz} \ [\mu = %0.4f, \sigma = %0.4f]$' % (freq_list[i][0], numpy.mean(magnitudes[0]), numpy.std(magnitudes[0]))) + plt.plot(times, magnitudes[0], colors[0], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz}$' % (freq_list[i][0])) #plt.title(options.plot_titles.split(';')[i]) plt.ylabel(r'${\rm Magnitude}$') magnitude_range = options.magnitude_ranges.split(';')[i] @@ -211,7 +212,8 @@ for i in range(0, len(freq_list)): leg = plt.legend(fancybox = True, markerscale = 8.0 / markersize, numpoints = 3) leg.get_frame().set_alpha(0.8) plt.subplot(212) - plt.plot(times, phases[0], colors[0], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz} \ [\mu = %0.1f^{\circ}, \sigma = %0.1f^{\circ}]$' % (freq_list[i][0], numpy.mean(phases[0]), numpy.std(phases[0]))) + plt.plot(times, phases[0], colors[0], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz}$' % (freq_list[i][0])) + #plt.plot(times, phases[0], colors[0], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz} \ [\mu = %0.1f^{\circ}, \sigma = %0.1f^{\circ}]$' % (freq_list[i][0], numpy.mean(phases[0]), numpy.std(phases[0]))) plt.ylabel(r'${\rm Phase \ [deg]}$') plt.xlabel(r'${\rm Time \ in \ %s \ since \ %s \ UTC}$' % (t_unit, time.strftime("%b %d %Y %H:%M:%S".replace(':', '{:}').replace('-', '\mbox{-}').replace(' ', '\ '), time.gmtime(t_start + 315964782)))) phase_range = options.phase_ranges.split(';')[i] @@ -227,11 +229,13 @@ for i in range(0, len(freq_list)): magnitudes[j].append(data[(filter_time + average_time) * k][1]) phases[j].append(data[(filter_time + average_time) * k][2]) plt.subplot(211) - plt.plot(times, magnitudes[j], colors[j], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz} \ [\mu = %0.4f, \sigma = %0.4f]$' % (freq_list[i][j], numpy.mean(magnitudes[j]), numpy.std(magnitudes[j]))) + plt.plot(times, magnitudes[j], colors[j], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz}$' % (freq_list[i][j])) + #plt.plot(times, magnitudes[j], colors[j], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz} \ [\mu = %0.4f, \sigma = %0.4f]$' % (freq_list[i][j], numpy.mean(magnitudes[j]), numpy.std(magnitudes[j]))) leg = plt.legend(fancybox = True, markerscale = 8.0 / markersize, numpoints = 3) leg.get_frame().set_alpha(0.8) plt.subplot(212) - plt.plot(times, phases[j], colors[j], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz} \ [\mu = %0.1f^{\circ}, \sigma = %0.1f^{\circ}]$' % (freq_list[i][j], numpy.mean(phases[j]), numpy.std(phases[j]))) + #plt.plot(times, phases[j], colors[j], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz} \ [\mu = %0.1f^{\circ}, \sigma = %0.1f^{\circ}]$' % (freq_list[i][j], numpy.mean(phases[j]), numpy.std(phases[j]))) + plt.plot(times, phases[j], colors[j], linestyle = 'None', marker = '.', markersize = markersize, label = r'${\rm %0.1f \ Hz}$' % (freq_list[i][j])) leg = plt.legend(fancybox = True, markerscale = 8.0 / markersize, numpoints = 3) leg.get_frame().set_alpha(0.8) plt.savefig('%s_%d-%d.png' % (options.plot_titles.split(';')[i].replace(' ', '_'), int(t_start), int(dur))) diff --git a/gstlal-calibration/tests/check_calibration/frame_manipulator.py b/gstlal-calibration/tests/check_calibration/frame_manipulator.py index 165794302cf937e37db401effd4bc3eddacc1de3..2f1fab7a2f63992f032e94cce7baa00749a4c04c 100644 --- a/gstlal-calibration/tests/check_calibration/frame_manipulator.py +++ b/gstlal-calibration/tests/check_calibration/frame_manipulator.py @@ -165,6 +165,7 @@ channel_list.append("CAL-CS_TDEP_PCALX_LINE3_COMPARISON_OSC_FREQ") channel_list.append("CAL-CS_TDEP_PCAL_LINE4_COMPARISON_OSC_FREQ") channel_list.append("CAL-CS_TDEP_PCALY_LINE4_COMPARISON_OSC_FREQ") channel_list.append("CAL-CS_TDEP_PCALX_LINE4_COMPARISON_OSC_FREQ") +channel_list.append("CAL-PCALX_PCALOSC1_OSC_FREQ") channel_list.append("PEM-EY_MAINSMON_EBAY_1_DQ") channel_list.append("PEM-EY_MAINSMON_EBAY_2_DQ") channel_list.append("PEM-EY_MAINSMON_EBAY_3_DQ") diff --git a/gstlal-calibration/tests/check_calibration/plot_transfer_function.py b/gstlal-calibration/tests/check_calibration/plot_transfer_function.py index 37c8519fc91ad27b559f8bd48abc6dd86b0ae4e6..239e2c9ee96837f4d00de3db614e3d934e0021af 100644 --- a/gstlal-calibration/tests/check_calibration/plot_transfer_function.py +++ b/gstlal-calibration/tests/check_calibration/plot_transfer_function.py @@ -294,7 +294,7 @@ if options.poles is not None: for i in range(0, len(real_poles) / 2): poles.append(float(real_poles[2 * i]) + 1j * float(real_poles[2 * i + 1])) -colors = ['blue', 'limegreen', 'y', 'c', 'm', 'b'] # Hopefully the user will not want to plot more than six datasets on one plot. +colors = ['blue', 'limegreen', 'maroon', 'orchid', 'red', 'b'] # Hopefully the user will not want to plot more than six datasets on one plot. for i in range(0, len(labels)): # Remove unwanted lines from file, and re-format wanted lines f = open('%s_%s_over_%s_%d-%d.txt' % (ifo, labels[i].replace(' ', '_').replace('/', 'over'), options.denominator_channel_name, options.gps_start_time, data_duration),"r")