From ee7a028cf74679a3ae23a19cd13c0ccb1ffa16ee Mon Sep 17 00:00:00 2001 From: Aaron Viets <aaron.viets@ligo.org> Date: Tue, 19 Feb 2019 11:07:51 -0600 Subject: [PATCH] lal_transferfunction: Use isnormal(cabs()) instead of isnormal(creal()) to check data. --- gstlal-calibration/gst/lal/gstlal_transferfunction.c | 6 +++--- gstlal-calibration/tests/check_calibration/Makefile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gstlal-calibration/gst/lal/gstlal_transferfunction.c b/gstlal-calibration/gst/lal/gstlal_transferfunction.c index bf6ee0c5f3..40cd293c21 100644 --- a/gstlal-calibration/gst/lal/gstlal_transferfunction.c +++ b/gstlal-calibration/gst/lal/gstlal_transferfunction.c @@ -450,7 +450,7 @@ static gboolean update_transfer_functions_ ## DTYPE(complex DTYPE *autocorrelati /* Now copy the result into transfer_functions */ \ for(j = 0; j < num_tfs; j++) { \ gslz = gsl_vector_complex_get(transfer_functions_solved_at_f, j); \ - if(isnormal(GSL_REAL(gslz)) || GSL_REAL(gslz) == 0.0) \ + if(isnormal((GSL_REAL(gslz) + GSL_IMAG(gslz))) || GSL_REAL(gslz) + GSL_IMAG(gslz) == 0.0) \ transfer_functions[j * fd_tf_length + i] = GSL_REAL(gslz) + I * GSL_IMAG(gslz); \ else { \ success = FALSE; \ @@ -571,7 +571,7 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen \ /* Check the FFTs to see if their values will produce usable transfer functions */ \ for(j = 0; j < fd_fft_length * element->channels; j++) \ - success &= isnormal(creal ## F_OR_BLANK(element->workspace.w ## S_OR_D ## pf.ffts[j])); \ + success &= isnormal(cabs ## F_OR_BLANK(element->workspace.w ## S_OR_D ## pf.ffts[j])); \ \ if(success && element->use_median) { \ /* @@ -695,7 +695,7 @@ static gboolean find_transfer_functions_ ## DTYPE(GSTLALTransferFunction *elemen \ /* Check the FFTs to see if their values will produce usable transfer functions */ \ for(j = 0; j < fd_fft_length * element->channels; j++) \ - success &= isnormal(creal ## F_OR_BLANK(element->workspace.w ## S_OR_D ## pf.ffts[j])); \ + success &= isnormal(cabs ## F_OR_BLANK(element->workspace.w ## S_OR_D ## pf.ffts[j])); \ \ if(success && element->use_median) { \ /* diff --git a/gstlal-calibration/tests/check_calibration/Makefile b/gstlal-calibration/tests/check_calibration/Makefile index 655fa48569..3a852a938e 100644 --- a/gstlal-calibration/tests/check_calibration/Makefile +++ b/gstlal-calibration/tests/check_calibration/Makefile @@ -21,7 +21,7 @@ SHMRUNTIME = 400 PLOT_WARMUP_TIME = 200 PLOT_COOLDOWN_TIME = 200 -GDSCONFIGS = Filters/ER14/GDSFilters/L1GDS_1234630818.ini +GDSCONFIGS = Filters/ER14/GDSFilters/L1GDS_1234630818_test.ini DCSCONFIGS = Filters/ER13/GDSFilters/L1DCS_TEST_1231620000.ini #../../config_files/O2/H1/tests/H1DCS_AllCorrections_Cleaning.ini DCSFCCCONFIGS = ../../config_files/O2/H1/tests/H1DCS_FreqIndepAndFccCorrections_Cleaning.ini -- GitLab