Closed effigies closed 5 years ago
The entities should be {'task': 'bart'}
.
Thanks, investigating now....
Same thing is happening at the dataset level for:
{
"Name": "ds000117_face",
"Description": "Example three-level model",
"Input": {
"task": "facerecognition"
},
"Steps": [
{
"Level": "run",
"Transformations": [
{
"Name": "Factor",
"Input": ["stim_type"]
},
{
"Name": "Or",
"Input": ["stim_type.FAMOUS", "stim_type.UNFAMILIAR"],
"Output": ["real_faces"]
}
],
"Model": {
"X": [
"real_faces",
"stim_type.SCRAMBLED",
"framewise_displacement",
"trans_x", "trans_y", "trans_z", "rot_x", "rot_y", "rot_z"
]
},
"Contrasts": [
{
"Name": "face_vs_scram",
"ConditionList": ["real_faces", "stim_type.SCRAMBLED"],
"Weights": [1, -1],
"Type": "t"
}
]
},
{
"Level": "Subject",
"AutoContrasts": ["face_vs_scram"]
},
{
"Level": "Dataset",
"AutoContrasts": ["face_vs_scram"]
}
]
}
Yeah, I just got the point where I can replicate the problem (had to download ds30 and remove all the derivative references). Working on a diagnosis now.
Ah, okay. I'm pretty sure the problem is that currently, the .entities
property for a BIDSVariableCollection
only includes entities that are constant across all rows and variables (since otherwise they're not really entities of the collection, but of its constituents). But when the covariates are automatically read in from participants.tsv
, they get assigned a NaN
value for the task
entity, which results in task
being stripped from the entities
dictionary.
Working on a solution now; I need to decide whether to ignore NaN
values when making the determination, or come up with some other scheme. Let me know if you have thoughts.
And this only happens at the top level? Because the task entity is present in the lower levels.
I'm guessing that's because at the lower level no confounds are read in that can't be clearly tied to the same task, so there aren't NaN
values, hence all task
values are the same.
Ah, okay, looks like an easy fix. I was already actually trying to ignore NaN
values; I just wasn't doing it properly. PR coming shortly, hopefully.
Feel free to merge as soon as tests pass.
For model:
The following:
Results in: