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 541c08e2cf0e909aba80ea9e7c090e794544a066..a1416ec3c43bec7623cb8b581c0e78d5fd18f068 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
@@ -96,7 +96,7 @@ ApplyFs: Yes
 # Options related to the coherence gating #
 ###########################################
 UseCoherence: Yes
-CoherenceUncThreshold: 0.004
+CoherenceUncThreshold: 0.01
 # Amount of time used in front-end to compute coherence
 CoherenceTime: 130
 ###################################################################
@@ -201,13 +201,13 @@ PCALChannel: CAL-PCALY_TX_PD_OUT_DQ
 # Calibration Line Frequency Channel Names #
 ############################################
 DARMExcLineFreqChannel: None
-TSTExcLineFreqChannel: SUS-ETMY_L3_CAL_LINE_FREQ
-PUMExcLineFreqChannel: SUS-ETMY_L2_CAL_LINE_FREQ
-UIMExcLineFreqChannel: SUS-ETMY_L1_CAL_LINE_FREQ
+TSTExcLineFreqChannel: None
+PUMExcLineFreqChannel: None
+UIMExcLineFreqChannel: None
 PCALLine1FreqChannel: None
-PCALLine2FreqChannel: CAL-CS_TDEP_CAVITY_POLE_PCAL_FREQ
+PCALLine2FreqChannel: None
 PCALLine3FreqChannel: None
-PCALLine4FreqChannel: CAL-CS_TDEP_D2N_SPRING_PCAL_FREQ
+PCALLine4FreqChannel: None
 #######################################
 # Coherence Uncertainty Channel Names #
 #######################################
@@ -343,17 +343,17 @@ RemovePowerLines: Yes
 # 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
-PowerLinesTFMedianTime: 1
-PowerLinesTFAveragingTime: 128
+PowerLinesTFMedianTime: 128
+PowerLinesTFAveragingTime: 1
 #######################################
 # 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: 509
+NumWitnessFFTs: 2045
 # Sets the minimum number of FFTs necessary to produce the first transfer functions and clean data after data flow starts.
-MinWitnessFFTs: 509
+MinWitnessFFTs: 2045
 # The length in seconds of the filters applied to the witness channels before subtracting from h(t)
 WitnessFIRLength: 0.5;1.6
 # 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.
@@ -375,12 +375,12 @@ 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: 360
+WitnessTFTimeShift: 1887
 ###############################
 # 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
