Skip to content

Port pop_studydesign New variable for continuous trial factors - #448

Merged
suraj-ranganath merged 4 commits into
developfrom
cursor/pop-studydesign-new-variable-c400
Oct 12, 2026
Merged

suraj-ranganath merged 4 commits into
developfrom
cursor/pop-studydesign-new-variable-c400

Conversation

@suraj-ranganath

@suraj-ranganath suraj-ranganath commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

The STUDY design editor now runs the controls that are visible in the current EEGLAB pop_studydesign dialog. OK writes changed designs through std_makedesign, selects the highlighted design, and resaves when the STUDY already has a file name. The MATLAB reference GUI run still has to be done before merging. GitHub Actions replays the dialog command history in EEGLAB through the matlab-batch engine and compares STUDY.design for New, Rename, Delete, a combined categorical value, a continuous variable, and an empty design.

Audit of pop_studydesign.m controls and callbacks:

Control EEGLAB source Status
Include these subjects (edit, setsubj) pop_studydesign.m setsubj working
... subject button (selectsubj, pop_chansel) pop_studydesign.m selectsubj working
Design list (selectdesign then updategui) pop_studydesign.m; selectdesign has no switch case and falls through to updategui working
Design New (add) copies the current design, clears variable and limo, names it Design N working
Design Rename inputdlg2 working
Design Delete blocks design 1 with "The first STUDY design cannot be removed, only modified" working
Variable New (newvar, pop_addindepvar) appends categorical or continuous factors, including rt working
Variable Edit (editvar) reopens Add variable for the selected factor working
Variable Delete (delvar) removes the selected factor working
List factors (list, std_addvarlevel, pop_listfactors, std_limodesign) shows 1st-level and 2nd-level lines working
Combine selected values pop_addindepvar combinevals working
Paired statistics checkboxes commented out of the current uilist; pairing is assigned in std_makedesign absent from the current EEGLAB dialog, so not shown
Delete all pre-computed datafiles commented out of the current uilist absent from the current EEGLAB dialog, so not shown
Plot commented out of the current uilist; plotdmat callback remains absent from the current EEGLAB dialog, so not shown
Data-trial selection and design folder callbacks exist, but edit_selectdattrials and edit_storedir are not in the current uilist absent from the current EEGLAB dialog, so not shown
Re-save STUDY file (chk_save) pop_savestudy savemode resave when STUDY.filename is set working
Web help EEGLAB opens the STUDY design wiki working as packaged pop_studydesign help, not the old wiki URL
OK delete trimmed designs, std_makedesign each changed design, std_selectdesign, optional resave working
Cancel returns the STUDY unchanged working

std_makedesign accepts variable1 through variable4. The dialog no longer refuses a fifth variable. OK keeps the first four, which is what EEGLAB persists. An empty design records variable1='none' and variable2='none' with defaultdesign='off'. EEGLAB's recorded command omits those labels, and running that command later restores the default condition variable. Design removal is recorded as executable Python, del STUDY['design'][index], and the MATLAB comparison evals EEGLAB's STUDY.design(index) = [].

Fixes #442

Open in Web Open in Cursor 

The design editor New button opens Add variable, including a continuous factor such as rt, and OK updates STUDY.design and trialinfo.

Co-authored-by: Suraj Ranganath <[email protected]>
@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

cursoragent and others added 3 commits October 12, 2026 17:58
OK now updates every changed design through std_makedesign, including rename, delete, subject selection, edit, list factors, and resave.

Co-authored-by: Suraj Ranganath <[email protected]>
Empty designs record variable1 and variable2 as none so replaying the
history does not restore condition, and pairing follows the same trial
and dataset rules as std_getindvar.

Co-authored-by: Suraj Ranganath <[email protected]>
A 1xN STUDY.design array arrives as a nested list. Trial-factor pairing
stays on the subject-overlap rule the existing helpers already check.

Co-authored-by: Suraj Ranganath <[email protected]>
@suraj-ranganath
suraj-ranganath marked this pull request as ready for review October 12, 2026 23:07

@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.

@suraj-ranganath
suraj-ranganath merged commit 386c819 into develop Oct 12, 2026
9 of 10 checks passed
@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

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_studydesign: implement the "New variable" button (STUDY design GUI gap)

2 participants