From 028521842ffba777f3ed33106755f1bbe0d3e24a Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 17 May 2026 17:16:20 +0000 Subject: [PATCH] V_delta: relax mustBeScalar/mustNotHaveNaN flags to match v1 corpus shapes Two flags surfaced by closing the divergence between the Python simulator (which previously skipped mustBeScalar / mustNotHaveNaN) and did-matlab's V_delta validator (which enforces both). - stimulus_presentation.stimuli: mustBeScalar true -> false. v1 ships this as either a scalar struct (one stimulus configuration) or a struct array (e.g. a 225-element array for a Hartley basis). Across the 6 v1 corpora, 2462 docs ship the array form. The scalar-only declaration was incorrect. - stimulus_tuningcurve.stimulus_presentation_number: mustNotHaveNaN true -> false. v1 uses NaN as the missing-trial sentinel in this (N_trials x N_stimuli) index matrix. Soph has 60 such docs. Documentation now states that explicitly. Verification: Python simulator (now also enforcing mustBeScalar + mustNotHaveNaN, mirroring cache.m) reports 0 quarantines across all 6 v1 corpora (PRED 14, 20211116 1220, B 12917, Dab 27561, JH 78688, Soph 101427 = 221827 docs total). pytest 96/96. --- schemas/V_delta/stable/stimulus_presentation.json | 4 ++-- schemas/V_delta/stable/stimulus_tuningcurve.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/schemas/V_delta/stable/stimulus_presentation.json b/schemas/V_delta/stable/stimulus_presentation.json index 1dde021..f4e84e5 100644 --- a/schemas/V_delta/stable/stimulus_presentation.json +++ b/schemas/V_delta/stable/stimulus_presentation.json @@ -51,11 +51,11 @@ "parameters": {} }, "mustBeNonEmpty": false, - "mustBeScalar": true, + "mustBeScalar": false, "mustNotHaveNaN": false, "queryable": false, "ontology": null, - "documentation": "Stimulus configuration captured at presentation time. The sole sub-field that all v1 corpora ship is `parameters`, an open-shape struct whose keys depend on the stimulus type (Hartley basis, sparse-noise grid, oriented gratings, etc.) and on the generating library version. V_delta does not constrain inner field names because each stimulus type contributes its own; the validator only verifies that `stimuli` is itself a struct. Consumers that need to interpret specific parameter values should branch on the stimulus class context (e.g., the linked `app.app_name`) before reading.", + "documentation": "Stimulus configuration(s) captured at presentation time. v1 ships this as either a scalar struct (one stimulus configuration) or a struct array (one entry per presented stimulus, e.g., a 225-element array for a Hartley basis). The sole sub-field that all v1 corpora ship is `parameters`, an open-shape struct whose keys depend on the stimulus type (Hartley basis, sparse-noise grid, oriented gratings, etc.) and on the generating library version. V_delta does not constrain inner field names because each stimulus type contributes its own; the validator only verifies that `stimuli` is itself a struct (or struct array). Consumers that need to interpret specific parameter values should branch on the stimulus class context (e.g., the linked `app.app_name`) before reading.", "constraints": {}, "fields": [ { diff --git a/schemas/V_delta/stable/stimulus_tuningcurve.json b/schemas/V_delta/stable/stimulus_tuningcurve.json index 0910d69..281e9ff 100644 --- a/schemas/V_delta/stable/stimulus_tuningcurve.json +++ b/schemas/V_delta/stable/stimulus_tuningcurve.json @@ -154,10 +154,10 @@ "default_value": [], "mustBeNonEmpty": false, "mustBeScalar": false, - "mustNotHaveNaN": true, + "mustNotHaveNaN": false, "queryable": false, "ontology": null, - "documentation": "Per-trial, per-stimulus index of the original stimulus presentation. Shape (N_trials x N_stimuli). Lets callers map an individual_responses_real[t,s] back to the original stimulus_presentation document.", + "documentation": "Per-trial, per-stimulus index of the original stimulus presentation. Shape (N_trials x N_stimuli). Lets callers map an individual_responses_real[t,s] back to the original stimulus_presentation document. Cells may be NaN where the corresponding trial slot held no presentation (v1 corpora use NaN as the missing-trial sentinel).", "constraints": { "element_type": "integer" }