Skip to content

Commit 5c74efe

Browse files
committed
documentation cleanup
1 parent fa7391c commit 5c74efe

16 files changed

+105
-348
lines changed

β€ŽMultiTaskBattery/task_blocks.pyβ€Ž

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -991,95 +991,6 @@ def run_trial(self, trial):
991991
self.display_trial_feedback(trial['display_trial_feedback'], trial['correct']== 1)
992992

993993
return trial
994-
995-
class Sencoding(Task):
996-
def __init__(self, info, screen, ttl_clock, const, subj_id):
997-
super().__init__(info, screen, ttl_clock, const, subj_id)
998-
999-
def display_instructions(self):
1000-
self.instruction_text = f'{self.descriptive_name} Task \n\nListen to the following sentences attentively.'
1001-
instr_visual = visual.TextStim(self.window, text=self.instruction_text, height=self.const.instruction_text_height, color=[-1, -1, -1])
1002-
instr_visual.draw()
1003-
self.window.flip()
1004-
1005-
def run_trial(self, trial):
1006-
""" Run a single trial of the task. """
1007-
1008-
self.screen.fixation_cross()
1009-
1010-
# Load and play audio stimulus for the current trial
1011-
audio_path = self.const.stim_dir / self.name / trial['stim']
1012-
audio_stim = sound.Sound(str(audio_path))
1013-
audio_stim.play()
1014-
1015-
# wait for trial duration
1016-
self.ttl_clock.wait_until(self.ttl_clock.get_time() + trial['trial_dur'])
1017-
1018-
# display trial feedback
1019-
self.display_trial_feedback(give_feedback= trial['display_trial_feedback'], correct_response = None)
1020-
1021-
return trial
1022-
1023-
class SencodingProbe(Task):
1024-
def __init__(self, info, screen, ttl_clock, const, subj_id):
1025-
super().__init__(info, screen, ttl_clock, const, subj_id)
1026-
self.feedback_type = 'acc+rt'
1027-
1028-
def init_task(self):
1029-
"""
1030-
Initialize task - default is to read the target information into the trial_info dataframe
1031-
"""
1032-
self.trial_info = pd.read_csv(self.const.task_dir / self.name / self.task_file, sep='\t')
1033-
self.corr_key = [self.trial_info['first_key'].iloc[0],self.trial_info['second_key'].iloc[0]]
1034-
1035-
1036-
def display_instructions(self):
1037-
"""
1038-
displays the instruction for the task
1039-
"""
1040-
str1 = f"You will read sentences and decide which completion is closer to a sentence you heard in the last run"
1041-
self.instruction_text = f"{self.descriptive_name} Task\n\n {str1}"
1042-
instr_visual = visual.TextStim(self.window, text=self.instruction_text, height=self.const.instruction_text_height, color=[-1, -1, -1])
1043-
instr_visual.draw()
1044-
self.window.flip()
1045-
1046-
def run_trial(self, trial):
1047-
""" Runs a single trial of the Theory of Mind task """
1048-
1049-
event.clearEvents()
1050-
1051-
# Display story
1052-
str1 = trial['stem']
1053-
str2 = trial['option_1']
1054-
str3 = trial['option_2']
1055-
1056-
story_stim = visual.TextStim(self.window, text=f'Stem:{str1} \n\n A: {str2} \n B:{str3}', alignHoriz='center', wrapWidth=25, pos=(0.0, 0.0), color=(-1, -1, -1), units='deg', height= 1.25)
1057-
story_stim.draw()
1058-
self.window.flip()
1059-
1060-
# wait until story duration
1061-
# self.ttl_clock.wait_until(self.ttl_clock.get_time() + trial['trial_dur'] + trial['iti_dur'])
1062-
1063-
1064-
# collect responses 0: no response 1-4: key pressed
1065-
trial['response'],trial['rt'] = self.wait_response(self.ttl_clock.get_time(), trial['trial_dur'])
1066-
1067-
if trial['answer'] == trial['option_1']:
1068-
trial['trial_type'] = 0
1069-
elif trial['answer'] == trial['option_2']:
1070-
trial['trial_type'] = 1
1071-
else:
1072-
print('answer doesnt match either option check if there is lagging space')
1073-
1074-
trial['correct'] = (trial['response'] == self.corr_key[trial['trial_type']])
1075-
1076-
# display trial feedback
1077-
self.display_trial_feedback(trial['display_trial_feedback'], trial['correct'])
1078-
1079-
# Flush any keys in buffer
1080-
event.clearEvents()
1081-
1082-
return trial
1083994

1084995
class FlexionExtension(Task):
1085996
"""

β€ŽMultiTaskBattery/task_table.tsvβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ oddball OddBall oddball odbal "Functional specificity for high-level linguistic
1515
demand_grid DemandGrid grid dmgrd
1616
finger_sequence FingerSequence finger_sequence fingseq
1717
flexion_extension FlexionExtension toe flexexten alternating periods of flexing/extending toes
18-
sencoding Sencoding sentence sencod
19-
sencoding_probe SencodingProbe sentence_probe sencodeprob
2018
semantic_prediction SemanticPrediction complete sempred "sentence presented, participants decide if last word makes sense."
2119
visual_search VisualSearch search visrchsml "geometric shapes presented on screen, participants must identify if 'L' is present."
2220
rmet RMET eyes rmet "pictures of faces with different emotions presented (eyes only) along with four attribute words, participants must identify which attribute describes person best." "Kim, H.A. et al. (2024) β€˜Multiracial Reading the Mind in the Eyes Test (MRMET): An inclusive version of an influential measure’, Behavior Research Methods. Revised from Baron-Cohen, Wheelwright, Hill, Raste, & Plumb, 2001" "age, emotion"

β€ŽREADME.mdβ€Ž

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
1-
Multi Task Battery
1+
# 🧠 Multi Task Battery (MTB)
22
============
33

4+
A flexible Python toolbox for running multi-domain cognitive and motor tasks during fMRI sessions β€” all within a single scanning run. Built on [PsychoPy](https://www.psychopy.org/)
5+
6+
47
This project runs multi-task batteries developed by the diedrichsenlab.
58
#### Authors: Diedrichsenlab (Bassel Arafat, Ince Husain, Caroline Nettekoven, Ladan Shahshahani, Suzanne Witt, Maedbh King, Jorn Diedrichsen)
69

710

8-
Full documentation can be found at: https://multitaskbattery.readthedocs.io/
911

12+
## πŸ““ Documentation
13+
14+
Full documentation is hosted at:
15+
πŸ“˜ https://multitaskbattery.readthedocs.io/
16+
17+
Covers:
18+
- Installation and setup
19+
- Task and run configuration
20+
- Data output and extensions
21+
22+
---
23+
24+
## πŸ“„ License
25+
26+
MIT License Β© 2024 Joern Diedrichsen
27+
28+
---
29+
30+
## πŸ€› Contributing
31+
32+
Open to issues and pull requests. If you use MTB in your research, we'd love to hear from you.
33+
34+
---
35+
36+
## 🧠 Citation
37+
38+
_A publication describing MTB is forthcoming._ Please cite this GitHub repository and relevant task sources.

β€Ždeprecated/example_experiment_demo.rstβ€Ž

Lines changed: 0 additions & 29 deletions
This file was deleted.

β€Ždeprecated/old_task_table.csvβ€Ž

Lines changed: 0 additions & 25 deletions
This file was deleted.

β€Ždeprecated/psychopy-env.ymlβ€Ž

Lines changed: 0 additions & 14 deletions
This file was deleted.

β€Ždeprecated/pyproject.tomlβ€Ž

Lines changed: 0 additions & 3 deletions
This file was deleted.

β€Ždeprecated/quickstart.pyβ€Ž

Lines changed: 0 additions & 48 deletions
This file was deleted.

β€Ždeprecated/setup.pyβ€Ž

Lines changed: 0 additions & 18 deletions
This file was deleted.

β€Ždeprecated/task notes.mdβ€Ž

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
Β (0)