Skip to content

BayesWavePost function `median_and_CIs` and `median_and_CIs_fourierdom` print percentiles that are swapped

The BayesWave post functions median_and_CIs and median_and_CIs_fourierdom have variables for upper and lower confidence interval bounds which are assigned according to gsl_stats_quantile_from_sorted_data function. They seem to be getting assigned the opposite values i.e. the upper variables are assigned the lower quantile. For example, line 1671 reads

        upper90 = gsl_stats_quantile_from_sorted_data (dataslice,
                                                      1, Nwaveforms,
                                                      0.05);

It seems that the blocks of code (https://git.ligo.org/lscsoft/bayeswave/blob/master/src/BayesWavePost.c#L1671-1682) and (https://git.ligo.org/lscsoft/bayeswave/blob/master/src/BayesWavePost.c#L1725-1754) need fixing.