diff --git a/gstlal-calibration/bin/gstlal_compute_strain b/gstlal-calibration/bin/gstlal_compute_strain index 763811ea9c308989473c039bfa1623c5b73eef68..33a33ebfb0cb9b6f1202b39d806f382cf544b417 100755 --- a/gstlal-calibration/bin/gstlal_compute_strain +++ b/gstlal-calibration/bin/gstlal_compute_strain @@ -270,6 +270,7 @@ witness_frequency_resolution = float(DataCleaningConfigs["witnessfrequencyresolu witness_tf_update_time = float(DataCleaningConfigs["witnesstfupdatetime"]) critical_lock_loss_time = float(DataCleaningConfigs["criticallocklosstime"]) witness_filter_taper_time = float(DataCleaningConfigs["witnessfiltertapertime"]) +witness_tf_time_shift = float(DataCleaningConfigs["witnesstftimeshift"]) witness_tf_filename = DataCleaningConfigs["witnesstffilename"] if DataCleaningConfigs["witnesstffilename"] != "None" else None expected_kappatst_real = float(TDCFConfigs["expectedkappatstreal"]) @@ -345,6 +346,7 @@ remove_cal_lines = Config.getboolean("DataCleaningConfigurations", "removecallin remove_power_lines = Config.getboolean("DataCleaningConfigurations", "removepowerlines") remove_dc = Config.getboolean("DataCleaningConfigurations", "removedc") witness_tf_use_median = Config.getboolean("DataCleaningConfigurations", "witnesstfusemedian") +witness_tf_parallel_mode = False if config_version < 2 else Config.getboolean("DataCleaningConfigurations", "witnesstfparallelmode") # If td is true we will perform filtering in the time domain (direct convolution) in all FIR filtering routines below td = not Config.getboolean("PipelineConfigurations", "frequencydomainfiltering") # Boolean for dewhitening @@ -2189,7 +2191,7 @@ if remove_power_lines: # Remove excess noise using any provided witness channels if witness_channel_list is not None: # Remove initial data from computation of transfer functions and wait until the filters and kappas settle - witness_delay_time = filter_settle_time + (1.0 - filter_latency_factor) * (demodulation_filter_time + median_smoothing_samples / compute_factors_sr + factors_average_samples / compute_factors_sr) + witness_delay_time = witness_tf_time_shift if witness_tf_parallel_mode else (filter_settle_time + (1.0 - filter_latency_factor) * (demodulation_filter_time + median_smoothing_samples / compute_factors_sr + factors_average_samples / compute_factors_sr)) # In high latency, make the witnesses wait to be filtered until new filters are ready witness_wait_time = (filter_settle_time + demodulation_filter_time + median_smoothing_samples / compute_factors_sr + factors_average_samples / compute_factors_sr + witness_channel_fft_time / 2.0 * (num_witness_ffts + 1.0)) if filter_latency_factor else 0.0 # How much does the "delay_time" need to increase per iteration of cleaning? @@ -2218,7 +2220,7 @@ if witness_channel_list is not None: witnesses.append(calibration_parts.caps_and_progress(pipeline, head_dict[key], "audio/x-raw, format=F64LE, channels=1, channel-mask=(bitmask)0x0", key)) if len(witnesses) != len(witness_channel_list[i]): print "WARNING: Not all requested witness channels are being used" - clean_strain = calibration_parts.clean_data(pipeline, clean_strain, hoft_sr, witnesses, witness_rates[i], witness_fft_samples, witness_fft_overlap, num_witness_ffts, min_witness_ffts, witness_tf_update_samples, witness_fir_samples, witness_frequency_resolution, witness_filter_taper_length, use_median = witness_tf_use_median, notch_frequencies = witness_notch_frequencies[i], noisesub_gate_bit = noisesubgatetee, delay_time = witness_delay_time, wait_time = witness_wait_time, critical_lock_loss_time = critical_lock_loss_time, filename = None if witness_tf_filename is None else "%s_%d.txt" % (witness_tf_filename, i)) + clean_strain = calibration_parts.clean_data(pipeline, clean_strain, hoft_sr, witnesses, witness_rates[i], witness_fft_samples, witness_fft_overlap, num_witness_ffts, min_witness_ffts, witness_tf_update_samples, witness_fir_samples, witness_frequency_resolution, witness_filter_taper_length, use_median = witness_tf_use_median, parallel_mode = witness_tf_parallel_mode, notch_frequencies = witness_notch_frequencies[i], noisesub_gate_bit = noisesubgatetee, delay_time = witness_delay_time, wait_time = witness_wait_time, critical_lock_loss_time = critical_lock_loss_time, filename = None if witness_tf_filename is None else "%s_%d.txt" % (witness_tf_filename, i)) witness_delay_time += witness_delay_increment witness_wait_time += witness_wait_increment diff --git a/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning.ini b/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning.ini index 0c7d1ae18d26e3cf623b6b18b4adccd92335680e..adfa49bdc5e59b31ceb072c8ecea8f0669f67f11 100644 --- a/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning.ini +++ b/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning.ini @@ -1,6 +1,6 @@ [InputConfigurations] # Track what "version" of config file this is, so that the pipeline knows which options are present in this file -ConfigVersion: 0 +ConfigVersion: 2 # Filters file containing calibration FIR filters, relative to the directory gstlal-calibration/tests/check_calibration/, from which the pipeline is expected to be run FiltersFileName: H1DCS_newsrcline_1173225472.npz # Data source should be set to frames or lvshm @@ -298,6 +298,7 @@ CBCHWInjBitmask: 16777216 BurstHWInjBitmask: 33554432 DetCharHWInjBitmask: 67108864 StochHWInjBitmask: 8388608 +NoiseSubGateBitmask: 2 [PipelineConfigurations] BufferLength: 1.0 @@ -348,6 +349,10 @@ WitnessFilterTaperTime: 10 WitnessTFFilename: transfer_functions # Should the transfer function calculation use a median? If not, an average (mean) is used. WitnessTFUseMedian: Yes +# Should transfer functions be computed on a fixed schedule, so that the output does not depend on start time? This is useful for running jobs in parallel. Otherwise, they are computed asap. +WitnessTFParallelMode: No +# When using parallel mode, how many seconds later should we shift the time when transfer functions start being computed from a multiple of the cycle period? +WitnessTFTimeShift: 400 ############################### # Options for HOFT_CLEAN bits # ############################### diff --git a/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning_TEST.ini b/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning_TEST.ini new file mode 100644 index 0000000000000000000000000000000000000000..28265209db3c91dc354c7e6b4102ed01af2f63c5 --- /dev/null +++ b/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning_TEST.ini @@ -0,0 +1,368 @@ +[InputConfigurations] +# Track what "version" of config file this is, so that the pipeline knows which options are present in this file +ConfigVersion: 2 +# Filters file containing calibration FIR filters, relative to the directory gstlal-calibration/tests/check_calibration/, from which the pipeline is expected to be run +FiltersFileName: H1DCS_newsrcline_1173225472.npz +# Data source should be set to frames or lvshm +DataSource: frames +FileChecksum: No +# Right now, SkipBadFiles needs to be off when reading from frames +SkipBadFiles: No +############################################ +# If reading from frames use these options # +############################################ +# None + +################################################### +# If reading from shared memory use these options # +################################################### +SHMPartition: LHO_Online +# Assumed duration of input frames in seconds +InputFrameDuration: 1 + +[OutputConfigurations] +CompressionScheme: 6 +CompressionLevel: 3 +ChanPrefix: DCS- +# Set to "None" if you do not want a channel suffix +ChanSuffix: None +# Data sink should be set to frames or lvshm +DataSink: frames +################################################# +# If writing to shared memory use these options # +################################################# +OutputSHMPartition: hoft_test +BufferMode: 2 +# Use this to approximate the frame size (in bytes) when writing to shared memory +FrameSize: 405338 +NumBuffers: 10 +############################################### +# If writing to frame files use these options # +############################################### +FrameType: H1DCS_TEST + +[CalibrationConfigurations] +IFO: H1 +# Set calibration mode to Full or Partial +CalibrationMode: Full +ComputeCalibStateVector: Yes + +[DebuggingConfigurations] +# If you want to write a pipeline graph, provide the graph name. Otherwise, set name equal to None +PipelineGraphFilename: gstlal_compute_strain +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 +TestLatency: No + +[TDCFConfigurations] +######################################################### +# Options related to time dependent correction factors # +######################################################### +ComputeKappaTST: Yes +ApplyKappaTST: No +# 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 + +ComputeKappaPU: Yes +ApplyKappaPU: No +# Set this to have the \kappa_pu factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors +ApplyComplexKappaPU: Yes + +ComputeKappaPUM: No +ApplyKappaPUM: No +# Set this to have the \kappa_p factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. +ApplyComplexKappaPUM: No + +ComputeKappaUIM: No +ApplyKappaUIM: No +# Set this to have the \kappa_u factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. +ApplyComplexKappaUIM: No + +# Set this to use a calibration line injected using the UIM stage of actuation to compute \kappa_U. Otherwise, the DARM_ctrl line is used. +UseUIMLine: Yes + +ComputeKappaC: Yes +ApplyKappaC: Yes + +ComputeFcc: Yes +ApplyFcc: Yes + +ComputeSRCQ: Yes +ApplySRCQ: Yes + +ComputeFs: Yes +ApplyFs: Yes + +########################################### +# Options related to the coherence gating # +########################################### +UseCoherence: Yes +CoherenceUncThreshold: 0.004 +# Amount of time used in front-end to compute coherence +CoherenceTime: 130 +################################################################### +# Options related to the computation configurations for the TDCFs # +################################################################### +ComputeFactorsSR: 16 +RecordFactorsSR: 16 +# Length in seconds of low-pass FIR filter used in demodulation of the calibration lines +DemodulationFilterTime: 20 +# Time (in seconds) to smooth out \kappas with a median-like method +MedianSmoothingTime: 128 +TDCFAveragingTime: 10 +#If set to yes, bad computed kappas will be replaced by the previous computed median in the running median array. Otherwise, they are replaced with the default value +TDCFDefaultToMedian: Yes +################################################## +# Options related to updating cavity pole filter # +################################################## +# Duration of the Fcc filter in the time domain in seconds +FccFilterDuration: 0.01 +# Number of seconds to average Fcc values before creating a new Fcc filter +FccAveragingTime: 60 +# Number of samples to be used when tapering old filter and ramping in new filter +FccFilterTaperLength: 32768 +############################ +# Nominal values for TDCFs # +############################ +ExpectedKappaTSTReal: 1.0 +ExpectedKappaTSTImag: 0.0 +ExpectedKappaPUMReal: 1.0 +ExpectedKappaPUMImag: 0.0 +ExpectedKappaUIMReal: 1.0 +ExpectedKappaUIMImag: 0.0 +ExpectedKappaPUReal: 1.0 +ExpectedKappaPUImag: 0.0 +ExpectedKappaC: 1.0 +ExpectedFcc: 360.0 +ExpectedFs: 6.91 +ExpectedSRCQ: 21.739 +################################ +# Acceptable variance in TDCFs # +################################ +KappaTSTRealVar: 0.2 +KappaTSTImagVar: 0.2 +KappaPURealVar: 0.2 +KappaPUImagVar: 0.2 +KappaPUMRealVar: 0.2 +KappaPUMImagVar: 0.2 +KappaUIMRealVar: 0.2 +KappaUIMImagVar: 0.2 +KappaCVar: 0.2 +FccVar: 50.0 +FsVar: 5.0 +SRCQInvMin: 0.0 +SRCQInvMax: 0.5 +####################### +# EPICS records input # +####################### +# Set to Yes if EPICS records for TDCF computations should be read from filters file. If set to No, they will be read from frames +FactorsFromFiltersFile: Yes +############################################################################################## +# Updating Sensing and Actuation filters with all frequency-dependent corrections parameters # +############################################################################################## +# Length of time (in seconds) between when inverse-sensing FIR filter is updated +SensingFilterUpdateTime: 60 +# Length of time (in seconds) over which the smoothed time-dependent parameters of the sensing function are averaged before updating the filter +SensingFilterAveragingTime: 1 +# Number of samples to be used when tapering old inverse sensing filter and ramping in new filter +SensingFilterTaperLength: 32768 +# Length of time (in seconds) between when the actuation FIR filters are updated +ActuationFilterUpdateTime: 60 +# Length of time (in seconds) over which the smoothed time-dependent parameters of the actuation function are averaged before updating the filter +ActuationFilterAveragingTime: 1 +# Number of samples to be used when tapering old actuation filters and ramping in new filters +ActuationFilterTaperLength: 32768 + +[ChannelNames] +############################# +# Calibration Channel Names # +############################# +DARMCtrlChannel: CAL-DARM_CTRL_WHITEN_OUT_DBL_DQ +DARMErrChannel: CAL-DARM_ERR_WHITEN_OUT_DBL_DQ +DeltaLTSTChannel: CAL-DELTAL_CTRL_TST_DBL_DQ +DeltaLPUMChannel: CAL-DELTAL_CTRL_PUM_DBL_DQ +DeltaLUIMChannel: CAL-DELTAL_CTRL_UIM_DBL_DQ +DeltaLResChannel: CAL-DELTAL_RESIDUAL_DBL_DQ +#################################### +# Data Quality Vector Channel Name # +#################################### +InputDQChannel: ODC-MASTER_CHANNEL_OUT_DQ +################################## +# Calibration Line Channel Names # +################################## +DARMExcChannel: CAL-CS_LINE_SUM_DQ +TSTExcChannel: SUS-ETMY_L3_CAL_LINE_OUT_DQ +PUMExcChannel: SUS-ETMY_L2_CAL_LINE_OUT_DQ +UIMExcChannel: SUS-ETMY_L1_CAL_LINE_OUT_DQ +PCALChannel: CAL-PCALY_TX_PD_OUT_DQ +####################################### +# Coherence Uncertainty Channel Names # +####################################### +CohUncSusLine1Channel: CAL-CS_TDEP_SUS_LINE1_UNCERTAINTY +CohUncSusLine2Channel: CAL-CS_TDEP_SUS_LINE2_UNCERTAINTY +CohUncSusLine3Channel: CAL-CS_TDEP_SUS_LINE1_UNCERTAINTY +CohUncPcalyLine1Channel: CAL-CS_TDEP_PCALY_LINE1_UNCERTAINTY +CohUncPcalyLine2Channel: CAL-CS_TDEP_PCALY_LINE2_UNCERTAINTY +CohUncDARMLine1Channel: CAL-CS_TDEP_DARM_LINE1_UNCERTAINTY +################################### +# Noise Subtraction Channel Names # +################################### +PowerLinesChannel: PEM-EY_MAINSMON_EBAY_1_DQ +# Comma-separated list of witness channels to use to subtract noise from h(t) +# Set to None if no witness channels are to be used +WitnessChannelList: IMC-WFS_A_DC_PIT_OUT_DQ,IMC-WFS_B_DC_PIT_OUT_DQ,IMC-WFS_A_DC_YAW_OUT_DQ,IMC-WFS_B_DC_YAW_OUT_DQ,PSL-DIAG_BULLSEYE_YAW_OUT_DQ,PSL-DIAG_BULLSEYE_WID_OUT_DQ,PSL-DIAG_BULLSEYE_PIT_OUT_DQ +############################### +# EPICS Records Channel Names # +############################### +EP1RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_TST_REAL +EP1ImagChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_TST_IMAG +EP2RealChannel: CAL-CS_TDEP_REF_CLGRATIO_CTRL_REAL +EP2ImagChannel: CAL-CS_TDEP_REF_CLGRATIO_CTRL_IMAG +EP3RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_INV_REAL +EP3ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_INV_IMAG +EP4RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_TST_REAL +EP4ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_TST_IMAG +EP5RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_REAL +EP5ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_IMAG +EP6RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_C_NOCAVPOLE_REAL +EP6ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_C_NOCAVPOLE_IMAG +EP7RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_D_REAL +EP7ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_D_IMAG +EP8RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_TST_REAL +EP8Imagchannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_TST_IMAG +EP9RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_USUM_REAL +EP9ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_USUM_IMAG +EP10RealChannel: CAL-CS_TDEP_ESD_LINE1_REF_A_TST_NOLOCK_REAL +EP10ImagChannel: CAL-CS_TDEP_ESD_LINE1_REF_A_TST_NOLOCK_IMAG +EP11RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_C_NOCAVPOLE_REAL +EP11ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_C_NOCAVPOLE_IMAG +EP12RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_D_REAL +EP12ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_D_IMAG +EP13RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_TST_REAL +EP13ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_TST_IMAG +EP14RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_USUM_REAL +EP14ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_USUM_IMAG +EP15RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_PUM_REAL +EP15Imagchannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_PUM_IMAG +EP16RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_UIM_INV_REAL +EP16ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_UIM_INV_IMAG +EP17RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_PUM_REAL +EP17ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_PUM_IMAG +EP18RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_PUM_REAL +EP18ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_PUM_IMAG +EP19RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_UIM_REAL +EP19ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_UIM_IMAG +EP20RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_PUM_REAL +EP20ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_PUM_IMAG +EP21RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_UIM_REAL +EP21ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_UIM_IMAG +EP22RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_UIM_REAL +EP22ImagChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_UIM_IMAG +EP23RealChannel: CAL-CS_TDEP_PUM_LINE1_REF_A_PUM_NOLOCK_REAL +EP23ImagChannel: CAL-CS_TDEP_PUM_LINE1_REF_A_PUM_NOLOCK_IMAG +EP24RealChannel: CAL-CS_TDEP_UIM_LINE1_REF_A_UIM_NOLOCK_REAL +EP24ImagChannel: CAL-CS_TDEP_UIM_LINE1_REF_A_UIM_NOLOCK_IMAG + +[SampleRates] +# Sample rate at which to compute h(t) +HoftSR: 16384 +# Sample rate at which to compute CALIB_STATE_VECTOR +CalibStateSR: 16 +# Sample rate of control channel +# Should be 16384 if using DARM_CTRL and 4096 if using DELTAL_CTRL +CtrlSR: 16384 +# Sample rate of ODC channel +ODCSR: 16384 +# Sample rate of TST excitation channel +TSTExcSR: 512 +# Sample rate of PUM excitation channel +PUMExcSR: 512 +# Sample rate of UIM excitation channel +UIMExcSR: 512 +# Sample rate of coherence channels +CohSR: 16 +# Sample rate for the EPICS reference channels +EPICSRefSR: 16 +# Sample rate for power lines channel +PowerLinesChannelSR: 1024 +# Sample rates at which transfer functions will be computed and witness channels will be filtered, given as a semicolon-separated list, e.g., 2048;2048;512;2048. This must be given if WitnessChannelList is not None, and it must be the same length. +WitnessChannelSR: 2048 +# Sample rates at which to compute and record TDCFs +ComputeFactorsSR: 16 +RecordFactorsSR: 16 + +[Bitmasks] +ObsReadyBitmask: 4 +ObsIntentBitmask: 2 +CBCHWInjBitmask: 16777216 +BurstHWInjBitmask: 33554432 +DetCharHWInjBitmask: 67108864 +StochHWInjBitmask: 8388608 +NoiseSubGateBitmask: 2 + +[PipelineConfigurations] +BufferLength: 1.0 +FrequencyDomainFiltering: No +Dewhitening: No +# Latency of all filtering/averaging/median processes (other than calibration model filters) as a fraction of filter length. Value should be set between 0.0 and 1.0. +FilterLatency: 1.0 + +[DataCleaningConfigurations] +#################################################### +# Options for turning on and off line subtraction # +#################################################### +# Remove the DC component from the residual and control channels before filtering +RemoveDC: No +# Subtract the calibration lines from the h(t) spectrum +RemoveCalLines: Yes +# Subtract the power lines from the h(t) spectrum +RemovePowerLines: Yes +#################################################### +# Options for running power mains line subtraction # +#################################################### +# Amount by which frequency of power lines varies with time +PowerLinesFreqVar: 0.02 +# Time over which to average the transfer function between the power mains witness channel and h(t) at 60 Hz and harmonics +PowerLinesTFAveragingTime: 128 +####################################### +# Options for broadband noise removal # +####################################### +# The length in seconds of the fast Fourier transforms used to compute transfer functions between witness channels and h(t). The fft's are windowed with Hann windows and overlapped. +WitnessChannelFFTTime: 4.0 +# The number of ffts to take before averaging the witness -> h(t) transfer functions calculation. The average is taken after the ratio h(f) / witness(f). +NumWitnessFFTs: 510 +# Sets the minimum number of FFTs necessary to produce the first transfer functions and clean data after data flow starts. +MinWitnessFFTs: 510 +# The length in seconds of the filters applied to the witness channels before subtracting from h(t) +WitnessFIRLength: 0.5 +# The frequency resolution of the filters applied to the witness channels before subtracting from h(t). It can be advantageous to lower the frequency resolution in order to average over excess noise. +WitnessFrequencyResolution: 1.0 +# List of minima and maxima of frequency ranges where the Fourier transform of h(t) will be replaced by a straight line in the calculation of transfer functions between witness channels and h(t) for noise subtraction. Semicolons separate lists for different sets of witness channels. If no notches are desired, use zeros, e.g., \'0;0;0\'. Here is an example using the expected format: \'495.0,515.0,985.0,1015.0;59,60,119,121;0\' This can be useful, e.g., if there are loud lines in the signal that are not present in the witness channels. +WitnessNotchFrequencies: 495.0,515.0,985.0,1015.0 +# The amount of time after transfer functions between witness channels and h(t) are finished to begin the calculation of the next set of transfer functions +WitnessTFUpdateTime: 2 +# If lock-loss lasts at least this many seconds, transfer functions will revert to those computed at the beginning of a lock stretch. Set to zero to disbale. +CriticalLockLossTime: 0 +# The amount of time to use to taper in newly computed FIR filters for witness channels being used for noise subtraction. +WitnessFilterTaperTime: 10 +# If writing transfer functions to file, this sets the name. If transfer functions should not be written to file, this should be set to None +WitnessTFFilename: transfer_functions +# Should the transfer function calculation use a median? If not, an average (mean) is used. +WitnessTFUseMedian: Yes +# Should transfer functions be computed on a fixed schedule, so that the output does not depend on start time? This is useful for running jobs in parallel. Otherwise, they are computed asap. +WitnessTFParallelMode: Yes +# When using parallel mode, how many seconds later should we shift the time when transfer functions start being computed from a multiple of the cycle period? +WitnessTFTimeShift: 400 +############################### +# Options for HOFT_CLEAN bits # +############################### +# The amount of data from h(t) and cleaned h(t) that is used to compute and compare the rms. This comparison between cleaned and uncleaned h(t) determines whether the HOFT_CLEAN bits of the calibration state vector are on or off. +CleaningCheckRMSTime: 20.0 +# Minimum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_LOWFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeLowMin: 15 +# Maximum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_LOWFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeLowMax: 40 +# Minimum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_MIDFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeMidMin: 100 +# Maximum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_MIDFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeMidMax: 500 diff --git a/gstlal-calibration/config_files/O2/H1/tests/H1DCS_TEST_AllCorrections_Cleaning.ini b/gstlal-calibration/config_files/O2/H1/tests/H1DCS_TEST_AllCorrections_Cleaning.ini new file mode 100644 index 0000000000000000000000000000000000000000..286ecb850a9fbdf2998531d6958350c8eab00f44 --- /dev/null +++ b/gstlal-calibration/config_files/O2/H1/tests/H1DCS_TEST_AllCorrections_Cleaning.ini @@ -0,0 +1,363 @@ +[InputConfigurations] +# Track what "version" of config file this is, so that the pipeline knows which options are present in this file +ConfigVersion: 0 +# Filters file containing calibration FIR filters, relative to the directory gstlal-calibration/tests/check_calibration/, from which the pipeline is expected to be run +FiltersFileName: H1DCS_newsrcline_1173225472.npz +# Data source should be set to frames or lvshm +DataSource: frames +FileChecksum: No +# Right now, SkipBadFiles needs to be off when reading from frames +SkipBadFiles: No +############################################ +# If reading from frames use these options # +############################################ +# None + +################################################### +# If reading from shared memory use these options # +################################################### +SHMPartition: LHO_Online +# Assumed duration of input frames in seconds +InputFrameDuration: 1 + +[OutputConfigurations] +CompressionScheme: 6 +CompressionLevel: 3 +ChanPrefix: DCS- +# Set to "None" if you do not want a channel suffix +ChanSuffix: None +# Data sink should be set to frames or lvshm +DataSink: frames +################################################# +# If writing to shared memory use these options # +################################################# +OutputSHMPartition: hoft_test +BufferMode: 2 +# Use this to approximate the frame size (in bytes) when writing to shared memory +FrameSize: 405338 +NumBuffers: 10 +############################################### +# If writing to frame files use these options # +############################################### +FrameType: H1DCS_TEST + +[CalibrationConfigurations] +IFO: H1 +# Set calibration mode to Full or Partial +CalibrationMode: Full +ComputeCalibStateVector: Yes + +[DebuggingConfigurations] +# If you want to write a pipeline graph, provide the graph name. Otherwise, set name equal to None +PipelineGraphFilename: gstlal_compute_strain +Verbose: No +# 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 + +[TDCFConfigurations] +######################################################### +# Options related to time dependent correction factors # +######################################################### +ComputeKappaTST: Yes +ApplyKappaTST: No +# 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 + +ComputeKappaPU: Yes +ApplyKappaPU: No +# Set this to have the \kappa_pu factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors +ApplyComplexKappaPU: Yes + +ComputeKappaPUM: No +ApplyKappaPUM: No +# Set this to have the \kappa_p factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. +ApplyComplexKappaPUM: No + +ComputeKappaUIM: No +ApplyKappaUIM: No +# Set this to have the \kappa_u factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors. +ApplyComplexKappaUIM: No + +# Set this to use a calibration line injected using the UIM stage of actuation to compute \kappa_U. Otherwise, the DARM_ctrl line is used. +UseUIMLine: Yes + +ComputeKappaC: Yes +ApplyKappaC: Yes + +ComputeFcc: Yes +ApplyFcc: Yes + +ComputeSRCQ: Yes +ApplySRCQ: Yes + +ComputeFs: Yes +ApplyFs: Yes + +########################################### +# Options related to the coherence gating # +########################################### +UseCoherence: Yes +CoherenceUncThreshold: 0.004 +# Amount of time used in front-end to compute coherence +CoherenceTime: 130 +################################################################### +# Options related to the computation configurations for the TDCFs # +################################################################### +ComputeFactorsSR: 16 +RecordFactorsSR: 16 +# Length in seconds of low-pass FIR filter used in demodulation of the calibration lines +DemodulationFilterTime: 20 +# Time (in seconds) to smooth out \kappas with a median-like method +MedianSmoothingTime: 128 +TDCFAveragingTime: 10 +#If set to yes, bad computed kappas will be replaced by the previous computed median in the running median array. Otherwise, they are replaced with the default value +TDCFDefaultToMedian: Yes +################################################## +# Options related to updating cavity pole filter # +################################################## +# Duration of the Fcc filter in the time domain in seconds +FccFilterDuration: 0.01 +# Number of seconds to average Fcc values before creating a new Fcc filter +FccAveragingTime: 60 +# Number of samples to be used when tapering old filter and ramping in new filter +FccFilterTaperLength: 32768 +############################ +# Nominal values for TDCFs # +############################ +ExpectedKappaTSTReal: 1.0 +ExpectedKappaTSTImag: 0.0 +ExpectedKappaPUMReal: 1.0 +ExpectedKappaPUMImag: 0.0 +ExpectedKappaUIMReal: 1.0 +ExpectedKappaUIMImag: 0.0 +ExpectedKappaPUReal: 1.0 +ExpectedKappaPUImag: 0.0 +ExpectedKappaC: 1.0 +ExpectedFcc: 360.0 +ExpectedFs: 6.91 +ExpectedSRCQ: 21.739 +################################ +# Acceptable variance in TDCFs # +################################ +KappaTSTRealVar: 0.2 +KappaTSTImagVar: 0.2 +KappaPURealVar: 0.2 +KappaPUImagVar: 0.2 +KappaPUMRealVar: 0.2 +KappaPUMImagVar: 0.2 +KappaUIMRealVar: 0.2 +KappaUIMImagVar: 0.2 +KappaCVar: 0.2 +FccVar: 50.0 +FsVar: 5.0 +SRCQInvMin: 0.0 +SRCQInvMax: 0.5 +####################### +# EPICS records input # +####################### +# Set to Yes if EPICS records for TDCF computations should be read from filters file. If set to No, they will be read from frames +FactorsFromFiltersFile: Yes +############################################################################################## +# Updating Sensing and Actuation filters with all frequency-dependent corrections parameters # +############################################################################################## +# Length of time (in seconds) between when inverse-sensing FIR filter is updated +SensingFilterUpdateTime: 60 +# Length of time (in seconds) over which the smoothed time-dependent parameters of the sensing function are averaged before updating the filter +SensingFilterAveragingTime: 1 +# Number of samples to be used when tapering old inverse sensing filter and ramping in new filter +SensingFilterTaperLength: 32768 +# Length of time (in seconds) between when the actuation FIR filters are updated +ActuationFilterUpdateTime: 60 +# Length of time (in seconds) over which the smoothed time-dependent parameters of the actuation function are averaged before updating the filter +ActuationFilterAveragingTime: 1 +# Number of samples to be used when tapering old actuation filters and ramping in new filters +ActuationFilterTaperLength: 32768 + +[ChannelNames] +############################# +# Calibration Channel Names # +############################# +DARMCtrlChannel: CAL-DARM_CTRL_WHITEN_OUT_DBL_DQ +DARMErrChannel: CAL-DARM_ERR_WHITEN_OUT_DBL_DQ +DeltaLTSTChannel: CAL-DELTAL_CTRL_TST_DBL_DQ +DeltaLPUMChannel: CAL-DELTAL_CTRL_PUM_DBL_DQ +DeltaLUIMChannel: CAL-DELTAL_CTRL_UIM_DBL_DQ +DeltaLResChannel: CAL-DELTAL_RESIDUAL_DBL_DQ +#################################### +# Data Quality Vector Channel Name # +#################################### +InputDQChannel: ODC-MASTER_CHANNEL_OUT_DQ +################################## +# Calibration Line Channel Names # +################################## +DARMExcChannel: CAL-CS_LINE_SUM_DQ +TSTExcChannel: SUS-ETMY_L3_CAL_LINE_OUT_DQ +PUMExcChannel: SUS-ETMY_L2_CAL_LINE_OUT_DQ +UIMExcChannel: SUS-ETMY_L1_CAL_LINE_OUT_DQ +PCALChannel: CAL-PCALY_TX_PD_OUT_DQ +####################################### +# Coherence Uncertainty Channel Names # +####################################### +CohUncSusLine1Channel: CAL-CS_TDEP_SUS_LINE1_UNCERTAINTY +CohUncSusLine2Channel: CAL-CS_TDEP_SUS_LINE2_UNCERTAINTY +CohUncSusLine3Channel: CAL-CS_TDEP_SUS_LINE1_UNCERTAINTY +CohUncPcalyLine1Channel: CAL-CS_TDEP_PCALY_LINE1_UNCERTAINTY +CohUncPcalyLine2Channel: CAL-CS_TDEP_PCALY_LINE2_UNCERTAINTY +CohUncDARMLine1Channel: CAL-CS_TDEP_DARM_LINE1_UNCERTAINTY +################################### +# Noise Subtraction Channel Names # +################################### +PowerLinesChannel: PEM-EY_MAINSMON_EBAY_1_DQ +# Comma-separated list of witness channels to use to subtract noise from h(t) +# Set to None if no witness channels are to be used +WitnessChannelList: IMC-WFS_A_DC_PIT_OUT_DQ,IMC-WFS_B_DC_PIT_OUT_DQ,IMC-WFS_A_DC_YAW_OUT_DQ,IMC-WFS_B_DC_YAW_OUT_DQ;PSL-DIAG_BULLSEYE_YAW_OUT_DQ,PSL-DIAG_BULLSEYE_WID_OUT_DQ,PSL-DIAG_BULLSEYE_PIT_OUT_DQ +############################### +# EPICS Records Channel Names # +############################### +EP1RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_TST_REAL +EP1ImagChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_TST_IMAG +EP2RealChannel: CAL-CS_TDEP_REF_CLGRATIO_CTRL_REAL +EP2ImagChannel: CAL-CS_TDEP_REF_CLGRATIO_CTRL_IMAG +EP3RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_INV_REAL +EP3ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_INV_IMAG +EP4RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_TST_REAL +EP4ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_TST_IMAG +EP5RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_REAL +EP5ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_IMAG +EP6RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_C_NOCAVPOLE_REAL +EP6ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_C_NOCAVPOLE_IMAG +EP7RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_D_REAL +EP7ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_D_IMAG +EP8RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_TST_REAL +EP8Imagchannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_TST_IMAG +EP9RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_USUM_REAL +EP9ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_USUM_IMAG +EP10RealChannel: CAL-CS_TDEP_ESD_LINE1_REF_A_TST_NOLOCK_REAL +EP10ImagChannel: CAL-CS_TDEP_ESD_LINE1_REF_A_TST_NOLOCK_IMAG +EP11RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_C_NOCAVPOLE_REAL +EP11ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_C_NOCAVPOLE_IMAG +EP12RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_D_REAL +EP12ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_D_IMAG +EP13RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_TST_REAL +EP13ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_TST_IMAG +EP14RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_USUM_REAL +EP14ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_USUM_IMAG +EP15RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_PUM_REAL +EP15Imagchannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_PUM_IMAG +EP16RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_UIM_INV_REAL +EP16ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_UIM_INV_IMAG +EP17RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_PUM_REAL +EP17ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_PUM_IMAG +EP18RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_PUM_REAL +EP18ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_PUM_IMAG +EP19RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_UIM_REAL +EP19ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_UIM_IMAG +EP20RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_PUM_REAL +EP20ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_PUM_IMAG +EP21RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_UIM_REAL +EP21ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_UIM_IMAG +EP22RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_UIM_REAL +EP22ImagChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_UIM_IMAG +EP23RealChannel: CAL-CS_TDEP_PUM_LINE1_REF_A_PUM_NOLOCK_REAL +EP23ImagChannel: CAL-CS_TDEP_PUM_LINE1_REF_A_PUM_NOLOCK_IMAG +EP24RealChannel: CAL-CS_TDEP_UIM_LINE1_REF_A_UIM_NOLOCK_REAL +EP24ImagChannel: CAL-CS_TDEP_UIM_LINE1_REF_A_UIM_NOLOCK_IMAG + +[SampleRates] +# Sample rate at which to compute h(t) +HoftSR: 16384 +# Sample rate at which to compute CALIB_STATE_VECTOR +CalibStateSR: 16 +# Sample rate of control channel +# Should be 16384 if using DARM_CTRL and 4096 if using DELTAL_CTRL +CtrlSR: 16384 +# Sample rate of ODC channel +ODCSR: 16384 +# Sample rate of TST excitation channel +TSTExcSR: 512 +# Sample rate of PUM excitation channel +PUMExcSR: 512 +# Sample rate of UIM excitation channel +UIMExcSR: 512 +# Sample rate of coherence channels +CohSR: 16 +# Sample rate for the EPICS reference channels +EPICSRefSR: 16 +# Sample rate for power lines channel +PowerLinesChannelSR: 1024 +# Sample rates at which transfer functions will be computed and witness channels will be filtered, given as a semicolon-separated list, e.g., 2048;2048;512;2048. This must be given if WitnessChannelList is not None, and it must be the same length. +WitnessChannelSR: 2048;2048 +# Sample rates at which to compute and record TDCFs +ComputeFactorsSR: 16 +RecordFactorsSR: 16 + +[Bitmasks] +ObsReadyBitmask: 4 +ObsIntentBitmask: 2 +CBCHWInjBitmask: 16777216 +BurstHWInjBitmask: 33554432 +DetCharHWInjBitmask: 67108864 +StochHWInjBitmask: 8388608 + +[PipelineConfigurations] +BufferLength: 1.0 +FrequencyDomainFiltering: No +Dewhitening: No +# Latency of all filtering/averaging/median processes (other than calibration model filters) as a fraction of filter length. Value should be set between 0.0 and 1.0. +FilterLatency: 0.0 + +[DataCleaningConfigurations] +#################################################### +# Options for turning on and off line subtraction # +#################################################### +# Remove the DC component from the residual and control channels before filtering +RemoveDC: No +# Subtract the calibration lines from the h(t) spectrum +RemoveCalLines: Yes +# Subtract the power lines from the h(t) spectrum +RemovePowerLines: Yes +#################################################### +# Options for running power mains line subtraction # +#################################################### +# Amount by which frequency of power lines varies with time +PowerLinesFreqVar: 0.02 +# Time over which to average the transfer function between the power mains witness channel and h(t) at 60 Hz and harmonics +PowerLinesTFAveragingTime: 128 +####################################### +# Options for broadband noise removal # +####################################### +# The length in seconds of the fast Fourier transforms used to compute transfer functions between witness channels and h(t). The fft's are windowed with Hann windows and overlapped. +WitnessChannelFFTTime: 4.0 +# The number of ffts to take before averaging the witness -> h(t) transfer functions calculation. The average is taken after the ratio h(f) / witness(f). +NumWitnessFFTs: 1800 +# Sets the minimum number of FFTs necessary to produce the first transfer functions and clean data after data flow starts. +MinWitnessFFTs: 400 +# The length in seconds of the filters applied to the witness channels before subtracting from h(t) +WitnessFIRLength: 0.5 +# The frequency resolution of the filters applied to the witness channels before subtracting from h(t). It can be advantageous to lower the frequency resolution in order to average over excess noise. +WitnessFrequencyResolution: 1.0 +# List of minima and maxima of frequency ranges where the Fourier transform of h(t) will be replaced by a straight line in the calculation of transfer functions between witness channels and h(t) for noise subtraction. Semicolons separate lists for different sets of witness channels. If no notches are desired, use zeros, e.g., \'0;0;0\'. Here is an example using the expected format: \'495.0,515.0,985.0,1015.0;59,60,119,121;0\' This can be useful, e.g., if there are loud lines in the signal that are not present in the witness channels. +WitnessNotchFrequencies: 495.0,515.0,985.0,1015.0;495.0,515.0,985.0,1015.0 +# The amount of time after transfer functions between witness channels and h(t) are finished to begin the calculation of the next set of transfer functions +WitnessTFUpdateTime: 3600 +# If lock-loss lasts at least this many seconds, transfer functions will revert to those computed at the beginning of a lock stretch. Set to zero to disbale. +CriticalLockLossTime: 1800 +# The amount of time to use to taper in newly computed FIR filters for witness channels being used for noise subtraction. +WitnessFilterTaperTime: 10 +# If writing transfer functions to file, this sets the name. If transfer functions should not be written to file, this should be set to None +WitnessTFFilename: transfer_functions +# Should the transfer function calculation use a median? If not, an average (mean) is used. +WitnessTFUseMedian: Yes +############################### +# Options for HOFT_CLEAN bits # +############################### +# The amount of data from h(t) and cleaned h(t) that is used to compute and compare the rms. This comparison between cleaned and uncleaned h(t) determines whether the HOFT_CLEAN bits of the calibration state vector are on or off. +CleaningCheckRMSTime: 20.0 +# Minimum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_LOWFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeLowMin: 15 +# Maximum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_LOWFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeLowMax: 40 +# Minimum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_MIDFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeMidMin: 100 +# Maximum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_MIDFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeMidMax: 500 diff --git a/gstlal-calibration/config_files/PreER13/H1/C00/H1GDS_TEST_1225558818.ini b/gstlal-calibration/config_files/PreER13/H1/C00/H1GDS_TEST_1225558818.ini new file mode 100644 index 0000000000000000000000000000000000000000..29be0b9f6e3c13f4135d95343684cfe4dbbf22ee --- /dev/null +++ b/gstlal-calibration/config_files/PreER13/H1/C00/H1GDS_TEST_1225558818.ini @@ -0,0 +1,364 @@ +[InputConfigurations] +# Track what "version" of config file this is, so that the pipeline knows which options are present in this file +ConfigVersion: 0 +# Filters file containing calibration FIR filters +FiltersFileName: /home1/calibration/PreER13/GDSFilters/H1GDS_TEST_1225558818.npz +# Data source should be set to frames or lvshm +DataSource: lvshm +FileChecksum: No +# Right now, SkipBadFiles needs to be off when reading from frames +SkipBadFiles: No +############################################ +# If reading from frames use these options # +############################################ +# None + +################################################### +# If reading from shared memory use these options # +################################################### +SHMPartition: LHO_Online +# Assumed duration of input frames in seconds +InputFrameDuration: 1 + +[OutputConfigurations] +CompressionScheme: 6 +CompressionLevel: 3 +ChanPrefix: GDS- +# Set to "None" if you do not want a channel suffix +ChanSuffix: _TEST +# Data sink should be set to frames or lvshm +DataSink: lvshm +################################################# +# If writing to shared memory use these options # +################################################# +OutputSHMPartition: LHO_hoft +BufferMode: 2 +# Use this to approximate the frame size (in bytes) when writing to shared memory +FrameSize: 405338 +NumBuffers: 10 +############################################### +# If writing to frame files use these options # +############################################### +FrameType: H1GDS_TEST + +[CalibrationConfigurations] +IFO: H1 +# Set calibration mode to Full or Partial +CalibrationMode: Partial +ComputeCalibStateVector: Yes + +[DebuggingConfigurations] +# If you want to write a pipeline graph, provide the graph name. Otherwise, set name equal to None +PipelineGraphFilename: None +Verbose: No +# 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 + +[TDCFConfigurations] +######################################################### +# Options related to time dependent correction factors # +######################################################### +ComputeKappaTST: Yes +ApplyKappaTST: No +# 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 + +ComputeKappaPU: No +ApplyKappaPU: No +# Set this to have the \kappa_pu factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors +ApplyComplexKappaPU: No + +ComputeKappaPUM: Yes +ApplyKappaPUM: No +# 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 + +ComputeKappaUIM: Yes +ApplyKappaUIM: No +# 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 + +# Set this to use a calibration line injected using the UIM stage of actuation to compute \kappa_U. Otherwise, the DARM_ctrl line is used. +UseUIMLine: Yes + +ComputeKappaC: Yes +ApplyKappaC: Yes + +ComputeFcc: Yes +ApplyFcc: Yes + +ComputeSRCQ: Yes +ApplySRCQ: Yes + +ComputeFs: Yes +ApplyFs: Yes + +########################################### +# Options related to the coherence gating # +########################################### +UseCoherence: Yes +CoherenceUncThreshold: 0.004 +# Amount of time used in front-end to compute coherence +CoherenceTime: 130 +################################################################### +# Options related to the computation configurations for the TDCFs # +################################################################### +ComputeFactorsSR: 16 +RecordFactorsSR: 16 +# Length in seconds of low-pass FIR filter used in demodulation of the calibration lines +DemodulationFilterTime: 20 +# Time (in seconds) to smooth out \kappas with a median-like method +MedianSmoothingTime: 128 +TDCFAveragingTime: 10 +#If set to yes, bad computed kappas will be replaced by the previous computed median in the running median array. Otherwise, they are replaced with the default value +TDCFDefaultToMedian: Yes +################################################## +# Options related to updating cavity pole filter # +################################################## +# Duration of the Fcc filter in the time domain in seconds +FccFilterDuration: 0.01 +# Number of seconds to average Fcc values before creating a new Fcc filter +FccAveragingTime: 60 +# Number of samples to be used when tapering old filter and ramping in new filter +FccFilterTaperLength: 32768 +############################ +# Nominal values for TDCFs # +############################ +ExpectedKappaTSTReal: 1.0 +ExpectedKappaTSTImag: 0.0 +ExpectedKappaPUMReal: 1.0 +ExpectedKappaPUMImag: 0.0 +ExpectedKappaUIMReal: 1.0 +ExpectedKappaUIMImag: 0.0 +ExpectedKappaPUReal: 1.0 +ExpectedKappaPUImag: 0.0 +ExpectedKappaC: 1.0 +ExpectedFcc: 428.9 +ExpectedFs: 5.888 +ExpectedSRCQ: 4.254 +################################ +# Acceptable variance in TDCFs # +################################ +KappaTSTRealVar: 0.2 +KappaTSTImagVar: 0.2 +KappaPURealVar: 0.2 +KappaPUImagVar: 0.2 +KappaPUMRealVar: 0.2 +KappaPUMImagVar: 0.2 +KappaUIMRealVar: 0.2 +KappaUIMImagVar: 0.2 +KappaCVar: 0.2 +FccVar: 50.0 +FsVar: 5.0 +SRCQInvMin: 0.0 +SRCQInvMax: 0.5 +####################### +# EPICS records input # +####################### +# Set to Yes if EPICS records for TDCF computations should be read from filters file. If set to No, they will be read from frames +FactorsFromFiltersFile: No +############################################################################################## +# Updating Sensing and Actuation filters with all frequency-dependent corrections parameters # +############################################################################################## +# Length of time (in seconds) between when inverse-sensing FIR filter is updated +SensingFilterUpdateTime: 60 +# Length of time (in seconds) over which the smoothed time-dependent parameters of the sensing function are averaged before updating the filter +SensingFilterAveragingTime: 1 +# Number of samples to be used when tapering old inverse sensing filter and ramping in new filter +SensingFilterTaperLength: 32768 +# Length of time (in seconds) between when the actuation FIR filters are updated +ActuationFilterUpdateTime: 60 +# Length of time (in seconds) over which the smoothed time-dependent parameters of the actuation function are averaged before updating the filter +ActuationFilterAveragingTime: 1 +# Number of samples to be used when tapering old actuation filters and ramping in new filters +ActuationFilterTaperLength: 32768 + +[ChannelNames] +############################# +# Calibration Channel Names # +############################# +DARMCtrlChannel: CAL-DARM_CTRL_DBL_DQ +DARMErrChannel: CAL-DARM_ERR_DBL_DQ +DeltaLTSTChannel: CAL-DELTAL_CTRL_TST_DBL_DQ +DeltaLPUMChannel: CAL-DELTAL_CTRL_PUM_DBL_DQ +DeltaLUIMChannel: CAL-DELTAL_CTRL_UIM_DBL_DQ +DeltaLResChannel: CAL-DELTAL_RESIDUAL_DBL_DQ +#################################### +# Data Quality Vector Channel Name # +#################################### +InputDQChannel: ODC-MASTER_CHANNEL_OUT_DQ +################################## +# Calibration Line Channel Names # +################################## +DARMExcChannel: CAL-CS_LINE_SUM_DQ +TSTExcChannel: SUS-ETMY_L3_CAL_LINE_OUT_DQ +PUMExcChannel: SUS-ETMY_L2_CAL_LINE_OUT_DQ +UIMExcChannel: SUS-ETMY_L1_CAL_LINE_OUT_DQ +PCALChannel: CAL-PCALY_TX_PD_OUT_DQ +####################################### +# Coherence Uncertainty Channel Names # +####################################### +CohUncSusLine1Channel: CAL-CS_TDEP_SUS_LINE1_UNCERTAINTY +CohUncSusLine2Channel: CAL-CS_TDEP_SUS_LINE2_UNCERTAINTY +CohUncSusLine3Channel: CAL-CS_TDEP_SUS_LINE3_UNCERTAINTY +CohUncPcalyLine1Channel: CAL-CS_TDEP_PCAL_LINE1_UNCERTAINTY +CohUncPcalyLine2Channel: CAL-CS_TDEP_PCAL_LINE2_UNCERTAINTY +# FIXME: This is a hack. gstlal_compute_strain needs to not require this channel in the next release! +CohUncDARMLine1Channel: CAL-CS_TDEP_SUS_LINE3_UNCERTAINTY +################################### +# Noise Subtraction Channel Names # +################################### +PowerLinesChannel: PEM-EY_MAINSMON_EBAY_1_DQ +# Comma-separated list of witness channels to use to subtract noise from h(t) +# Set to None if no witness channels are to be used +WitnessChannelList: IMC-WFS_A_DC_PIT_OUT_DQ,IMC-WFS_B_DC_PIT_OUT_DQ,IMC-WFS_A_DC_YAW_OUT_DQ,IMC-WFS_B_DC_YAW_OUT_DQ;PSL-DIAG_BULLSEYE_YAW_OUT_DQ,PSL-DIAG_BULLSEYE_WID_OUT_DQ,PSL-DIAG_BULLSEYE_PIT_OUT_DQ +############################### +# EPICS Records Channel Names # +############################### +EP1RealChannel: CAL-CS_TDEP_SUS_LINE3_REF_INVA_TST_RESPRATIO_REAL +EP1ImagChannel: CAL-CS_TDEP_SUS_LINE3_REF_INVA_TST_RESPRATIO_IMAG +EP2RealChannel: CAL-CS_TDEP_REF_CLGRATIO_CTRL_REAL +EP2ImagChannel: CAL-CS_TDEP_REF_CLGRATIO_CTRL_IMAG +EP3RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_INV_REAL +EP3ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_INV_IMAG +EP4RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_TST_REAL +EP4ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_TST_IMAG +EP5RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_REAL +EP5ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_IMAG +EP6RealChannel: CAL-CS_TDEP_PCAL_LINE2_REF_C_NOCAVPOLE_REAL +EP6ImagChannel: CAL-CS_TDEP_PCAL_LINE2_REF_C_NOCAVPOLE_IMAG +EP7RealChannel: CAL-CS_TDEP_PCAL_LINE2_REF_D_REAL +EP7ImagChannel: CAL-CS_TDEP_PCAL_LINE2_REF_D_IMAG +EP8RealChannel: CAL-CS_TDEP_PCAL_LINE2_REF_A_TST_REAL +EP8Imagchannel: CAL-CS_TDEP_PCAL_LINE2_REF_A_TST_IMAG +EP9RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_USUM_REAL +EP9ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_USUM_IMAG +EP10RealChannel: CAL-CS_TDEP_SUS_LINE3_REF_A_TST_NOLOCK_REAL +EP10ImagChannel: CAL-CS_TDEP_SUS_LINE3_REF_A_TST_NOLOCK_IMAG +EP11RealChannel: CAL-CS_TDEP_PCAL_LINE4_REF_C_NOCAVPOLE_REAL +EP11ImagChannel: CAL-CS_TDEP_PCAL_LINE4_REF_C_NOCAVPOLE_IMAG +EP12RealChannel: CAL-CS_TDEP_PCAL_LINE4_REF_D_REAL +EP12ImagChannel: CAL-CS_TDEP_PCAL_LINE4_REF_D_IMAG +EP13RealChannel: CAL-CS_TDEP_PCAL_LINE4_REF_A_TST_REAL +EP13ImagChannel: CAL-CS_TDEP_PCAL_LINE4_REF_A_TST_IMAG +EP14RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_USUM_REAL +EP14ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_USUM_IMAG +EP15RealChannel: CAL-CS_TDEP_SUS_LINE2_REF_INVA_PUM_RESPRATIO_REAL +EP15Imagchannel: CAL-CS_TDEP_SUS_LINE2_REF_INVA_PUM_RESPRATIO_IMAG +EP16RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_UIM_INV_REAL +EP16ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_UIM_INV_IMAG +EP17RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_PUM_REAL +EP17ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_PUM_IMAG +EP18RealChannel: CAL-CS_TDEP_PCAL_LINE2_REF_A_PUM_REAL +EP18ImagChannel: CAL-CS_TDEP_PCAL_LINE2_REF_A_PUM_IMAG +EP19RealChannel: CAL-CS_TDEP_PCAL_LINE2_REF_A_UIM_REAL +EP19ImagChannel: CAL-CS_TDEP_PCAL_LINE2_REF_A_UIM_IMAG +EP20RealChannel: CAL-CS_TDEP_PCAL_LINE4_REF_A_PUM_REAL +EP20ImagChannel: CAL-CS_TDEP_PCAL_LINE4_REF_A_PUM_IMAG +EP21RealChannel: CAL-CS_TDEP_PCAL_LINE4_REF_A_UIM_REAL +EP21ImagChannel: CAL-CS_TDEP_PCAL_LINE4_REF_A_UIM_IMAG +EP22RealChannel: CAL-CS_TDEP_SUS_LINE1_REF_INVA_UIM_RESPRATIO_REAL +EP22ImagChannel: CAL-CS_TDEP_SUS_LINE1_REF_INVA_UIM_RESPRATIO_IMAG +EP23RealChannel: CAL-CS_TDEP_SUS_LINE2_REF_A_PUM_NOLOCK_REAL +EP23ImagChannel: CAL-CS_TDEP_SUS_LINE2_REF_A_PUM_NOLOCK_IMAG +EP24RealChannel: CAL-CS_TDEP_SUS_LINE1_REF_A_UIM_NOLOCK_REAL +EP24ImagChannel: CAL-CS_TDEP_SUS_LINE1_REF_A_UIM_NOLOCK_IMAG + +[SampleRates] +# Sample rate at which to compute h(t) +HoftSR: 16384 +# Sample rate at which to compute CALIB_STATE_VECTOR +CalibStateSR: 16 +# Sample rate of control channel +# Should be 16384 if using DARM_CTRL and 4096 if using DELTAL_CTRL +CtrlSR: 4096 +# Sample rate of ODC channel +ODCSR: 16384 +# Sample rate of TST excitation channel +TSTExcSR: 512 +# Sample rate of PUM excitation channel +PUMExcSR: 512 +# Sample rate of UIM excitation channel +UIMExcSR: 512 +# Sample rate of coherence channels +CohSR: 16 +# Sample rate for the EPICS reference channels +EPICSRefSR: 16 +# Sample rate for power lines channel +PowerLinesChannelSR: 1024 +# Sample rates at which transfer functions will be computed and witness channels will be filtered, given as a semicolon-separated list, e.g., 2048;2048;512;2048. This must be given if WitnessChannelList is not None, and it must be the same length. +WitnessChannelSR: 2048;2048 +# Sample rates at which to compute and record TDCFs +ComputeFactorsSR: 16 +RecordFactorsSR: 16 + +[Bitmasks] +ObsReadyBitmask: 4 +ObsIntentBitmask: 2 +CBCHWInjBitmask: 16777216 +BurstHWInjBitmask: 33554432 +DetCharHWInjBitmask: 67108864 +StochHWInjBitmask: 8388608 + +[PipelineConfigurations] +BufferLength: 1.0 +FrequencyDomainFiltering: No +Dewhitening: No +# Latency of all filtering/averaging/median processes (other than calibration model filters) as a fraction of filter length. Value should be set between 0.0 and 1.0. +FilterLatency: 0.0 + +[DataCleaningConfigurations] +#################################################### +# Options for turning on and off noise subtraction # +#################################################### +# Remove the DC component from the residual and control channels before filtering +RemoveDC: No +# Subtract the calibration lines from the h(t) spectrum +RemoveCalLines: Yes +# Subtract the power lines from the h(t) spectrum +RemovePowerLines: Yes +######################################### +# Options for running noise subtraction # +######################################### +# Amount by which frequency of power lines varies with time +PowerLinesFreqVar: 0.02 +# Time over which to average the transfer function between the power mains witness channel and h(t) at 60 Hz and harmonics +PowerLinesTFAveragingTime: 128 +####################################### +# Options for broadband noise removal # +####################################### +# The length in seconds of the fast Fourier transforms used to compute transfer functions between witness channels and h(t). The fft's are windowed with Hann windows and overlapped. +WitnessChannelFFTTime: 4.0 +# The number of ffts to take before averaging the witness -> h(t) transfer functions calculation. The average is taken after the ratio h(f) / witness(f). +NumWitnessFFTs: 1800 +# Sets the minimum number of FFTs necessary to produce the first transfer functions and clean data after data flow starts. +MinWitnessFFTs: 400 +# The length in seconds of the filters applied to the witness channels before subtracting from h(t) +WitnessFIRLength: 0.5 +# The frequency resolution of the filters applied to the witness channels before subtracting from h(t). It can be advantageous to lower the frequency resolution in order to average over excess noise. +WitnessFrequencyResolution: 1.0 +# List of minima and maxima of frequency ranges where the Fourier transform of h(t) will be replaced by a straight line in the calculation of transfer functions between witness channels and h(t) for noise subtraction. Semicolons separate lists for different sets of witness channels. If no notches are desired, use zeros, e.g., \'0;0;0\'. Here is an example using the expected format: \'495.0,515.0,985.0,1015.0;59,60,119,121;0\' This can be useful, e.g., if there are loud lines in the signal that are not present in the witness channels. +WitnessNotchFrequencies: 495.0,515.0,985.0,1015.0;495.0,515.0,985.0,1015.0 +# The amount of time after transfer functions between witness channels and h(t) are finished to begin the calculation of the next set of transfer functions +WitnessTFUpdateTime: 3600 +# If lock-loss lasts at least this many seconds, transfer functions will revert to those computed at the beginning of a lock stretch. Set to zero to disbale. +CriticalLockLossTime: 1800 +# The amount of time to use to taper in newly computed FIR filters for witness channels being used for noise subtraction. +WitnessFilterTaperTime: 10 +# If writing transfer functions to file, this sets the name. If transfer functions should not be written to file, this should be set to None +WitnessTFFilename: None +# Should the transfer function calculation use a median? If not, an average (mean) is used. +WitnessTFUseMedian: Yes +############################### +# Options for HOFT_CLEAN bits # +############################### +# The amount of data from h(t) and cleaned h(t) that is used to compute and compare the rms. This comparison between cleaned and uncleaned h(t) determines whether the HOFT_CLEAN bits of the calibration state vector are on or off. +CleaningCheckRMSTime: 20.0 +# Minimum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_LOWFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeLowMin: 15 +# Maximum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_LOWFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeLowMax: 40 +# Minimum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_MIDFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeMidMin: 100 +# Maximum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_MIDFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeMidMax: 500 diff --git a/gstlal-calibration/config_files/PreER13/H1/tests/H1DCS_AllCorrections_Cleaning.ini b/gstlal-calibration/config_files/PreER13/H1/tests/H1DCS_AllCorrections_Cleaning.ini new file mode 100644 index 0000000000000000000000000000000000000000..ebed292f2f30f52f254c525877ee49c6c6065338 --- /dev/null +++ b/gstlal-calibration/config_files/PreER13/H1/tests/H1DCS_AllCorrections_Cleaning.ini @@ -0,0 +1,363 @@ +[InputConfigurations] +# Track what "version" of config file this is, so that the pipeline knows which options are present in this file +ConfigVersion: 0 +# Filters file containing calibration FIR filters, relative to the directory gstlal-calibration/tests/check_calibration/, from which the pipeline is expected to be run +FiltersFileName: H1DCS_.npz +# Data source should be set to frames or lvshm +DataSource: frames +FileChecksum: No +# Right now, SkipBadFiles needs to be off when reading from frames +SkipBadFiles: No +############################################ +# If reading from frames use these options # +############################################ +# None + +################################################### +# If reading from shared memory use these options # +################################################### +SHMPartition: LHO_Online +# Assumed duration of input frames in seconds +InputFrameDuration: 1 + +[OutputConfigurations] +CompressionScheme: 6 +CompressionLevel: 3 +ChanPrefix: DCS- +# Set to "None" if you do not want a channel suffix +ChanSuffix: None +# Data sink should be set to frames or lvshm +DataSink: frames +################################################# +# If writing to shared memory use these options # +################################################# +OutputSHMPartition: hoft_test +BufferMode: 2 +# Use this to approximate the frame size (in bytes) when writing to shared memory +FrameSize: 405338 +NumBuffers: 10 +############################################### +# If writing to frame files use these options # +############################################### +FrameType: H1DCS_TEST + +[CalibrationConfigurations] +IFO: H1 +# Set calibration mode to Full or Partial +CalibrationMode: Full +ComputeCalibStateVector: Yes + +[DebuggingConfigurations] +# If you want to write a pipeline graph, provide the graph name. Otherwise, set name equal to None +PipelineGraphFilename: gstlal_compute_strain +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 +TestLatency: No + +[TDCFConfigurations] +######################################################### +# Options related to time dependent correction factors # +######################################################### +ComputeKappaTST: Yes +ApplyKappaTST: No +# 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 + +ComputeKappaPU: No +ApplyKappaPU: No +# Set this to have the \kappa_pu factors the actuation chain with an adaptive filter that corrects for both magnitude and phase errors +ApplyComplexKappaPU: No + +ComputeKappaPUM: Yes +ApplyKappaPUM: No +# 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 + +ComputeKappaUIM: Yes +ApplyKappaUIM: No +# 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 + +# Set this to use a calibration line injected using the UIM stage of actuation to compute \kappa_U. Otherwise, the DARM_ctrl line is used. +UseUIMLine: Yes + +ComputeKappaC: Yes +ApplyKappaC: Yes + +ComputeFcc: Yes +ApplyFcc: Yes + +ComputeSRCQ: Yes +ApplySRCQ: Yes + +ComputeFs: Yes +ApplyFs: Yes + +########################################### +# Options related to the coherence gating # +########################################### +UseCoherence: Yes +CoherenceUncThreshold: 0.004 +# Amount of time used in front-end to compute coherence +CoherenceTime: 130 +################################################################### +# Options related to the computation configurations for the TDCFs # +################################################################### +ComputeFactorsSR: 16 +RecordFactorsSR: 16 +# Length in seconds of low-pass FIR filter used in demodulation of the calibration lines +DemodulationFilterTime: 20 +# Time (in seconds) to smooth out \kappas with a median-like method +MedianSmoothingTime: 128 +TDCFAveragingTime: 10 +#If set to yes, bad computed kappas will be replaced by the previous computed median in the running median array. Otherwise, they are replaced with the default value +TDCFDefaultToMedian: Yes +################################################## +# Options related to updating cavity pole filter # +################################################## +# Duration of the Fcc filter in the time domain in seconds +FccFilterDuration: 0.01 +# Number of seconds to average Fcc values before creating a new Fcc filter +FccAveragingTime: 60 +# Number of samples to be used when tapering old filter and ramping in new filter +FccFilterTaperLength: 32768 +############################ +# Nominal values for TDCFs # +############################ +ExpectedKappaTSTReal: 1.0 +ExpectedKappaTSTImag: 0.0 +ExpectedKappaPUMReal: 1.0 +ExpectedKappaPUMImag: 0.0 +ExpectedKappaUIMReal: 1.0 +ExpectedKappaUIMImag: 0.0 +ExpectedKappaPUReal: 1.0 +ExpectedKappaPUImag: 0.0 +ExpectedKappaC: 1.0 +ExpectedFcc: 360.0 +ExpectedFs: 6.91 +ExpectedSRCQ: 21.739 +################################ +# Acceptable variance in TDCFs # +################################ +KappaTSTRealVar: 0.2 +KappaTSTImagVar: 0.2 +KappaPURealVar: 0.2 +KappaPUImagVar: 0.2 +KappaPUMRealVar: 0.2 +KappaPUMImagVar: 0.2 +KappaUIMRealVar: 0.2 +KappaUIMImagVar: 0.2 +KappaCVar: 0.2 +FccVar: 50.0 +FsVar: 5.0 +SRCQInvMin: 0.0 +SRCQInvMax: 0.5 +####################### +# EPICS records input # +####################### +# Set to Yes if EPICS records for TDCF computations should be read from filters file. If set to No, they will be read from frames +FactorsFromFiltersFile: Yes +############################################################################################## +# Updating Sensing and Actuation filters with all frequency-dependent corrections parameters # +############################################################################################## +# Length of time (in seconds) between when inverse-sensing FIR filter is updated +SensingFilterUpdateTime: 60 +# Length of time (in seconds) over which the smoothed time-dependent parameters of the sensing function are averaged before updating the filter +SensingFilterAveragingTime: 1 +# Number of samples to be used when tapering old inverse sensing filter and ramping in new filter +SensingFilterTaperLength: 32768 +# Length of time (in seconds) between when the actuation FIR filters are updated +ActuationFilterUpdateTime: 60 +# Length of time (in seconds) over which the smoothed time-dependent parameters of the actuation function are averaged before updating the filter +ActuationFilterAveragingTime: 1 +# Number of samples to be used when tapering old actuation filters and ramping in new filters +ActuationFilterTaperLength: 32768 + +[ChannelNames] +############################# +# Calibration Channel Names # +############################# +DARMCtrlChannel: CAL-DARM_CTRL_WHITEN_OUT_DBL_DQ +DARMErrChannel: CAL-DARM_ERR_WHITEN_OUT_DBL_DQ +DeltaLTSTChannel: CAL-DELTAL_CTRL_TST_DBL_DQ +DeltaLPUMChannel: CAL-DELTAL_CTRL_PUM_DBL_DQ +DeltaLUIMChannel: CAL-DELTAL_CTRL_UIM_DBL_DQ +DeltaLResChannel: CAL-DELTAL_RESIDUAL_DBL_DQ +#################################### +# Data Quality Vector Channel Name # +#################################### +InputDQChannel: ODC-MASTER_CHANNEL_OUT_DQ +################################## +# Calibration Line Channel Names # +################################## +DARMExcChannel: CAL-CS_LINE_SUM_DQ +TSTExcChannel: SUS-ETMY_L3_CAL_LINE_OUT_DQ +PUMExcChannel: SUS-ETMY_L2_CAL_LINE_OUT_DQ +UIMExcChannel: SUS-ETMY_L1_CAL_LINE_OUT_DQ +PCALChannel: CAL-PCALY_TX_PD_OUT_DQ +####################################### +# Coherence Uncertainty Channel Names # +####################################### +CohUncSusLine1Channel: CAL-CS_TDEP_SUS_LINE1_UNCERTAINTY +CohUncSusLine2Channel: CAL-CS_TDEP_SUS_LINE2_UNCERTAINTY +CohUncSusLine3Channel: CAL-CS_TDEP_SUS_LINE1_UNCERTAINTY +CohUncPcalyLine1Channel: CAL-CS_TDEP_PCALY_LINE1_UNCERTAINTY +CohUncPcalyLine2Channel: CAL-CS_TDEP_PCALY_LINE2_UNCERTAINTY +CohUncDARMLine1Channel: CAL-CS_TDEP_DARM_LINE1_UNCERTAINTY +################################### +# Noise Subtraction Channel Names # +################################### +PowerLinesChannel: PEM-EY_MAINSMON_EBAY_1_DQ +# Comma-separated list of witness channels to use to subtract noise from h(t) +# Set to None if no witness channels are to be used +WitnessChannelList: IMC-WFS_A_DC_PIT_OUT_DQ,IMC-WFS_B_DC_PIT_OUT_DQ,IMC-WFS_A_DC_YAW_OUT_DQ,IMC-WFS_B_DC_YAW_OUT_DQ;PSL-DIAG_BULLSEYE_YAW_OUT_DQ,PSL-DIAG_BULLSEYE_WID_OUT_DQ,PSL-DIAG_BULLSEYE_PIT_OUT_DQ +############################### +# EPICS Records Channel Names # +############################### +EP1RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_TST_REAL +EP1ImagChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_TST_IMAG +EP2RealChannel: CAL-CS_TDEP_REF_CLGRATIO_CTRL_REAL +EP2ImagChannel: CAL-CS_TDEP_REF_CLGRATIO_CTRL_IMAG +EP3RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_INV_REAL +EP3ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_INV_IMAG +EP4RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_TST_REAL +EP4ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_TST_IMAG +EP5RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_REAL +EP5ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_USUM_IMAG +EP6RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_C_NOCAVPOLE_REAL +EP6ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_C_NOCAVPOLE_IMAG +EP7RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_D_REAL +EP7ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_D_IMAG +EP8RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_TST_REAL +EP8Imagchannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_TST_IMAG +EP9RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_USUM_REAL +EP9ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_USUM_IMAG +EP10RealChannel: CAL-CS_TDEP_ESD_LINE1_REF_A_TST_NOLOCK_REAL +EP10ImagChannel: CAL-CS_TDEP_ESD_LINE1_REF_A_TST_NOLOCK_IMAG +EP11RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_C_NOCAVPOLE_REAL +EP11ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_C_NOCAVPOLE_IMAG +EP12RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_D_REAL +EP12ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_D_IMAG +EP13RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_TST_REAL +EP13ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_TST_IMAG +EP14RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_USUM_REAL +EP14ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_USUM_IMAG +EP15RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_PUM_REAL +EP15Imagchannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_PUM_IMAG +EP16RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_UIM_INV_REAL +EP16ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_UIM_INV_IMAG +EP17RealChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_PUM_REAL +EP17ImagChannel: CAL-CS_TDEP_DARM_LINE1_REF_A_PUM_IMAG +EP18RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_PUM_REAL +EP18ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_PUM_IMAG +EP19RealChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_UIM_REAL +EP19ImagChannel: CAL-CS_TDEP_PCALY_LINE2_REF_A_UIM_IMAG +EP20RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_PUM_REAL +EP20ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_PUM_IMAG +EP21RealChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_UIM_REAL +EP21ImagChannel: CAL-CS_TDEP_PCALY_LINE4_REF_A_UIM_IMAG +EP22RealChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_UIM_REAL +EP22ImagChannel: CAL-CS_TDEP_REF_INVA_CLGRATIO_UIM_IMAG +EP23RealChannel: CAL-CS_TDEP_PUM_LINE1_REF_A_PUM_NOLOCK_REAL +EP23ImagChannel: CAL-CS_TDEP_PUM_LINE1_REF_A_PUM_NOLOCK_IMAG +EP24RealChannel: CAL-CS_TDEP_UIM_LINE1_REF_A_UIM_NOLOCK_REAL +EP24ImagChannel: CAL-CS_TDEP_UIM_LINE1_REF_A_UIM_NOLOCK_IMAG + +[SampleRates] +# Sample rate at which to compute h(t) +HoftSR: 16384 +# Sample rate at which to compute CALIB_STATE_VECTOR +CalibStateSR: 16 +# Sample rate of control channel +# Should be 16384 if using DARM_CTRL and 4096 if using DELTAL_CTRL +CtrlSR: 16384 +# Sample rate of ODC channel +ODCSR: 16384 +# Sample rate of TST excitation channel +TSTExcSR: 512 +# Sample rate of PUM excitation channel +PUMExcSR: 512 +# Sample rate of UIM excitation channel +UIMExcSR: 512 +# Sample rate of coherence channels +CohSR: 16 +# Sample rate for the EPICS reference channels +EPICSRefSR: 16 +# Sample rate for power lines channel +PowerLinesChannelSR: 1024 +# Sample rates at which transfer functions will be computed and witness channels will be filtered, given as a semicolon-separated list, e.g., 2048;2048;512;2048. This must be given if WitnessChannelList is not None, and it must be the same length. +WitnessChannelSR: 2048;2048 +# Sample rates at which to compute and record TDCFs +ComputeFactorsSR: 16 +RecordFactorsSR: 16 + +[Bitmasks] +ObsReadyBitmask: 4 +ObsIntentBitmask: 2 +CBCHWInjBitmask: 16777216 +BurstHWInjBitmask: 33554432 +DetCharHWInjBitmask: 67108864 +StochHWInjBitmask: 8388608 + +[PipelineConfigurations] +BufferLength: 1.0 +FrequencyDomainFiltering: No +Dewhitening: No +# Latency of all filtering/averaging/median processes (other than calibration model filters) as a fraction of filter length. Value should be set between 0.0 and 1.0. +FilterLatency: 0.0 + +[DataCleaningConfigurations] +#################################################### +# Options for turning on and off line subtraction # +#################################################### +# Remove the DC component from the residual and control channels before filtering +RemoveDC: No +# Subtract the calibration lines from the h(t) spectrum +RemoveCalLines: Yes +# Subtract the power lines from the h(t) spectrum +RemovePowerLines: Yes +#################################################### +# Options for running power mains line subtraction # +#################################################### +# Amount by which frequency of power lines varies with time +PowerLinesFreqVar: 0.02 +# Time over which to average the transfer function between the power mains witness channel and h(t) at 60 Hz and harmonics +PowerLinesTFAveragingTime: 128 +####################################### +# Options for broadband noise removal # +####################################### +# The length in seconds of the fast Fourier transforms used to compute transfer functions between witness channels and h(t). The fft's are windowed with Hann windows and overlapped. +WitnessChannelFFTTime: 4.0 +# The number of ffts to take before averaging the witness -> h(t) transfer functions calculation. The average is taken after the ratio h(f) / witness(f). +NumWitnessFFTs: 1800 +# Sets the minimum number of FFTs necessary to produce the first transfer functions and clean data after data flow starts. +MinWitnessFFTs: 400 +# The length in seconds of the filters applied to the witness channels before subtracting from h(t) +WitnessFIRLength: 0.5 +# The frequency resolution of the filters applied to the witness channels before subtracting from h(t). It can be advantageous to lower the frequency resolution in order to average over excess noise. +WitnessFrequencyResolution: 1.0 +# List of minima and maxima of frequency ranges where the Fourier transform of h(t) will be replaced by a straight line in the calculation of transfer functions between witness channels and h(t) for noise subtraction. Semicolons separate lists for different sets of witness channels. If no notches are desired, use zeros, e.g., \'0;0;0\'. Here is an example using the expected format: \'495.0,515.0,985.0,1015.0;59,60,119,121;0\' This can be useful, e.g., if there are loud lines in the signal that are not present in the witness channels. +WitnessNotchFrequencies: 495.0,515.0,985.0,1015.0;495.0,515.0,985.0,1015.0 +# The amount of time after transfer functions between witness channels and h(t) are finished to begin the calculation of the next set of transfer functions +WitnessTFUpdateTime: 3600 +# If lock-loss lasts at least this many seconds, transfer functions will revert to those computed at the beginning of a lock stretch. Set to zero to disbale. +CriticalLockLossTime: 1800 +# The amount of time to use to taper in newly computed FIR filters for witness channels being used for noise subtraction. +WitnessFilterTaperTime: 10 +# If writing transfer functions to file, this sets the name. If transfer functions should not be written to file, this should be set to None +WitnessTFFilename: transfer_functions +# Should the transfer function calculation use a median? If not, an average (mean) is used. +WitnessTFUseMedian: Yes +############################### +# Options for HOFT_CLEAN bits # +############################### +# The amount of data from h(t) and cleaned h(t) that is used to compute and compare the rms. This comparison between cleaned and uncleaned h(t) determines whether the HOFT_CLEAN bits of the calibration state vector are on or off. +CleaningCheckRMSTime: 20.0 +# Minimum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_LOWFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeLowMin: 15 +# Maximum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_LOWFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeLowMax: 40 +# Minimum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_MIDFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeMidMin: 100 +# Maximum of a range of frequencies in which we expect line/noise subtraction to be impactful. The HOFT_CLEAN_MIDFREQ_OK bit of the calibration state vector is determined based on whether rms of the cleaned data is less than that of uncleaned h(t) in this range. +CleaningCheckRangeMidMax: 500 diff --git a/gstlal-calibration/gst/lal/gstlal_transferfunction.c b/gstlal-calibration/gst/lal/gstlal_transferfunction.c index 5f60fa2cfc7cc9efd4a8e4776889a6c96b457e1c..e5d1c012f662726d2d2fe447d3bc38e26020fde0 100644 --- a/gstlal-calibration/gst/lal/gstlal_transferfunction.c +++ b/gstlal-calibration/gst/lal/gstlal_transferfunction.c @@ -117,6 +117,7 @@ enum property { ARG_UPDATE_AFTER_GAP, ARG_USE_FIRST_AFTER_GAP, ARG_UPDATE_DELAY_SAMPLES, + ARG_PARALLEL_MODE, ARG_WRITE_TO_SCREEN, ARG_FILENAME, ARG_MAKE_FIR_FILTERS, @@ -514,15 +515,18 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen g_assert(!(src_size % element->unit_size)); \ src_size /= element->unit_size; \ \ - gint64 i, j, k, m, num_ffts, k_start, k_stop, first_index, first_index2, fd_fft_length, fd_tf_length, stride, num_tfs; \ + gint64 i, j, k, m, num_ffts, num_ffts_in_avg_if_nogap, k_start, k_stop, first_index, first_index2, fd_fft_length, fd_tf_length, stride, num_tfs; \ fd_fft_length = element->fft_length / 2 + 1; \ fd_tf_length = element->fir_length / 2 + 1; \ stride = element->fft_length - element->fft_overlap; \ num_tfs = element->channels - 1; \ DTYPE *real_fft = (DTYPE *) element->workspace.w ## S_OR_D ## pf.fft; \ \ - /* Determine how many fft's we will calculate from combined leftover and new input data */ \ - num_ffts = minimum64((element->workspace.w ## S_OR_D ## pf.num_leftover + stride - 1) / stride, element->num_ffts - element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg); \ + /* How many FFTs would there be in the average if there had been no gaps in the data used for transfer functions? Useful for parallel mode. */ \ + num_ffts_in_avg_if_nogap = element->parallel_mode ? (element->sample_count - (gint64) src_size - element->update_samples - element->fft_overlap) / stride : element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg; \ + \ + /* Determine how many FFTs we will calculate from combined leftover and new input data */ \ + num_ffts = minimum64((element->workspace.w ## S_OR_D ## pf.num_leftover + stride - 1) / stride, element->num_ffts - num_ffts_in_avg_if_nogap); \ num_ffts = minimum64(num_ffts, (element->workspace.w ## S_OR_D ## pf.num_leftover + (gint64) src_size - element->fft_overlap) / stride); \ if(num_ffts < 0) \ num_ffts = 0; \ @@ -642,10 +646,11 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen } \ \ element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg += num_ffts; \ + num_ffts_in_avg_if_nogap += num_ffts; \ \ - /* Determine how many fft's we will calculate from only new input samples */ \ - num_ffts = (element->sample_count - element->update_samples - element->fft_overlap) / stride - element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg; /* how many more we could compute */ \ - num_ffts = minimum64(num_ffts, element->num_ffts - element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg); /* how many more we need to update the transfer functions */ \ + /* Determine how many FFTs we will calculate from only new input samples, computed differently in parallel mode */ \ + num_ffts = (element->sample_count - element->update_samples - element->fft_overlap) / stride - num_ffts_in_avg_if_nogap; /* how many more we could compute */ \ + num_ffts = minimum64(num_ffts, element->num_ffts - num_ffts_in_avg_if_nogap); /* how many more we need to update transfer functions */ \ if(num_ffts < 0) \ num_ffts = 0; \ \ @@ -765,14 +770,16 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen } \ \ element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg += num_ffts; \ + num_ffts_in_avg_if_nogap += num_ffts; \ g_assert_cmpint(element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg, <=, element->num_ffts); \ + g_assert_cmpint(num_ffts_in_avg_if_nogap, <=, element->num_ffts); \ \ /* Now store samples for the next buffer. First, find the sample count of the start of the next fft */ \ gint64 sample_count_next_fft; \ - if(element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg == element->num_ffts) \ + if(num_ffts_in_avg_if_nogap == element->num_ffts) \ sample_count_next_fft = 2 * element->update_samples + element->num_ffts * stride + element->fft_overlap + 1; /* If we finished updating the transfer functions */ \ else \ - sample_count_next_fft = element->update_samples + 1 + element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg * stride; \ + sample_count_next_fft = element->update_samples + 1 + num_ffts_in_avg_if_nogap * stride; \ \ /* Deal with any leftover samples that will remain leftover */ \ first_index = (sample_count_next_fft - 1 - (element->sample_count - (gint64) src_size - element->workspace.w ## S_OR_D ## pf.num_leftover)) * element->channels; \ @@ -792,7 +799,7 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen element->workspace.w ## S_OR_D ## pf.num_leftover = maximum64(0, element->sample_count + 1 - sample_count_next_fft); \ \ /* Finally, update transfer functions if ready */ \ - if(element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg == element->num_ffts || (element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg - element->workspace.w ## S_OR_D ## pf.num_ffts_dropped >= element->min_ffts && *element->transfer_functions == 0.0)) { \ + if(num_ffts_in_avg_if_nogap == element->num_ffts || (!element->parallel_mode && num_ffts_in_avg_if_nogap - element->workspace.w ## S_OR_D ## pf.num_ffts_dropped >= element->min_ffts && *element->transfer_functions == 0.0)) { \ if(element->use_median) { \ /* Then we still need to fill the autocorrelation matrix with median values */ \ gint64 median_length = element->num_ffts / 2 + 1; \ @@ -844,17 +851,19 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen g_object_notify_by_pspec(G_OBJECT(element), properties[ARG_TRANSFER_FUNCTIONS]); \ /* Write transfer functions to the screen or a file if we want */ \ if(element->write_to_screen || element->filename) \ - write_transfer_functions(element->transfer_functions, gst_element_get_name(element), element->rate / 2.0 / (fd_tf_length - 1.0), fd_tf_length, num_tfs, element->t_start_tf, element->t_start_tf + (double) (element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg * stride + element->fft_overlap) / element->rate, element->write_to_screen, element->filename, TRUE); \ + write_transfer_functions(element->transfer_functions, gst_element_get_name(element), element->rate / 2.0 / (fd_tf_length - 1.0), fd_tf_length, num_tfs, element->t_start_tf, element->t_start_tf + (double) (num_ffts_in_avg_if_nogap * stride + element->fft_overlap) / element->rate, element->write_to_screen, element->filename, TRUE); \ /* If this is this first transfer function after a gap, we may wish to store it */ \ if(element->use_first_after_gap && !element->num_tfs_since_gap) { \ for(i = 0; i < num_tfs * fd_tf_length; i++) \ element->post_gap_transfer_functions[i] = element->transfer_functions[i]; \ } \ element->num_tfs_since_gap++; \ - } else \ + } else if (element->parallel_mode) \ GST_WARNING_OBJECT(element, "Transfer function(s) computation failed. Trying again."); \ + else \ + GST_WARNING_OBJECT(element, "Transfer function(s) computation failed. Waiting for the next cycle."); \ \ - if(element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg == element->num_ffts) { \ + if(num_ffts_in_avg_if_nogap == element->num_ffts) { \ element->sample_count = (gint64) (gst_util_uint64_scale_int_round(pts, element->rate, GST_SECOND) + src_size - element->update_delay_samples) % (element->update_samples + element->num_ffts * stride + element->fft_overlap); \ if(element->sample_count > element->update_samples) \ element->sample_count -= element->update_samples + element->num_ffts * stride + element->fft_overlap; \ @@ -871,7 +880,7 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen g_object_notify_by_pspec(G_OBJECT(element), properties[ARG_FIR_FILTERS]); \ /* Write FIR filters to the screen or a file if we want */ \ if(element->write_to_screen || element->filename) \ - write_fir_filters(element->fir_filters, gst_element_get_name(element), element->fir_length, num_tfs, element->t_start_tf, element->t_start_tf + (double) (element->workspace.w ## S_OR_D ## pf.num_ffts_in_avg * stride + element->fft_overlap) / element->rate, element->write_to_screen, element->filename, TRUE); \ + write_fir_filters(element->fir_filters, gst_element_get_name(element), element->fir_length, num_tfs, element->t_start_tf, element->t_start_tf + (double) (num_ffts_in_avg_if_nogap * stride + element->fft_overlap) / element->rate, element->write_to_screen, element->filename, TRUE); \ /* If this is this first FIR filter after a gap, we may wish to store it */ \ if(element->use_first_after_gap && element->num_tfs_since_gap == 1) { \ for(i = 0; i < num_tfs * element->fir_length; i++) \ @@ -913,10 +922,12 @@ static gboolean start(GstBaseSink *sink) { element->offset0 = GST_BUFFER_OFFSET_NONE; element->next_in_offset = GST_BUFFER_OFFSET_NONE; - /* At start of stream, we want the element to compute a transfer function as soon as possible */ - gint64 long_samples = element->num_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap; - gint64 short_samples = element->min_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap; - element->sample_count = element->update_samples - (short_samples * element->update_delay_samples + long_samples - 1) / long_samples; + /* At start of stream, we want the element to compute a transfer function as soon as possible, unless in parallel mode */ + if(!element->parallel_mode) { + gint64 long_samples = element->num_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap; + gint64 short_samples = element->min_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap; + element->sample_count = element->update_samples - (short_samples * element->update_delay_samples + long_samples - 1) / long_samples; + } element->computed_full_tfs = FALSE; /* If we are writing output to file, and a file already exists with the same name, remove it */ @@ -958,7 +969,7 @@ static gboolean event(GstBaseSink *sink, GstEvent *event) { gboolean success = TRUE; GST_DEBUG_OBJECT(element, "Got %s event on sink pad", GST_EVENT_TYPE_NAME(event)); - if(GST_EVENT_TYPE(event) == GST_EVENT_EOS) { + if(GST_EVENT_TYPE(event) == GST_EVENT_EOS && !element->parallel_mode) { /* If End Of Stream is here and we have not yet computed transfer functions from a full data set, use whatever data we have to compute them now. */ if(element->data_type == GSTLAL_TRANSFERFUNCTION_F32) { if(element->workspace.wspf.num_ffts_in_avg - element->workspace.wspf.num_ffts_dropped > element->min_ffts && !element->computed_full_tfs) { @@ -1721,16 +1732,20 @@ static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer) { if(G_UNLIKELY(GST_BUFFER_IS_DISCONT(buffer) || GST_BUFFER_OFFSET(buffer) != element->next_in_offset || !GST_CLOCK_TIME_IS_VALID(element->t0))) { element->t0 = GST_BUFFER_PTS(buffer); element->offset0 = GST_BUFFER_OFFSET(buffer); - if(element->sample_count > element->update_samples) { + if(element->parallel_mode) { + /* In this case, we want to compute the transfer functions on a schedule, not asap */ + element->sample_count = (gint64) (gst_util_uint64_scale_int_round(element->t0, element->rate, GST_SECOND) - element->update_delay_samples) % (element->update_samples + element->num_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap); + if(element->sample_count > element->update_samples) + element->sample_count -= element->update_samples + element->num_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap; + } else if(element->sample_count > element->update_samples) { if(*element->transfer_functions == 0.0) { /* Transfer functions have not been computed, so scale the delay samples down appropriately to compute them asap */ gint64 long_samples = element->num_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap; gint64 short_samples = element->min_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap; element->sample_count = element->update_samples - (short_samples * element->update_delay_samples + long_samples - 1) / long_samples; - } else { + } else /* Transfer functions have been computed, so apply the usual number of delay samples */ element->sample_count = element->update_samples - element->update_delay_samples; - } } if(element->data_type == GSTLAL_TRANSFERFUNCTION_F32) { element->workspace.wspf.num_ffts_in_avg = 0; @@ -1778,8 +1793,17 @@ static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer) { } /* Track the number of samples since the last non-gap data */ element->gap_samples += (mapinfo.size / element->unit_size); - /* Trick it into updating things after the gap ends, if we want */ - if(element->update_after_gap) { + + if(element->parallel_mode) { + /* Update the sample count no matter what */ + element->sample_count += (mapinfo.size / element->unit_size); + /* Throw away stored data */ + if(element->data_type == GSTLAL_TRANSFERFUNCTION_F32) + element->workspace.wspf.num_leftover = 0; + else + element->workspace.wdpf.num_leftover = 0; + } else if(element->update_after_gap) { + /* Trick it into updating things after the gap ends */ if(*element->transfer_functions == 0.0) { /* Transfer functions have not been computed, so scale the delay samples down appropriately to compute them asap */ gint64 long_samples = element->num_ffts * (element->fft_length - element->fft_overlap) + element->fft_overlap; @@ -1789,16 +1813,26 @@ static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer) { /* Transfer functions have been computed, so apply the usual number of delay samples */ element->sample_count = element->update_samples - element->update_delay_samples; } - } else - element->sample_count = minimum64(element->sample_count + mapinfo.size / element->unit_size, element->update_samples); - if(element->data_type == GSTLAL_TRANSFERFUNCTION_F32) { - element->workspace.wspf.num_ffts_in_avg = 0; - element->workspace.wspf.num_ffts_dropped = 0; - element->workspace.wspf.num_leftover = 0; + if(element->data_type == GSTLAL_TRANSFERFUNCTION_F32) { + element->workspace.wspf.num_ffts_in_avg = 0; + element->workspace.wspf.num_ffts_dropped = 0; + element->workspace.wspf.num_leftover = 0; + } else { + element->workspace.wdpf.num_ffts_in_avg = 0; + element->workspace.wdpf.num_ffts_dropped = 0; + element->workspace.wdpf.num_leftover = 0; + } } else { - element->workspace.wdpf.num_ffts_in_avg = 0; - element->workspace.wdpf.num_ffts_dropped = 0; - element->workspace.wdpf.num_leftover = 0; + element->sample_count = minimum64(element->sample_count + mapinfo.size / element->unit_size, element->update_samples); + if(element->data_type == GSTLAL_TRANSFERFUNCTION_F32) { + element->workspace.wspf.num_ffts_in_avg = 0; + element->workspace.wspf.num_ffts_dropped = 0; + element->workspace.wspf.num_leftover = 0; + } else { + element->workspace.wdpf.num_ffts_in_avg = 0; + element->workspace.wdpf.num_ffts_dropped = 0; + element->workspace.wdpf.num_leftover = 0; + } } } else { /* Increment the sample count */ @@ -1828,7 +1862,7 @@ static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer) { success = find_transfer_functions_double(element, (double *) mapinfo.data, mapinfo.size, GST_BUFFER_PTS(buffer)); } - if(!success) { + if(!success && !element->parallel_mode) { /* Try again */ element->sample_count = element->update_samples; if(element->data_type == GSTLAL_TRANSFERFUNCTION_F32) { @@ -2008,6 +2042,10 @@ static void set_property(GObject *object, enum property id, const GValue *value, element->update_delay_samples = g_value_get_int64(value); break; + case ARG_PARALLEL_MODE: + element->parallel_mode = g_value_get_boolean(value); + break; + case ARG_WRITE_TO_SCREEN: element->write_to_screen = g_value_get_boolean(value); break; @@ -2117,6 +2155,10 @@ static void get_property(GObject *object, enum property id, GValue *value, GPara g_value_set_int64(value, element->update_delay_samples); break; + case ARG_PARALLEL_MODE: + g_value_set_boolean(value, element->parallel_mode); + break; + case ARG_WRITE_TO_SCREEN: g_value_set_boolean(value, element->write_to_screen); break; @@ -2345,6 +2387,16 @@ static void gstlal_transferfunction_class_init(GSTLALTransferFunctionClass *klas 0, G_MAXINT64, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT ); + properties[ARG_PARALLEL_MODE] = g_param_spec_boolean( + "parallel-mode", + "Parallel Mode", + "When set to true, output produced will be independent of start time.\n\t\t\t" + "Transfer function calculations are started and finished on a predetermined\n\t\t\t" + "schedule. This is useful when running jobs in parallel on contiguous sets\n\t\t\t" + "of data.", + FALSE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT + ); properties[ARG_WRITE_TO_SCREEN] = g_param_spec_boolean( "write-to-screen", "Write to Screen", @@ -2508,6 +2560,11 @@ static void gstlal_transferfunction_class_init(GSTLALTransferFunctionClass *klas ARG_UPDATE_DELAY_SAMPLES, properties[ARG_UPDATE_DELAY_SAMPLES] ); + g_object_class_install_property( + gobject_class, + ARG_PARALLEL_MODE, + properties[ARG_PARALLEL_MODE] + ); g_object_class_install_property( gobject_class, ARG_WRITE_TO_SCREEN, diff --git a/gstlal-calibration/gst/lal/gstlal_transferfunction.h b/gstlal-calibration/gst/lal/gstlal_transferfunction.h index 1ecec76b18fb3e3888202c13e5605f73663b8ede..1f80a41a6e9397906e4ca1a76ccfecbb4a93aba7 100644 --- a/gstlal-calibration/gst/lal/gstlal_transferfunction.h +++ b/gstlal-calibration/gst/lal/gstlal_transferfunction.h @@ -154,6 +154,7 @@ struct _GSTLALTransferFunction { gboolean update_after_gap; gint64 use_first_after_gap; gint64 update_delay_samples; + gboolean parallel_mode; gboolean write_to_screen; char *filename; double make_fir_filters; diff --git a/gstlal-calibration/python/calibration_parts.py b/gstlal-calibration/python/calibration_parts.py index 62af24a649f9777c120802b1d192cfdedecae2ae..0def9ba8dcfcda6d6ff30199eec7b2a3c5639f7b 100644 --- a/gstlal-calibration/python/calibration_parts.py +++ b/gstlal-calibration/python/calibration_parts.py @@ -920,7 +920,7 @@ def update_filters(filter_maker, arg, filter_taker, maker_prop_name, taker_prop_ firfilter = filter_maker.get_property(maker_prop_name)[filter_number][::-1] filter_taker.set_property(taker_prop_name, firfilter) -def clean_data(pipeline, signal, signal_rate, witnesses, witness_rate, fft_length, fft_overlap, num_ffts, min_ffts, update_samples, fir_length, frequency_resolution, filter_taper_length, use_median = False, notch_frequencies = [], noisesub_gate_bit = None, delay_time = 0.0, wait_time = 0.0, critical_lock_loss_time = 0, filename = None): +def clean_data(pipeline, signal, signal_rate, witnesses, witness_rate, fft_length, fft_overlap, num_ffts, min_ffts, update_samples, fir_length, frequency_resolution, filter_taper_length, use_median = False, parallel_mode = False, notch_frequencies = [], noisesub_gate_bit = None, delay_time = 0.0, wait_time = 0.0, critical_lock_loss_time = 0, filename = None): # # Use witness channels that monitor the environment to remove environmental noise @@ -942,7 +942,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 noisesub_gate_bit is not None: transfer_functions = mkgate(pipeline, transfer_functions, noisesub_gate_bit, 1) - transfer_functions = pipeparts.mkgeneric(pipeline, transfer_functions, "lal_transferfunction", fft_length = fft_length, fft_overlap = fft_overlap, num_ffts = num_ffts, min_ffts = min_ffts, update_samples = update_samples, make_fir_filters = -1, fir_length = fir_length, frequency_resolution = frequency_resolution, high_pass = 15, update_after_gap = True, use_median = use_median, notch_frequencies = notch_frequencies, use_first_after_gap = critical_lock_loss_time * witness_rate, update_delay_samples = delay_time * witness_rate, filename = filename) + transfer_functions = pipeparts.mkgeneric(pipeline, transfer_functions, "lal_transferfunction", fft_length = fft_length, fft_overlap = fft_overlap, num_ffts = num_ffts, min_ffts = min_ffts, update_samples = update_samples, make_fir_filters = -1, fir_length = fir_length, frequency_resolution = frequency_resolution, high_pass = 15, update_after_gap = True, use_median = use_median, parallel_mode = parallel_mode, notch_frequencies = notch_frequencies, use_first_after_gap = critical_lock_loss_time * witness_rate, update_delay_samples = int(delay_time * witness_rate), filename = filename) signal_minus_noise = [signal_tee] for i in range(0, len(witnesses)): minus_noise = pipeparts.mkgeneric(pipeline, mkqueue(pipeline, witness_tees[i], min_length = wait_time), "lal_tdwhiten", kernel = default_fir_filter, latency = fir_length / 2, taper_length = filter_taper_length) diff --git a/gstlal-calibration/tests/check_calibration/Makefile b/gstlal-calibration/tests/check_calibration/Makefile index 89fb945984c67b3484c5521df697d73c79c107bb..8c38c258657d0029feacc9e953c12d38ca8efb2d 100644 --- a/gstlal-calibration/tests/check_calibration/Makefile +++ b/gstlal-calibration/tests/check_calibration/Makefile @@ -8,21 +8,21 @@ IFO = H # determines where to look for filters files (e.g., O1, O2, O3, ER10, ER13, ER14, PreER10, PreER13, PreER14) OBSRUN = O2 -START = 1186944000 -END = 1186944512 +START = 1185767424 +END = 1185775616 SHMRUNTIME = 400 # How much time does the calibration need to settle at the start and end? -PLOT_WARMUP_TIME = 300 +PLOT_WARMUP_TIME = 3800 PLOT_COOLDOWN_TIME = 64 GDSCONFIGS = ../../config_files/PreER13/H1/C00/H1GDS_FRAMES_1225558818.ini DCSCONFIGS = ../../config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning.ini DCSFCCCONFIGS = ../../config_files/O2/H1/tests/H1DCS_FreqIndepAndFccCorrections_Cleaning.ini GDSTESTCONFIGS = ../../config_files/PreER13/H1/H1GDS_TEST_1225558818.ini -DCSTESTCONFIGS = ../../config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning.ini +DCSTESTCONFIGS = ../../config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning_TEST.ini GDSSHMCONFIGS = ../../config_files/PreER13/H1/tests/H1GDS_1222058826_shm2frames.ini -all: $(IFO)1_hoft_DCS_frames.cache +all: noise_subtraction_ASD_DCS ############################################### ### These commands should change less often ### @@ -98,6 +98,9 @@ GDS_over_C02: $(IFO)1_hoft_GDS_frames.cache $(IFO)1_C02_frames.cache DCS_over_C02: $(IFO)1_hoft_DCS_FCC_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_FCC_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' +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 + noise_subtraction_tf_DCS: $(IFO)1_hoft_DCS_frames.cache python plot_transfer_function.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --numerator-frame-cache $(IFO)1_hoft_DCS_frames.cache --denominator-frame-cache $(IFO)1_hoft_DCS_frames.cache --numerator-channel-name DCS-CALIB_STRAIN_CLEAN --denominator-channel-name DCS-CALIB_STRAIN --magnitude-min 0.0 --magnitude-max 1.5 --phase-min -20.0 --phase-max 20.0 --plot-title 'Noise Subtraction Transfer Function'