utils.threshold_rv#

Back to Module page

Summary#

Signature#

def threshold_rv(dist, nsamp, *dist_args, nfire = params.NPERFILE, onesided = True)
Input variables#

Name

Type

Default

Description

dist

Distribution in scipy.stats

nsamp

Number of samples

\*dist_args

Extra arguments for distribution

nfire

params.NPERFILE

Number of times noise should cross the threshold in samples

onesided

True

False if we want lower threshold too

Output variables#

Return annotation

Docstring type

Description

None

Threshold for random variable that is exceeded nfire times in nsamp samples on average (upper and lower thresholds if onesided=False)

Docstring#

:param dist: Distribution in scipy.stats
:param nsamp: Number of samples
:param dist_args: Extra arguments for distribution
:param nfire: Number of times noise should cross the threshold in samples
:param onesided: False if we want lower threshold too
:return: Threshold for random variable that is exceeded nfire times in
         nsamp samples on average (upper and lower thresholds if
         onesided=False)