Skip to content

[GUI] Show exact dataset time limits in the spectrum dialog - #1010

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

arnodelorme merged 2 commits into
developfrom
agent/issue-875-plot-spectopo

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Show exact dataset time limits in the spectrum dialog. The continuous window measured 221 px high in MATLAB, 329 px before the fix and 221 px afterward. Stack base is #1006.

Continuous

Epoched

Displacement

Log power spectrum

Across 2 native openings, the largest vertical control offset was 0.62 px (target 1 px). Numerical comparison of log power spectrum: 1/1 measured cases within tolerance.

Full recording, component spectrum at 10 Hz: Output dimensions differ: (32, 65) and (2, 65)

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

Fixes #1011.

Full inventory report for the project team. pop_spectopo (p. 40). 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: No problems found in the changed code. This PR changes only the dialog spec: the time-range formatting, the default options text and the layout mode. The spectrum output does not change.
  • Highest-risk area: the components dialog (dataflag=0). It moved from a fixed (937, 476) size to layout="supergui", and no geometry case covers it.
  • Merge recommendation: Safe to merge once the stack base [GUI] Match the ERP image form and its default time limits #1006 lands.

Blocking

None.

Important

None.

Nits

None.

Test gaps

  • Components dialog layout (pop_spectopo(EEG, 0)) is not covered. size=(937, 476) was removed for both dialogs (src/eegprep/functions/popfunc/pop_spectopo.py:232). The new cases in tools/gui_geometry/cases/ and record_geometry.m only exercise pop_spectopo(EEG, 1) and pop_spectopo(EEGcont, 1). The components dialog has 9 rows, one of them long ("Electrode number to analyze ([]=elec with max power; 0=whole scalp):"), and its size is now set only by supergui sizing. Nothing checks it against MATLAB. Suggested fix: add a pop_spectopo.components row (@() pop_spectopo(EEG, 0)) to record_geometry.m, add the matching case/reference JSON, and add a PUBLIC_CALLS entry calling pop_spectopo(eeg, 0, renderer=renderer) in tests/test_gui_geometry.py. This can be a follow-up if the components dialog is planned for a later PR in Dialog geometry test suite on Linux: ten dialogs drawn from the same geometry in EEGLAB and EEGPrep, supergui reworked to match MATLAB #875.

EEGLAB parity notes

  • dialog_time_range formats with _matlab_num2str, which matches EEGLAB's [num2str(EEG.xmin*1000) ' ' num2str(EEG.xmax*1000)]. Values like -1000 1996.0938 now show at full precision, where :g cut them to 6 significant digits. Other modules (vararg2str, pop_chanedit, pop_eegthresh) already import _matlab_num2str the same way.
  • The new default 'electrodes','off' matches EEGLAB's text. parse_plot_options_text (plot_utils.py:287) already accepts the 'key', value pair form, so pressing OK on the defaults still yields {"electrodes": "off"}. Nothing that consumes the options needs to change.
  • The PR body reports an unexplained mismatch: "Full recording, component spectrum at 10 Hz: Output dimensions differ: (32, 65) and (2, 65)". This PR doesn't touch spectopo or plot_component_spectra, so the mismatch already exists and isn't a regression. It does mean the component-spectrum path disagrees with EEGLAB in output shape: 32 rows in one implementation, 2 in the other. Please open a tracking issue under Dialog geometry test suite on Linux: ten dialogs drawn from the same geometry in EEGLAB and EEGPrep, supergui reworked to match MATLAB #875 so it doesn't get lost, and say which side produced which shape.

I couldn't run tests/test_gui_geometry.py -k spectopo locally because this job's sandbox blocked it, so please rely on CI for the geometry and existing spectopo tests.

@arnodelorme
arnodelorme changed the base branch from agent/issue-875-plot-erpimage to develop December 1, 2026 07:09
@arnodelorme
arnodelorme merged commit f894ad4 into develop Dec 1, 2026
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_spectopo: Show exact dataset time limits in the spectrum dialog

1 participant