def power_chisq_bins(htilde, num_bins, psd, low_frequency_cutoff=None, high_frequency_cutoff=None): """Returns bins of equal power for use with the chisq functions Parameters ---------- htilde: FrequencySeries A frequency series containing the template waveform num_bins: int The number of chisq bins to calculate. psd: FrequencySeries A frequency series containing the psd. Its length must be commensurate with the template waveform. low_frequency_cutoff: {None, float}, optional The low frequency cutoff to apply high_frequency_cutoff: {None, float}, optional The high frequency cutoff to apply Returns ------- bins: List of ints A list of the edges of the chisq bins is returned. """ sigma_vec = sigmasq_series(htilde, psd, low_frequency_cutoff, high_frequency_cutoff).numpy() kmin, kmax = get_cutoff_indices(low_frequency_cutoff, high_frequency_cutoff, htilde.delta_f, (len(htilde)-1)*2) return power_chisq_bins_from_sigmasq_series(sigma_vec, num_bins, kmin, kmax)
def power_chisq_bins(htilde, num_bins, psd, low_frequency_cutoff=None, high_frequency_cutoff=None): """Returns bins of equal power for use with the chisq functions Parameters ---------- htilde: FrequencySeries A frequency series containing the template waveform num_bins: int The number of chisq bins to calculate. psd: FrequencySeries A frequency series containing the psd. Its length must be commensurate with the template waveform. low_frequency_cutoff: {None, float}, optional The low frequency cutoff to apply high_frequency_cutoff: {None, float}, optional The high frequency cutoff to apply Returns ------- bins: List of ints A list of the edges of the chisq bins is returned. """ sigma_vec = sigmasq_series(htilde, psd, low_frequency_cutoff, high_frequency_cutoff).numpy() kmin, kmax = get_cutoff_indices(low_frequency_cutoff, high_frequency_cutoff, htilde.delta_f, (len(htilde) - 1) * 2) return power_chisq_bins_from_sigmasq_series(sigma_vec, num_bins, kmin, kmax)