def new_snr_chisq(snr, new_snr, chisq_dof, chisq_index=4.0, chisq_nhigh=3.0):
    """Returns the chi-square value needed to weight SNR into new SNR"""
    chisqnorm = (snr / new_snr) ** chisq_index
    if chisqnorm <= 1:
        return 1e-20
    return chisq_dof * (2 * chisqnorm - 1) ** (chisq_nhigh / chisq_index)
