MultiTaskBattery 1.4.0__tar.gz → 1.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/__init__.py +1 -1
  2. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/experiment_block.py +23 -32
  3. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery.egg-info/PKG-INFO +1 -1
  4. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/PKG-INFO +1 -1
  5. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/tests/test_tasks.py +2 -3
  6. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/LICENSE +0 -0
  7. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/battery.py +0 -0
  8. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/fetch.py +0 -0
  9. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/screen.py +0 -0
  10. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/task_blocks.py +0 -0
  11. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/task_details.json +0 -0
  12. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/task_file.py +0 -0
  13. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/task_table.tsv +0 -0
  14. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/ttl_clock.py +0 -0
  15. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery/utils.py +0 -0
  16. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery.egg-info/SOURCES.txt +0 -0
  17. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery.egg-info/dependency_links.txt +0 -0
  18. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery.egg-info/entry_points.txt +0 -0
  19. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery.egg-info/requires.txt +0 -0
  20. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/MultiTaskBattery.egg-info/top_level.txt +0 -0
  21. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/README.md +0 -0
  22. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/pyproject.toml +0 -0
  23. {multitaskbattery-1.4.0 → multitaskbattery-1.4.2}/setup.cfg +0 -0
@@ -1,4 +1,4 @@
1
1
  """MultiTaskBattery: a toolbox for running multi-domain cognitive and motor
2
2
  tasks during fMRI sessions, built on PsychoPy."""
3
3
 
4
- __version__ = "1.4.0"
4
+ __version__ = "1.4.2"
@@ -82,8 +82,8 @@ class Experiment:
82
82
  folder as it is. One row for each instruction period ('instruction') and one for each
83
83
  task period (trial_type = task name, plus the condition when the block has one).
84
84
  Onsets are seconds since the first scanner trigger. Only for runs that waited for the
85
- trigger; turn off with write_events = False in constants.py."""
86
- if not getattr(self.const, 'write_events', True) or getattr(self, 'scan_num', None) is None:
85
+ trigger; turn on with write_events = True in constants.py (off by default)."""
86
+ if not getattr(self.const, 'write_events', False) or getattr(self, 'scan_num', None) is None:
87
87
  return
88
88
  if not self.run_data_file.exists():
89
89
  return
@@ -174,37 +174,28 @@ class Experiment:
174
174
 
175
175
  Args:
176
176
  """
177
- if not self.const.debug:
178
- # Step 1: Create a temporary small window for user feedback
179
- self.screen.start_screen(height=getattr(self.const, 'instruction_text_height', None),
180
- wrap_width=getattr(self.const, 'instruction_wrap_width', None))
181
-
182
- # a dialog box pops up so you can enter info
183
- #Set up input box
184
- inputDlg = gui.Dlg(title = f"{self.exp_name}")
185
- inputDlg.addField('Enter Subject id (str):',initial = self.subj_id) # run number (int)
186
- inputDlg.addField('Enter Run Number (int):',initial = self.run_number+1) # run number (int)
187
- inputDlg.addField('Wait for TTL pulse?', initial = True) # a checkbox for ttl pulse (set it true for scanning)
188
-
189
- inputDlg.show()
190
-
191
- if inputDlg.OK:
192
- self.subj_id = str(inputDlg.data[0])
193
- self.run_number = int(inputDlg.data[1])
194
- # the run file always follows the run number (run 3 -> run_03.tsv); a repeated
195
- # run is kept apart by its attempt number
196
- self.run_filename = self.const.default_run_filename.format(f'{self.run_number:02d}')
197
- self.wait_ttl = bool(inputDlg.data[2])
198
- else:
199
- sys.exit()
200
-
177
+ # Step 1: Create a temporary small window for user feedback
178
+ self.screen.start_screen(height=getattr(self.const, 'instruction_text_height', None),
179
+ wrap_width=getattr(self.const, 'instruction_wrap_width', None))
180
+
181
+ # a dialog box pops up so you can enter info
182
+ #Set up input box
183
+ inputDlg = gui.Dlg(title = f"{self.exp_name}")
184
+ inputDlg.addField('Enter Subject id (str):',initial = self.subj_id) # run number (int)
185
+ inputDlg.addField('Enter Run Number (int):',initial = self.run_number+1) # run number (int)
186
+ inputDlg.addField('Wait for TTL pulse?', initial = True) # a checkbox for ttl pulse (set it true for scanning)
187
+
188
+ inputDlg.show()
189
+
190
+ if inputDlg.OK:
191
+ self.subj_id = str(inputDlg.data[0])
192
+ self.run_number = int(inputDlg.data[1])
193
+ # the run file always follows the run number (run 3 -> run_03.tsv); a repeated
194
+ # run is kept apart by its attempt number
195
+ self.run_filename = self.const.default_run_filename.format(f'{self.run_number:02d}')
196
+ self.wait_ttl = bool(inputDlg.data[2])
201
197
  else:
202
- print("running in debug mode")
203
- # pass on the values for your debugging with the following keywords
204
- self.subj_id = 'test00'
205
- self.run_number = self.run_number+1
206
- self.run_filename = 'run_01.tsv'
207
- self.wait_ttl = True
198
+ sys.exit()
208
199
 
209
200
  def init_run(self):
210
201
  """initializing the run:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MultiTaskBattery
3
- Version: 1.4.0
3
+ Version: 1.4.2
4
4
  Summary: A flexible Python toolbox for running multi-domain cognitive and motor tasks during fMRI sessions, built on PsychoPy.
5
5
  Author: Diedrichsenlab
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MultiTaskBattery
3
- Version: 1.4.0
3
+ Version: 1.4.2
4
4
  Summary: A flexible Python toolbox for running multi-domain cognitive and motor tasks during fMRI sessions, built on PsychoPy.
5
5
  Author: Diedrichsenlab
6
6
  License-Expression: MIT
@@ -20,7 +20,7 @@ def const(tmp_path_factory):
20
20
  return types.SimpleNamespace(
21
21
  exp_name='smoke', exp_dir=d, task_dir=d / 'task_files', run_dir=d / 'run_files',
22
22
  data_dir=d / 'data', stim_dir=ut._PACKAGE_STIM_DIR, default_run_filename='run_01.tsv',
23
- response_keys=['a', 's', 'd', 'f'], eye_tracker=False, debug=True, show_scoreboard=False,
23
+ response_keys=['a', 's', 'd', 'f'], eye_tracker=False, show_scoreboard=False, write_events=True,
24
24
  screen={'size': [800, 600], 'fullscr': False, 'number': 0, 'width': 53, 'distance': 57})
25
25
 
26
26
 
@@ -49,8 +49,7 @@ def test_task(name, const, screen):
49
49
  tf.make_run_file([name], [f'{name}.tsv'], instruction_dur=1, task_dur=dur,
50
50
  shuffle=False).to_csv(const.run_dir / 'run_01.tsv', sep='\t', index=False)
51
51
  e = exp_block.Experiment(const, subj_id=name, screen=screen)
52
- e.confirm_run_info()
53
- e.subj_id, e.wait_ttl = name, False
52
+ e.run_number, e.run_filename, e.wait_ttl = 1, 'run_01.tsv', False # what the run dialog sets
54
53
  e.init_run()
55
54
  e.run()
56
55