Skip to content

Bug in example code on the docs page #941

@juliadeneva

Description

@juliadeneva

Description of the Issue

In the Thresholding section in the online docs there is this example code:

ntrial = (frequencies[-1] - frequencies[0]) / df_min
z_detlev = z2_n_detection_level(n=1, epsilon=0.001, ntrial=len(freq))
ef_detlev = fold_detection_level(nbin, epsilon=0.001, ntrial=len(freq))

The last argument to both of the detection_level functions should be ntrial=ntrial as that is the number of trial frequencies without oversampling. (The text above that code says, "The ntrial parameter should be set to an estimate of the statistically independent frequencies in the periodogram.")

In the example, len(freq) is the number of trial frequencies with oversampling.

Suggestions regarding the Issue

No response

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions