Skip to content

Commit

Permalink
remove curser when experiment runs
Browse files Browse the repository at this point in the history
  • Loading branch information
henneysq committed Mar 18, 2024
1 parent b2aef43 commit b995195
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions experiment_management/experiment_manager_va.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def execute_current_trial(
# Check that all dependencies are available
# at runtime
self._check_dependencies_ready()
self.window.mouseVisible = False

# Check which input parameters where given,
# and set None values to defaults
Expand Down Expand Up @@ -205,6 +206,7 @@ def execute_current_trial(

# Display rest period fixation mark
self.fixation_mark.draw()
self.window.mouseVisible = False
self.window.flip()
self.trigger.send_trigger(self.trigger_map["rest"])
self.core.wait(rest_duration)
Expand All @@ -220,13 +222,15 @@ def execute_current_trial(
# Give lateral attention cue
msg = self.text_stim(self.window, text=ATT_SIDE_INSTRUCTION_MAP[grating_side], height=100)
msg.draw()
self.window.mouseVisible = False
self.window.flip()
self.trigger.send_trigger(self.trigger_map["lateral-cue"])
self.core.wait(instruction_duration)

# Show fixation grating
self.fixation_grating.ori = evas.GRATING_ORIENTATION_MAP[grating_side]
self.fixation_grating.draw()
self.window.mouseVisible = False
self.window.flip()
self.trigger.send_trigger(self.trigger_map["fixation-grating"])
# Set the duration of the fixation; varys depending on
Expand All @@ -249,6 +253,7 @@ def execute_current_trial(
self.detection_grating.ori = detection_grating_orientation
self.detection_grating.draw()
self.fixation_grating.draw()
self.window.mouseVisible = False
self.window.flip()
self.trigger.send_trigger(self.trigger_map["driscrimination-grating"])

Expand Down
4 changes: 4 additions & 0 deletions experiment_management/experiment_manager_wm.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def execute_current_trial(

# Fixation point
self.fixation_mark.draw()
self.window.mouseVisible = False
self.window.flip()
self.trigger.send_trigger(self.trigger_map["rest"])
self.core.wait(wm_task_duration)
Expand All @@ -209,12 +210,14 @@ def execute_current_trial(
height=100,
)
msg.draw()
self.window.mouseVisible = False
self.window.flip()
self.trigger.send_trigger(self.trigger_map["sum"])
self.core.wait(wm_task_duration)

# Fixation point
self.fixation_mark.draw()
self.window.mouseVisible = False
self.window.flip()
self.trigger.send_trigger(self.trigger_map["fixation-wait"])
self.core.wait(random.uniform(*fixation_duration_range))
Expand All @@ -224,6 +227,7 @@ def execute_current_trial(
msg = self.text_stim(self.window, text=f"{presented_sum}", height=100)
msg.draw()
self.trigger.send_trigger(self.trigger_map["result"])
self.window.mouseVisible = False
self.window.flip()

# Read the response and reaction time
Expand Down

0 comments on commit b995195

Please sign in to comment.