bids-standard / stats-models

BIDS Stats Models Specification
https://bids-standard.github.io/stats-models
Other
2 stars 9 forks source link

should "extra properties" be allowed or shoud we at least throw a warning? #69

Closed Remi-Gau closed 2 years ago

Remi-Gau commented 2 years ago

discovered with @fcerpe through a typo.

If Contrasts are defined in the Model object by mistake (see below), the validator is completely fine with this.

I don't think we want to make the model so strict as to forbid extra properties in a given object, but maybe they should throw a warning.

Opinions wanted.

{
  "Name": "my_first_model",
  "BIDSModelVersion": "1.0.0",
  "Description": "My first BIDS model: a simple 2-condition contrast.",
  "Input": {
    "task": ["stroop"]
  },
  "Nodes": [
    {
      "Level": "Run",
      "Name": "run",
      "GroupBy": ["run", "subject"],
      "Model": {
        "X": ["congruent", "incongruent", "nuissance1", "nuissance2", 1],
        "Type": "glm",
      "Contrasts": [   <--- this should be out of the Model
        {
          "Name": "incongruent_vs_congruent",
          "ConditionList": ["incongruent", "congruent"],
          "Weights": [1, -1],
          "Test": "t"
        }
      ]
      }
    }
  ]
}
effigies commented 2 years ago

I think we should forbid extra properties in all models.