diff --git a/gstlal-calibration/tests/check_calibration/Makefile b/gstlal-calibration/tests/check_calibration/Makefile index 20563ecce368a9ed65478a8901983ed2fa6edf6c..6998d5a0af08670c1ac650723c166730ec5eb01c 100644 --- a/gstlal-calibration/tests/check_calibration/Makefile +++ b/gstlal-calibration/tests/check_calibration/Makefile @@ -130,6 +130,9 @@ GDS_over_C02: $(IFO)1_hoft_GDS_frames.cache $(IFO)1_C02_frames.cache DCS_over_C02: $(IFO)1_hoft_DCS_frames.cache $(IFO)1_C02_frames.cache python plot_transfer_function.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --denominator-frame-cache $(IFO)1_C02_frames.cache --denominator-channel-name DCS-CALIB_STRAIN_C02 --denominator-name 'C02' --numerator-frame-cache-list $(IFO)1_hoft_DCS_frames.cache --numerator-channel-list DCS-CALIB_STRAIN --numerator-name 'DCS' --use-median --magnitude-min 0.7 --magnitude-max 1.3 --phase-min -20.0 --phase-max 20.0 --labels 'DCS / C02' +kappastimeseries_GDS: $(IFO)1_hoft_GDS_frames.cache $(IFO)1_easy_raw_frames.cache + python timeserieskappas.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --frame-cache $(IFO)1_hoft_GDS_frames.cache --channel-list 'GDS-CALIB_KAPPA_TST_REAL_NOGATE','GDS-CALIB_KAPPA_TST_IMAGINARY_NOGATE','GDS-CALIB_KAPPA_PUM_REAL_NOGATE','GDS-CALIB_KAPPA_PUM_IMAGINARY_NOGATE','GDS-CALIB_KAPPA_UIM_REAL_NOGATE','GDS-CALIB_KAPPA_UIM_IMAGINARY_NOGATE','GDS-CALIB_KAPPA_C_NOGATE','GDS-CALIB_F_CC_NOGATE' --raw-channel-list 'CAL-CS_TDEP_KAPPA_TST_REAL_OUTPUT','CAL-CS_TDEP_KAPPA_TST_IMAG_OUTPUT','CAL-CS_TDEP_KAPPA_PUM_REAL_OUTPUT','CAL-CS_TDEP_KAPPA_PUM_IMAG_OUTPUT','CAL-CS_TDEP_KAPPA_UIM_REAL_OUTPUT','CAL-CS_TDEP_KAPPA_UIM_IMAG_OUTPUT','CAL-CS_TDEP_KAPPA_C_OUTPUT','CAL-CS_TDEP_F_C_OUTPUT' --raw-frame-cache $(IFO)1_easy_raw_frames.cache + noise_subtraction_ASD_DCS: $(IFO)1_hoft_DCS_frames.cache ./ASD_comparison_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --raw-frame-cache $(IFO)1_hoft_DCS_frames.cache --calcs-channel-name DCS-CALIB_STRAIN --hoft-frame-cache $(IFO)1_hoft_DCS_frames.cache --hoft-channel-name DCS-CALIB_STRAIN_CLEAN diff --git a/gstlal-calibration/tests/check_calibration/timeserieskappas.py b/gstlal-calibration/tests/check_calibration/timeserieskappas.py index f41d7db39f605710ed9f9739b745932204736b89..d20207eb5273c970ecd598994bbb3602857e25aa 100644 --- a/gstlal-calibration/tests/check_calibration/timeserieskappas.py +++ b/gstlal-calibration/tests/check_calibration/timeserieskappas.py @@ -12,6 +12,8 @@ parser.add_option("--gps-end-time", metavar = "seconds", help = "Set the GPS end parser.add_option("--ifo", metavar = "name", help = "Interferometer to perform the analysis on") parser.add_option("--frame-cache", metavar = "name", help = "Filename for frame cache to be analyzed.") parser.add_option("--channel-list", metavar = "list", help = "List of channels to be plotted.") +parser.add_option("--raw-frame-cache", metavar = "name", help = "Filename for raw frame cache to be analyzed.") +parser.add_option("--raw-channel-list", metavar = "list", help = "List of raw channels to be plotted.") options, filenames = parser.parse_args() @@ -27,15 +29,28 @@ if options.channel_list is not None: else: raise ValueError('Channel list option must be set.') +raw_channel_list = [] +if options.raw_channel_list is not None: + raw_channels = options.raw_channel_list.split(',') + for raw_channel in raw_channels: + raw_channel_list.append((ifo, raw_channel)) +else: + raise ValueError('Raw channel list option must be set.') + +raw_data = TimeSeriesDict.read(options.raw_frame_cache, map("%s:%s".__mod__, raw_channel_list), start = start, end = end) data = TimeSeriesDict.read(options.frame_cache, map("%s:%s".__mod__, channel_list), start = start, end = end) segs = DataQualityFlag.query('%s:DMT-CALIBRATED:1' % ifo, start, end) -for n, channel in enumerate(channels): - plot = TimeSeries.plot(data["%s:%s" % (ifo, channel)]) +for n in range(0, len(channels)): + plot = TimeSeries.plot(data["%s:%s" % (ifo, channels[n])], label = 'GDS') mpl.ylabel('Correction value') + ax = plot.gca() + ax.plot(raw_data["%s:%s" % (ifo, raw_channels[n])], label='CAL-CS') + ax.legend() #title = item #title = title.replace('_', '\_') - mpl.title(channel.replace('_', '\_')) + mpl.title(channels[n].replace('_', '\_')) plot.add_state_segments(segs, plotargs=dict(label='Calibrated')) - plot.savefig('%s_%s_%s_plot_%s.png' % (ifo, options.gps_start_time, options.gps_end_time, channel)) + plot.savefig('%s_%s_%s_plot_%s.png' % (ifo, options.gps_start_time, options.gps_end_time, channels[n])) +