Skip to content

[pop_rejtrend] Show the slope unit of the data in the dialog - #1060

Open
arnodelorme wants to merge 2 commits into
developfrom
agent/issue-910-rejtrend-units
Open

arnodelorme wants to merge 2 commits into
developfrom
agent/issue-910-rejtrend-units

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

The linear trend rejection dialog now labels the maximum slope with the unit of the data: uV/epoch for channel data and std. dev./epoch for components. The two units were swapped, as in EEGLAB, which is corrected by sccn/eeglab#1009 (merged on December 1, 2026). Arno chose this on December 1, 2026. No processing changes.

pop_rejtrend on channel data: EEGLAB, EEGPrep on develop, EEGPrep with this pull request

pop_rejtrend on ICA components: EEGLAB, EEGPrep on develop, EEGPrep with this pull request

Drawn on jamming on December 1, 2026 from EEGLAB 5e0be870 (before its fix), EEGPrep develop 068ad174 and this branch at 5636f291. The window width follows the longest text, as in supergui.m, so the two modes exchange their widths (727 and 649 pixels) with their labels. Heights and rows do not change.

Change and tests
  • src/eegprep/functions/popfunc/pop_rejtrend.py: the two labels exchanged. pop_rejmenu already showed the right units.
  • src/eegprep/resources/help/pop_rejtrend.md: the sentence that said the label follows EEGLAB's swapped wording now gives the units shown.
  • tools/gui_geometry/cases and reference: pop_rejtrend: show uV/epoch for channel data, std. dev./epoch for components eeglab#1009 is merged (EEGLAB 3dd650cc), so the two cases of pop_rejtrend are recorded and drawn again from the corrected EEGLAB on jamming. tests/test_gui_geometry.py compares them with no exception.
  • tests/test_stream6_rejection_numbers.py: expects the corrected labels.

Both tests failed before the code change. On the Mac, the two test files give 247 passed and 85 skipped at c8155b64 (the skipped ones need Linux). On GitHub the test jobs fail only on the three tests that already fail on develop (repaired by #1062). ./pre-commit.py passes.

Part of #910

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@claude

claude Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @arnodelorme's task in 54s —— View job


Code review

  • Overall assessment: Looks good. The label swap is correct. is_data = int(bool(icacomp)), so icacomp=1 now shows uV/epoch and components show std. dev./epoch. These are the units pop_rejmenu already uses (pop_rejmenu.py:78, :227), and they match the maxslope units in the help text. No processing code changed. I checked the help resource, the changelog and both test updates. The geometry override only changes control 6 of the two recorded pop_rejtrend cases.
  • Highest-risk area: the help text's statement about EEGLAB's current state.
  • Merge recommendation: Safe to merge after the nit below.

Blocking

None.

Important

None.

Nits

Test gaps

None.

EEGLAB parity notes

  • This is an intentional difference from current EEGLAB, where the label is wrong. It is documented and covered by tests. The test_gui_geometry.py override cites pop_rejtrend: show uV/epoch for channel data, std. dev./epoch for components eeglab#1009 and says when to remove it (when the cases are recorded again). EEGPrep does the correct thing where EEGLAB has a bug, as the repo rules require. Numerical output does not change, so no MATLAB reference run is needed.

Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behavior tests, and CLAUDE.md/AGENTS.md compliance.

--- · Branch: agent/issue-910-rejtrend-units

The dialog label follows EEGLAB's wording, which swaps the two
(`std. dev./epoch` for channel data and `uV/epoch` for components).
The dialog label shows `uV/epoch` for channel data and `std. dev./epoch` for
components. EEGLAB showed the two labels swapped before its fix of December 2026.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: sccn/eeglab#1009 is still open and unmerged, so EEGLAB has not fixed this yet. Released EEGLAB still shows the swapped labels, which makes this packaged help sentence untrue for users today. The changelog's "the same fix is proposed" is accurate. Make this sentence match it, and update the help once #1009 merges.

Suggested change
components. EEGLAB showed the two labels swapped before its fix of December 2026.
components. EEGLAB's dialog shows the two labels swapped; a fix is proposed upstream.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant