Skip to content
Snippets Groups Projects
Commit 13c1eb07 authored by Aaron Viets's avatar Aaron Viets
Browse files

lal_smoothkappas: fix array indexing

parent 33caab30
No related branches found
No related tags found
No related merge requests found
Pipeline #705829 passed
......@@ -182,7 +182,7 @@ static void get_new_median(double new_element, double *fifo_array, double *curre
num_samples = (no_default && samples_in_filter < array_size) ? samples_in_filter : array_size;
j_start = (array_is_imaginary ? *index_im : *index_re) + array_size - num_samples - future_unused;
for(j = j_start; j < j_start + num_samples; j++) {
jj = j % array_size;
jj = (j + array_size) % array_size;
if(fifo_array[jj] < *current_median) {
number_less++;
if(fifo_array[jj] >= less) {
......@@ -190,8 +190,7 @@ static void get_new_median(double new_element, double *fifo_array, double *curre
less = fifo_array[jj];
} else if(fifo_array[jj] > Less)
Less = fifo_array[jj];
}
else if(fifo_array[jj] == *current_median)
} else if(fifo_array[jj] == *current_median)
number_equal++;
else if(fifo_array[jj] > *current_median) {
number_greater++;
......@@ -200,8 +199,7 @@ static void get_new_median(double new_element, double *fifo_array, double *curre
greater = fifo_array[jj];
} else if(fifo_array[jj] < Greater)
Greater = fifo_array[jj];
}
else
} else
g_assert_not_reached();
}
g_assert_cmpint(number_less + number_equal + number_greater, ==, num_samples);
......
......@@ -10,7 +10,7 @@ OBSRUN = O3
# Determines whether to find calibration filters in the old SVN or the git repo. Starting with PreER15 and O4, we switched to the git repo. Set to 'svn' or 'git'.
FILTERSRC = svn
START = $(shell echo 1409576018 | bc)
START = $(shell echo 1410804916 | bc)
# 1409576018 or 1410782418 gstlal-calibration-1.5.8 linesub issue
# 1399057926 line sub not working
# 1371862818 oversubtraction study
......@@ -21,7 +21,7 @@ START = $(shell echo 1409576018 | bc)
# 1238288418
# 1269090018
# 1269114645-21449
END = $(shell echo 1409604100 | bc)
END = $(shell echo 1410835618 | bc)
# 1409604100 or 1410839118 gstlal-calibration-1.5.8 linesub issue
# 1399086062 line sub not working
# 1371911734 oversubtraction study
......@@ -47,7 +47,8 @@ DCSAPPROXKAPPASCONFIGS = Filters/O3/GDSFilters/H1DCS_test_1256655618_v2_approxKa
#Filters/O3/GDSFilters/H1DCS_20230407_testing_ApproxKappas.ini
DCSEXACTKAPPASCONFIGS = Filters/O3/GDSFilters/H1DCS_test_1256655618_v2_exactKappas.ini
#Filters/O3/GDSFilters/H1DCS_20230407_testing_ExactKappas.ini
DCSCONFIGS = Filters/O3/GDSFilters/H1DCS_1362848367_PreO4test.ini
DCSCONFIGS = Filters/O3/GDSFilters/gstlal_compute_strain_C00_unified_offlineTest_H1.ini
#Filters/O3/GDSFilters/H1DCS_1362848367_PreO4test.ini
DCSALLCORRCONFIGS = Filters/O3/GDSFilters/H1DCS_lowFreqComb_1260652938_AllCorr.ini
DCSALLCORREXACTCONFIGS = Filters/O3/GDSFilters/H1DCS_lowFreqComb_1260652938_AllCorrExact.ini
DCS_TDCF_UNCERTAINTY_CONFIGS = Filters/O3/GDSFilters/H1DCS_1256655618_v2_tdcf_unc.ini
......@@ -84,7 +85,7 @@ GDSSHMCONFIGS = Filters/O3/GDSFilters/H1GDS_1258216456_testing.ini
GDSOLDCONFIGS = Filters/ER14/GDSFilters/L1GDS_1235491416_old.ini
EASYRAWFILTERS = H1DCS_20230407_testing.npz
all: noise_subtraction_spectrogram_GDS
all: noise_subtraction_spectrogram_DCS
# state_vector_plot
# DARM_over_ASC_callines
# TDCFs_pcal2darm_plots
......@@ -425,6 +426,9 @@ noise_subtraction_ASD_GDS: $(IFO)1_hoft_GDS_frames.cache $(IFO)1_hoft_GDS_frames
noise_subtraction_spectrogram_GDS: $(IFO)1_hoft_GDS_frames.cache
python3 plot_spectrogram.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --frame-cache $(IFO)1_hoft_GDS_frames.cache --channel-name GDS-CALIB_STRAIN_NOLINES --sample-rate 16384 --window=3 --frequency-min 10 --frequency-max=1000 --amplitude-min 0.01 --amplitude-max 100
noise_subtraction_spectrogram_DCS: $(IFO)1_hoft_DCS_frames.cache
python3 plot_spectrogram.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --frame-cache $(IFO)1_hoft_DCS_frames.cache --channel-name DCS-CALIB_STRAIN_NOLINES --sample-rate 16384 --window=3 --frequency-min 10 --frequency-max=1000 --amplitude-min 0.01 --amplitude-max 100
noise_subtraction_ASD_GDS1: $(IFO)1_hoft_GDS_frames.cache $(IFO)1_hoft_GDS_frames_shortTF.cache $(IFO)1_hoft_GDS_frames_longTF.cache
python3 plot_ASD.py --gps-start-time $(PLOT_START) --gps-end-time $(PLOT_END) --ifo $(IFO)1 --frame-cache-list $(IFO)1_hoft_GDS_frames.cache,$(IFO)1_hoft_GDS_frames_shortTF.cache,$(IFO)1_hoft_GDS_frames_longTF.cache,$(IFO)1_hoft_GDS_frames.cache --channel-list GDS-CALIB_STRAIN,GDS-CALIB_STRAIN_NOLINES,GDS-CALIB_STRAIN_NOLINES,GDS-CALIB_STRAIN_NOLINES --sample-rate 16384 --fft-time 4096 --fft-spacing 2048 --freq-res 0.001 --frequency-min 410.27 --frequency-max=410.33 --ASD-max=1e-19 --labels 'strain,128s\ estimate,4096s\ estimate,switch'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment