Skip to content

[ENH] Set dual amp thresholds with other thresholds #142

@ryanhammonds

Description

@ryanhammonds

Currently, amp_threshes=(1, 2) kwarg must be passed to the burst_kwargs argument in order for it to be passed to ndsp's detect_bursts_dual_threshold. Currently, this is how amp_threshes must be set:

amp_thresholds = (1, 2)

burst_thresholds = {
   'burst_fraction': 0.5
}

bm = Bycycle(
   burst_method='amp',
   thresholds=burst_thresholds,
   burst_kwargs={'amp_threshes': amp_thresholds}
)

Instead of passing the amp_thresholds with burst_kwargs, it would make sense allow these to be set from the thresholds kwarg. Something like below, should be equivalent to above:

burst_thresholds = {
    'burst_fraction': 0.5,
    'amp_enter': 1.,
    'amp_exit': 2.
}

bm = Bycycle(
    burst_method='amp',
    thresholds=burst_thresholds
)

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