You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[GUI] Match the tf_cycle_calc dialog to EEGLAB #928
TF cycle calc now opens when the parent time-frequency field is empty, a scalar, a frequency list or a range. Clicking OK returns the selected frequencies and calculated cycles to the parent. The calculator uses the four native rows. The largest vertical error is 0.54 px. This stacks on #927.
All seven wavelet width units were compared on jamming using equivalent MATLAB and Python values, scalar and vector widths, and logarithmic spacing. The maximum difference across all eight output columns, divided by max(1, |MATLAB value|), was 0 (tolerance 1e-12).
Inputs and checks
The two failed baseline calls left the parent open, as shown. The focused tests drive the real child through submission and read the parent fields. Geometry and time-frequency suites reported 158 passed, 8 MATLAB Engine skips, 4 deselected. The independent seven-unit numerical run used MATLAB R2025b on jamming.
Verification and history
Compare the two native windows on jamming, including input, submission and output. Record both checkout SHAs and verify the active Python import path. Part of #875. Follow-up to #146, Follow-up: time-warped newtimef marker and cycle GUI workflows.
Layout and window height: needs the MATLAB visual-parity loop (not available in this runner)
Research
_run_tf_cycle_calc passes the raw freqs edit text to tf_cycle_calc_dialog_spec. _format_vector then calls np.asarray(text, dtype=float), which raises on "" and "8 16" (could not convert string to float). A scalar such as "10" happens to parse, so only that case opens the dialog. EEGLAB comcalc uses str2num, then tf_cycle_calc(freqs, freqs) always shows the GUI because width is empty.
Make _format_vector parse with parse_numeric_sequence, which accepts blank text, vectors and a:b:c ranges (done in #933, Part of #928). The layout and height mismatch has no visual-parity case yet. It needs a MATLAB capture against the EEGLAB uigeom = {[3 2 1] x4} dialog, so this issue stays open after #933.
Activity
claude commentedon Dec 1, 2026
🤖 Plan:
_format_vector, open a PR (crash only): [GUI] Fix tf_cycle_calc dialog crash on blank or vector frequencies #933. Unit tests, lint, docs and review pass. The Pyodide/ICLabel job was still running at last check.Research
_run_tf_cycle_calcpasses the rawfreqsedit text totf_cycle_calc_dialog_spec._format_vectorthen callsnp.asarray(text, dtype=float), which raises on""and"8 16"(could not convert string to float). A scalar such as"10"happens to parse, so only that case opens the dialog. EEGLABcomcalcusesstr2num, thentf_cycle_calc(freqs, freqs)always shows the GUI becausewidthis empty.Relevant code:
qt.py#L779- passes raw edit texttf_cycle_calc_dialog.py#L61-L67-np.asarrayon a stringvalue_parsing.py#L56- existing EEGLAB-style vector parserProposed Fix
Make
_format_vectorparse withparse_numeric_sequence, which accepts blank text, vectors anda:b:cranges (done in #933,Part of #928). The layout and height mismatch has no visual-parity case yet. It needs a MATLAB capture against the EEGLABuigeom = {[3 2 1] x4}dialog, so this issue stays open after #933.