Skip to content

[GUI] Match the time-frequency analysis controls - #994

Merged
arnodelorme merged 3 commits into
developfrom
agent/issue-875-plot-newtimef
Dec 1, 2026
Merged

arnodelorme merged 3 commits into
developfrom
agent/issue-875-plot-newtimef

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Match the time-frequency analysis controls. The continuous window measured 379 px high in MATLAB, 562 px before the fix and 379 px afterward. Stack base is #987.

Continuous

Epoched

Displacement

Event-related spectral power

Across 2 native openings, the largest vertical control offset was 0.52 px (target 1 px). Numerical comparison of event-related spectral power: 4/4 measured cases within tolerance.

EEGLAB 5e0be870, EEGPrep after 302e25e5, clean Linux checkouts. Part of #875.

Fixes #996.

Full inventory report for the project team. pop_newtimef (p. 49). PDF · Editable Word.

@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 52s —— View job


Code review

  • Overall assessment: This change only affects the GUI layout. I found one incorrect sentence in the docs and nothing else.
  • Highest-risk area: The new sentence in docs/source/api/interactive_pop_workflows.rst.
  • Merge recommendation: Needs a small change (one docs sentence).

What I checked:

  • Layout: pop_newtimef_dialog_spec now uses the shared layout="supergui" instead of a fixed size=(1059, 511), the custom 11px stylesheet and row_spacing. The geometry row weights did not change.
  • fit_width=False on the three plot checkboxes: this is correct. In the recorded EEGLAB uilist (tools/gui_geometry/cases/pop_newtimef.json, lines 319–347), the second property of each checkbox is 'value', not 'string'. That means supergui.m does not count their text when sizing the window width, and fit_width=False reproduces that.
  • Import move: parse_key_value_args only moved to its sorted position.
  • Tests: test_gui_geometry.py covers both the epoched and the continuous dialog through the public pop_newtimef(EEG, 1, renderer=...) call, and both cases have MATLAB references recorded with EEGLAB 5e0be870.

Blocking

None.

Important

  • The docs describe the third checkbox wrongly. docs/source/api/interactive_pop_workflows.rst:101 calls it "the optional significance curve". The checkbox is "Plot curve at each frequency", and _run_gui sets plottype='curve' when it is ticked (pop_newtimef.py:204-205). That draws ERSP/ITC as one curve per frequency instead of an image; it has nothing to do with significance, which comes from the separate "Bootstrap significance level" field. Suggested wording: "The ERSP and ITC plots can be turned on or off independently, and Plot curve at each frequency draws them as curves instead of images." The inline comment has a ready-to-commit suggestion.

Nits

None.

Test gaps

None.

EEGLAB parity notes

None. I could not run tests/test_gui_geometry.py here because running commands needed approval this session didn't have, so I reviewed against the recorded MATLAB uilist and the reference JSON instead.


The component activity dialog displays the available index range and puts each multi-line prompt above its answer.

The time-frequency dialog sizes its rows to the displayed options. ERSP, ITC and the optional significance curve can be selected independently.

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.

Important: The third checkbox is not a significance curve. "Plot curve at each frequency" maps to plottype='curve':

options["plotphase"] = "off"
if bool(result.get("plotcurve", False)):
options["plottype"] = "curve"
_add_popup_options(

It draws ERSP/ITC as one curve per frequency instead of an image. Significance is set by the separate "Bootstrap significance level" field, so this sentence will mislead users.

Suggested change
The time-frequency dialog sizes its rows to the displayed options. ERSP, ITC and the optional significance curve can be selected independently.
The time-frequency dialog sizes its rows to the displayed options. The ERSP and ITC plots can be turned on or off independently, and *Plot curve at each frequency* draws them as curves instead of images.

# Conflicts:
#	tools/gui_geometry/matlab/record_geometry.m
@arnodelorme
arnodelorme changed the base branch from agent/issue-875-plot-plotdata to develop December 1, 2026 06:53

@arnodelorme arnodelorme left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This review was written by an AI assistant during a nightly check, not by Arno.

Code review

  • Overall assessment: Looks good.
  • Highest-risk area: None identified.
  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

None.

Test gaps

None.

EEGLAB parity notes

None.

Checked pop_newtimef_dialog_spec against EEGLAB functions/popfunc/pop_newtimef.m and functions/guifunc/supergui.m (switching DialogSpec to layout="supergui", dropping the manual size, row_spacing, and stylesheet overrides, and setting fit_width=False on plotersp, plotitc, and plotcurve whose MATLAB uilist entries list 'value' before 'string', for both channel and component modes), documentation synchronization in docs/source/api/interactive_pop_workflows.rst, geometry recordings in tools/gui_geometry/, and AGENTS.md compliance.

Tests run at 9c15bda4f9712cb84eea8ae9534e60ce36c39dd1: tests/test_gui_geometry.py (153 passed, 72 Linux reference font checks skipped on macOS), tests/test_phase4_timefreq_statistics.py -k "cycle_calculator or pop_newtimef" (8 passed, including QtDialogRenderer build and calcpush callback), tests/test_stream4_signal_processing.py -k "f92 or f126 or pointrange" (5 passed), and ruff check / ruff format --check on src/eegprep/functions/popfunc/pop_newtimef.py and tests/test_gui_geometry.py (passed).

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.

pop_newtimef: Match the time-frequency analysis controls

1 participant