+CleaningCheckRMSTime: 30.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.
diff --git a/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_CleaningLines.ini b/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_CleaningLines.ini
new file mode 100644
index 0000000000000000000000000000000000000000..1e9cb6a47f7a35238f9931897f0ea0ae1cceffba
--- /dev/null
+++ b/gstlal-calibration/config_files/O2/H1/tests/H1DCS_AllCorrections_CleaningLines.ini
@@ -0,0 +1,391 @@
+[InputConfigurations]
+# Track what "version" of config file this is, so that the pipeline knows which options are present in this file
+ConfigVersion: 1
+# 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_v2.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
+# Assumed duration of input frames in seconds
+InputFrameDuration: 64
+############################################
+# If reading from frames use these options #
+############################################
+# None
+
+###################################################
+# If reading from shared memory use these options #
+###################################################
+SHMPartition: LHO_Online
+
+[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
+
+[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
+# Turn this on to compute transfer functions for the filters by comparing output data to input data
+TestFilters: Yes
+
+[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
+
+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.01
+# Amount of time used in front-end to compute coherence
+CoherenceTime: 130
+###################################################################
+# Options related to the computation configurations for the TDCFs #
+###################################################################
+# 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
+# If using X-end Pcal, we need a minus sign, so set this to -1.0
+PcalSign: 1.0
+##################################################
+# 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: 64
+# 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: 64
+# 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 Names #
+#####################################
+InputDQChannel: ODC-MASTER_CHANNEL_OUT_DQ
+ObsIntentChannel: ODC-MASTER_CHANNEL_OUT_DQ
+LowNoiseStateChannel: ODC-MASTER_CHANNEL_OUT_DQ
+HWInjChannel: 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
+############################################
+# Calibration Line Frequency Channel Names #
+############################################
+DARMExcLineFreqChannel: None
+TSTExcLineFreqChannel: None
+PUMExcLineFreqChannel: None
+UIMExcLineFreqChannel: None
+PCALLine1FreqChannel: None
+PCALLine2FreqChannel: None
+PCALLine3FreqChannel: None
+PCALLine4FreqChannel: None
+#######################################
+# 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;ASC-DHARD_P_OUT_DQ,ASC-DHARD_Y_OUT_DQ,ASC-CHARD_P_OUT_DQ,ASC-CHARD_Y_OUT_DQ,LSC-SRCL_IN1_DQ,LSC-MICH_IN1_DQ,LSC-PRCL_IN1_DQ
+# What channel should we use to gate the noise subtraction and 60-Hz line subtraction
+NoiseSubGateChannel: ODC-MASTER_CHANNEL_OUT_DQ
+#GRD-ISC_LOCK_OK
+###############################
+# 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 input DQ channels
+ObsIntentSR: 16384
+LowNoiseSR: 16
+HWInjSR: 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;512
+# Sample rates at which to compute and record TDCFs
+ComputeFactorsSR: 16
+RecordFactorsSR: 16
+
+[Bitmasks]
+LowNoiseBitmask: 4
+ObsIntentBitmask: 2
+CBCHWInjBitmask: 16777216
+BurstHWInjBitmask: 33554432
+DetCharHWInjBitmask: 67108864
+StochHWInjBitmask: 8388608
+NoiseSubGateBitmask: 4
+
+[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: No
+# 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
+PowerLinesTFMedianTime: 128
+PowerLinesTFAveragingTime: 1
+#######################################
+# 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: 2045
+# Sets the minimum number of FFTs necessary to produce the first transfer functions and clean data after data flow starts.
+MinWitnessFFTs: 2045
+# The length in seconds of the filters applied to the witness channels before subtracting from h(t)
+WitnessFIRLength: 0.5;1.6
+# 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: 0.5
+# 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: 12.0,15.0,35.0,38.0,331.0,333.0,495.0,515.0,985.0,1015.0;35.0,38.0
+# Cutoff frequencies for high-pass filters for witness channels
+WitnessHighPasses: 12;10
+# 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: 4
+# 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: 2
+# 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_DCS
+# 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: 1887
+###############################
+# 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: 30.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/tests/check_calibration/ASD_plots b/gstlal-calibration/tests/check_calibration/ASD_plots
index f41fd2ab716b32b809f5d20e2662809da4b7073b..c9983e30edd1286ec6d69c97fca844f087752f45 100755
--- a/gstlal-calibration/tests/check_calibration/ASD_plots
+++ b/gstlal-calibration/tests/check_calibration/ASD_plots
@@ -23,17 +23,17 @@ parser.add_option("--gps-start-time", metavar = "seconds", help = "Set the GPS s
 parser.add_option("--gps-end-time", metavar = "seconds", help = "Set the GPS end time.")
 parser.add_option("--frame-cache-list", metavar = "list", help = "Comma-separated list of frame cache files")
 parser.add_option("--channel-list", metavar = "list", help = "Comma-separated list of channel names for ASD data")
-parser.add_option("--ASD-fmin", metavar = "Hz", type = float, default = 10.0, help = "Minimum frequency for horizontal axis of ASD plot")
-parser.add_option("--ASD-fmax", metavar = "Hz", type = float, default = 8192.0, help = "Maximum frequency for horizontal axis of ASD plot")
-parser.add_option("--ASD-min", metavar = "Hz", type = float, default = 1e-24, help = "Minimum value for vertical axis of ASD plot")
-parser.add_option("--ASD-max", metavar = "Hz", type = float, default = 1e-18, help = "Maximum value for vertical axis of ASD plot")
-parser.add_option("--ratio-fmin", metavar = "Hz", type = float, default = 10.0, help = "Minimum frequency for horizontal axis of ASD ratio plot")
-parser.add_option("--ratio-fmax", metavar = "Hz", type = float, default = 5000.0, help = "Maximum frequency for horizontal axis of ASD ratio plot")
-parser.add_option("--ratio-min", metavar = "Hz", type = float, default = 0.7, help = "Minimum value for vertical axis of ASD ratio plot")
-parser.add_option("--ratio-max", metavar = "Hz", type = float, default = 1.3, help = "Maximum value for vertical axis of ASD ratio plot")
+parser.add_option("--ASD-fmin", metavar = "Hz", type = float, default = 10.0, help = "Minimum frequency for horizontal axis of ASD plot (default = 10)")
+parser.add_option("--ASD-fmax", metavar = "Hz", type = float, default = 8192.0, help = "Maximum frequency for horizontal axis of ASD plot (default = 8192)")
+parser.add_option("--ASD-min", metavar = "Hz", type = float, default = 1e-24, help = "Minimum value for vertical axis of ASD plot (default = 1e-24)")
+parser.add_option("--ASD-max", metavar = "Hz", type = float, default = 1e-18, help = "Maximum value for vertical axis of ASD plot (default = 1e-18)")
+parser.add_option("--ratio-fmin", metavar = "Hz", type = float, default = 10.0, help = "Minimum frequency for horizontal axis of ASD ratio plot (default = 10)")
+parser.add_option("--ratio-fmax", metavar = "Hz", type = float, default = 5000.0, help = "Maximum frequency for horizontal axis of ASD ratio plot (default = 5000)")
+parser.add_option("--ratio-min", metavar = "Hz", type = float, default = 0.7, help = "Minimum value for vertical axis of ASD ratio plot (default = 0.7)")
+parser.add_option("--ratio-max", metavar = "Hz", type = float, default = 1.3, help = "Maximum value for vertical axis of ASD ratio plot (default = 1.3)")
 parser.add_option("--ASD-plot-title", metavar = "name", type = str, default = "", help = "Title of ASD plot, to appear above plot. Default is no title")
 parser.add_option("--ratio-plot-title", metavar = "name", type = str, default = "", help = "Title of ASD ratio plot, to appear above plot. Default is no title")
-parser.add_option("--write-ASD-txt", action="store_true", help = "If set, tst files will be written with the ASDs")
+parser.add_option("--write-ASD-txt", action="store_true", help = "If set, text files will be written with the ASDs")
 parser.add_option("--filename-suffix", metavar = "name", type = str, default = "", help = "Suffix to add to the end of filenames")
 
 options, filenames = parser.parse_args()
diff --git a/gstlal-calibration/tests/check_calibration/Makefile b/gstlal-calibration/tests/check_calibration/Makefile
index a792fc6d27094df9c440191d1bcf54f2e202e3a0..2d3783a476912fc411de213bd834fc4cbf5ae370 100644
--- a/gstlal-calibration/tests/check_calibration/Makefile
+++ b/gstlal-calibration/tests/check_calibration/Makefile
@@ -6,31 +6,31 @@
 # which interferometer (H or L)
 IFO = H
 # determines where to look for filters files (e.g., O1, O2, O3, ER10, ER13, ER14, PreER10, PreER13, PreER14)
-OBSRUN = ER14
+OBSRUN = O2
 
-START = $(shell echo 1234694144 - 715 | bc)
+START = $(shell echo 1186099200 - 2260 | bc)
 #1229094912
 #1225967424
 #1185763328
-END = $(shell echo 1234694144 + 4096 + 715 | bc)
+END = $(shell echo 1186177024 + 2260 | bc)
 #1229099008
 #1225968448
 #1185771520
 SHMRUNTIME = 400
 # How much time does the calibration need to settle at the start and end?
-PLOT_WARMUP_TIME = 715
-PLOT_COOLDOWN_TIME = 715
+PLOT_WARMUP_TIME = 2260
+PLOT_COOLDOWN_TIME = 2260
 
 GDSCONFIGS = Filters/ER14/GDSFilters/H1GDS_noisesub_test_1232874910.ini 
-DCSCONFIGS = Filters/ER13/GDSFilters/L1DCS_TEST_1231620000.ini
+DCSCONFIGS = ../../config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning.ini
+DCSLINESCONFIGS = ../../config_files/O2/H1/tests/H1DCS_AllCorrections_CleaningLines.ini
 #../../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_TEST.ini
 GDSSHMCONFIGS = Filters/ER14/GDSFilters/H1GDS_1234630818_latency_test.ini
 
-all: latency_test
-#noise_subtraction_ASD_GDS noise_subtraction_range_plots_GDS
+all: noise_subtraction_ASD_DCS noise_subtraction_tf_DCS lines_ratio_DCS
 
 ###############################################
 ### These commands should change less often ###
@@ -100,7 +100,7 @@ GDS_pcal2darm_plots: $(IFO)1_easy_raw_frames.cache $(IFO)1_hoft_GDS_frames.cache
 	python pcal2darm_timeseries.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --raw-frame-cache $(IFO)1_easy_raw_frames.cache --gstlal-frame-cache-list $(IFO)1_hoft_GDS_frames.cache --config-file '$(GDSCONFIGS)' --pcal-channel-name CAL-PCALY_TX_PD_OUT_DQ --gstlal-channel-list GDS-CALIB_STRAIN --labels GDS-CALIB_STRAIN
 
 DCS_pcal2darm_plots: (IFO)1_easy_raw_frames.cache $(IFO)1_hoft_DCS_frames.cache $(IFO)1_hoft_DCS_FCC_frames.cache $(IFO)1_hoft_DCS_TEST_frames.cache
-	python pcal2darm_timeseries.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --raw-frame-cache $(IFO)1_easy_raw_frames.cache --gstlal-frame-cache-list $(IFO)1_hoft_DCS_frames.cache,$(IFO)1_hoft_DCS_FCC_frames.cache,$(IFO)1_hoft_DCS_TEST_frames.cache --config-file '$(DCSCONFIGS)' --pcal-channel-name CAL-PCALY_TX_PD_OUT_DQ --gstlal-channel-list DCS-CALIB_STRAIN_CLEAN,DCS-CALIB_STRAIN_CLEAN,DCS-CALIB_STRAIN_CLEAN --labels 'Scalars,Cavity pole,All'
+	python pcal2darm_timeseries.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --raw-frame-cache $(IFO)1_easy_raw_frames.cache --gstlal-frame-cache-list $(IFO)1_hoft_DCS_LINES_frames.cache,$(IFO)1_hoft_DCS_LINES_frames.cache --config-file '$(DCSLINESCONFIGS)' --pcal-channel-name CAL-PCALY_TX_PD_OUT_DQ --gstlal-channel-list DCS-CALIB_STRAIN,DCS-CALIB_STRAIN_CLEAN --labels 'H1:DCS-CALIB_STRAIN,H1:DCS-CALIB_STRAIN_CLEAN'
 
 pcal_DCS_transfer_functions: $(IFO)1_easy_raw_frames.cache $(IFO)1_hoft_DCS_frames.cache $(IFO)1_hoft_DCS_FCC_frames.cache $(IFO)1_hoft_DCS_TEST_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_easy_raw_frames.cache --denominator-channel-name CAL-PCALY_TX_PD_OUT_DQ --denominator-correction y_arm_pcal_corr --numerator-correction arm_length --frequency-max 400 --numerator-frame-cache-list $(IFO)1_hoft_DCS_frames.cache,$(IFO)1_hoft_DCS_FCC_frames.cache,$(IFO)1_hoft_DCS_TEST_frames.cache --numerator-channel-list DCS-CALIB_STRAIN_CLEAN,DCS-CALIB_STRAIN_CLEAN,DCS-CALIB_STRAIN_CLEAN --config-file $(DCSCONFIGS) --use-median --labels 'Only scalar corrections,Cavity pole corrections,All corrections'
@@ -133,7 +133,10 @@ kappastimeseries_GDS: $(IFO)1_hoft_GDS_frames.cache $(IFO)1_easy_raw_frames.cach
 	python timeserieskappas.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --frame-cache $(IFO)1_hoft_GDS_frames.cache --channel-list 'GDS-CALIB_KAPPA_TST_REAL_NOGATE','GDS-CALIB_KAPPA_TST_IMAGINARY_NOGATE','GDS-CALIB_KAPPA_PUM_REAL_NOGATE','GDS-CALIB_KAPPA_PUM_IMAGINARY_NOGATE','GDS-CALIB_KAPPA_UIM_REAL_NOGATE','GDS-CALIB_KAPPA_UIM_IMAGINARY_NOGATE','GDS-CALIB_KAPPA_C_NOGATE','GDS-CALIB_F_CC_NOGATE' --raw-channel-list 'CAL-CS_TDEP_KAPPA_TST_REAL_OUTPUT','CAL-CS_TDEP_KAPPA_TST_IMAG_OUTPUT','CAL-CS_TDEP_KAPPA_PUM_REAL_OUTPUT','CAL-CS_TDEP_KAPPA_PUM_IMAG_OUTPUT','CAL-CS_TDEP_KAPPA_UIM_REAL_OUTPUT','CAL-CS_TDEP_KAPPA_UIM_IMAG_OUTPUT','CAL-CS_TDEP_KAPPA_C_OUTPUT','CAL-CS_TDEP_F_C_OUTPUT' --raw-frame-cache $(IFO)1_easy_raw_frames.cache
 
 noise_subtraction_ASD_DCS: $(IFO)1_hoft_DCS_frames.cache
-	./ASD_comparison_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --raw-frame-cache $(IFO)1_hoft_DCS_frames.cache --calcs-channel-name DCS-CALIB_STRAIN --hoft-frame-cache $(IFO)1_hoft_DCS_frames.cache --hoft-channel-name DCS-CALIB_STRAIN_CLEAN
+	./ASD_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --frame-cache-list '$(IFO)1_hoft_DCS_frames.cache,$(IFO)1_hoft_DCS_frames.cache' --channel-list 'DCS-CALIB_STRAIN,DCS-CALIB_STRAIN_CLEAN' --ASD-plot-fmin 0.3
+
+noise_subtraction_ASD_DCS_LINES: $(IFO)1_hoft_DCS_frames.cache
+	./ASD_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --frame-cache-list '$(IFO)1_hoft_DCS_frames.cache,$(IFO)1_hoft_DCS_frames.cache' --channel-list 'DCS-CALIB_STRAIN,DCS-CALIB_STRAIN_CLEAN' --ASD-plot-fmin 0.3
 
 noise_subtraction_ASD_GDS: $(IFO)1_hoft_GDS_frames.cache
 	./ASD_plots --ifo $(IFO)1 --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --raw-frame-cache $(IFO)1_hoft_GDS_frames.cache --calcs-channel-name GDS-CALIB_STRAIN --hoft-frame-cache $(IFO)1_hoft_GDS_frames.cache --hoft-channel-name GDS-CALIB_STRAIN_CLEAN