Skip to content

Commit

Permalink
lines-too-long
Browse files Browse the repository at this point in the history
  • Loading branch information
GarethCabournDavies committed Mar 11, 2024
1 parent 0443301 commit 9c9bbee
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions pycbc/events/ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def effsnr(snr, reduced_x2, fac=250.,
**kwargs): # pylint:disable=unused-argument
**kwargs): # pylint:disable=unused-argument
"""Calculate the effective SNR statistic. See (S5y1 paper) for definition.
"""
snr = numpy.array(snr, ndmin=1, dtype=numpy.float64)
Expand All @@ -20,7 +20,7 @@ def effsnr(snr, reduced_x2, fac=250.,


def newsnr(snr, reduced_x2, q=6., n=2.,
**kwargs): # pylint:disable=unused-argument
**kwargs): # pylint:disable=unused-argument
"""Calculate the re-weighted SNR statistic ('newSNR') from given SNR and
reduced chi-squared values. See http://arxiv.org/abs/1208.3491 for
definition. Previous implementation in glue/ligolw/lsctables.py
Expand All @@ -40,7 +40,7 @@ def newsnr(snr, reduced_x2, q=6., n=2.,


def newsnr_sgveto(snr, brchisq, sgchisq,
**kwargs): # pylint:disable=unused-argument
**kwargs): # pylint:disable=unused-argument
""" Combined SNR derived from NewSNR and Sine-Gaussian Chisq"""
nsnr = numpy.array(
newsnr(
Expand All @@ -61,7 +61,8 @@ def newsnr_sgveto(snr, brchisq, sgchisq,


def newsnr_sgveto_psdvar(snr, brchisq, sgchisq, psd_var_val,
min_expected_psdvar=0.65, **kwargs): # pylint:disable=unused-argument
min_expected_psdvar=0.65,
**kwargs): # pylint:disable=unused-argument
""" Combined SNR derived from SNR, reduced Allen chisq, sine-Gaussian chisq and
PSD variation statistic"""
# If PSD var is lower than the 'minimum usually expected value' stop this
Expand All @@ -86,9 +87,10 @@ def newsnr_sgveto_psdvar(snr, brchisq, sgchisq, psd_var_val,


def newsnr_sgveto_psdvar_threshold(snr, brchisq, sgchisq, psd_var_val,
min_expected_psdvar=0.65, brchisq_threshold=10.0,
psd_var_val_threshold=10.0,
**kwargs): # pylint:disable=unused-argument
min_expected_psdvar=0.65,
brchisq_threshold=10.0,
psd_var_val_threshold=10.0,
**kwargs): # pylint:disable=unused-argument
""" newsnr_sgveto_psdvar with thresholds applied.
This is the newsnr_sgveto_psdvar statistic with additional options
Expand All @@ -114,8 +116,8 @@ def newsnr_sgveto_psdvar_threshold(snr, brchisq, sgchisq, psd_var_val,


def newsnr_sgveto_psdvar_scaled(snr, brchisq, sgchisq, psd_var_val,
scaling=0.33, min_expected_psdvar=0.65,
**kwargs): # pylint:disable=unused-argument
scaling=0.33, min_expected_psdvar=0.65,
**kwargs): # pylint:disable=unused-argument
""" Combined SNR derived from NewSNR, Sine-Gaussian Chisq and scaled PSD
variation statistic. """
nsnr = numpy.array(
Expand All @@ -139,7 +141,8 @@ def newsnr_sgveto_psdvar_scaled(snr, brchisq, sgchisq, psd_var_val,


def newsnr_sgveto_psdvar_scaled_threshold(snr, bchisq, sgchisq, psd_var_val,
threshold=2.0, **kwargs): # pylint:disable=unused-argument
threshold=2.0,
**kwargs): # pylint:disable=unused-argument
""" Combined SNR derived from NewSNR and Sine-Gaussian Chisq, and
scaled psd variation.
"""
Expand Down Expand Up @@ -346,8 +349,8 @@ def get_newsnr_sgveto_psdvar_scaled_threshold(trigs,
'newsnr_sgveto_psdvar': get_newsnr_sgveto_psdvar,
'newsnr_sgveto_psdvar_threshold': get_newsnr_sgveto_psdvar_threshold,
'newsnr_sgveto_psdvar_scaled': get_newsnr_sgveto_psdvar_scaled,
'newsnr_sgveto_psdvar_scaled_threshold': \
get_newsnr_sgveto_psdvar_scaled_threshold,
'newsnr_sgveto_psdvar_scaled_threshold':
get_newsnr_sgveto_psdvar_scaled_threshold,
}

# Lists of datasets required in the trigs object for each function
Expand Down

0 comments on commit 9c9bbee

Please sign in to comment.