Skip to content

Add a half-count tie test for 2-D _trimmed_channel_scores #570

Closed

Description

@suraj-ranganath

Follow-up from Stream 6 (#551, PR #559, F67/F86).

_trimmed_channel_scores rounds the trim count with round_mat (round half away from zero). The 3-D epoch-row trim already has a test for this, test_jointprob_trim_rounds_a_half_count_away_from_zero. The 2-D column trim has none.

Done when there's a unit test for the 2-D path at half counts, for example n=5 dropping 1 and n=15 dropping 2, and its expected values are confirmed against EEGLAB's pop_rejchan trimming.

Activity

  1. claude commented on Nov 7, 2026

    @claude
    Contributor

    🤖 Plan:

    • Confirm expected trim against EEGLAB rejkurt.m (minind = max(round(n*0.1),1), maxind = round(n-round(n*0.1))): n=5 keeps sorted 1:4, n=15 keeps 2:13, n=25 keeps 3:22
    • Add parametrized test for 2-D _trimmed_channel_scores via _normalize_scores(..., signal_ndim=2) in tests/test_rejection_workflows.py
    • Check that it fails with Python round: n=5 and n=25 fail (n=15 rounds to 2 under both rules)
    • pre-commit, pytest (24 passed), opened [Tests] Add half-count tie test for 2-D trimmed channel scores #571
    • CI
  2. arnodelorme commented on Dec 1, 2026

    @arnodelorme
    Collaborator

    🤖 The pop_rejchan dialog and native jamming captures are tracked in #932.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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