Skip to content

Commit bb9c418

Browse files
correct emotion contrasts
1 parent 49883f3 commit bb9c418

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

core/task_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ def get_task_contrasts(self, name: str):
55
return self.get_auditory_contrasts()
66
if name.lower() == "motor":
77
return self.get_motor_contrasts()
8+
if name.lower() == "emotion":
9+
return self.get_emotion_contrasts()
10+
print(f"Task [{name.lower()}] contrasts are not implemented.")
811

912
def get_auditory_contrasts(self):
1013
return [
@@ -19,3 +22,8 @@ def get_motor_contrasts(self):
1922
# ('tongue', 'T', ['t'], [1]),
2023
('right_hand', 'T', ['rh'], [1])
2124
]
25+
26+
def get_emotion_contrasts(self):
27+
return [
28+
('fear > neutral', 'T', ['fear', 'neut'], [1, -1])
29+
]

core/workflow_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def build_subject_workflow(self, config: dict, subjects: list, data_descriptor:
143143
nodes['sub_level_contrasts'], SPM.EstimateContrast.Input.spm_mat_file)
144144
workflow.connect(nodes['sub_level_model'], SPM.EstimateModel.Output.beta_images,
145145
nodes['sub_level_contrasts'], SPM.EstimateContrast.Input.beta_images)
146-
workflow.connect(nodes['sub_level_model'], SPM.EstimateModel.Output.residual_image,
146+
workflow.connect(func2bidsnodes['sub_level_model'], SPM.EstimateModel.Output.residual_image,
147147
nodes['sub_level_contrasts'], SPM.EstimateContrast.Input.residual_image)
148148

149149
output = self.get_subject_output(output_path)

0 commit comments

Comments
 (0)