Skip to content

Commit 49914d3

Browse files
committed
clean up
1 parent 9c0ff61 commit 49914d3

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

eegnb/experiments/BlockExperiment.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515

1616
class BlockExperiment(BaseExperiment, ABC):
1717
"""
18-
Extended experiment class that inherits from BaseExperiment to provide block-based functionality.
18+
Inherits from BaseExperiment to provide block-based functionality.
1919
20-
This class is designed for experiments that need to run multiple blocks, with each block
21-
having its own instructions and duration. It loads stimulus only once and reuses it across blocks.
20+
This class is designed for experiments that need to run as multiple blocks.
21+
Each block has its own instructions and duration. It loads all stimuli at once, then re/uses it across blocks.
2222
"""
2323

2424
def __init__(self, exp_name, block_duration, eeg, save_fn, block_trial_size, n_blocks, iti: float, soa: float, jitter: float,
2525
use_vr=False, use_fullscr=True, stereoscopic=False):
26-
""" Initializer for the Block Experiment Class
26+
""" Initializer for the BlockExperiment Class
2727
2828
Args:
2929
exp_name (str): Name of the experiment
@@ -41,11 +41,11 @@ def __init__(self, exp_name, block_duration, eeg, save_fn, block_trial_size, n_b
4141
# Calculate total trials for the base class
4242
total_trials = block_trial_size * n_blocks
4343

44-
# Initialize the base experiment with total trials
44+
# Initialize BaseExperiment with total trials
4545
# Pass None for duration if block_duration is None to ignore time spent in instructions
4646
super().__init__(exp_name, block_duration, eeg, save_fn, total_trials, iti, soa, jitter, use_vr, use_fullscr, stereoscopic)
4747

48-
# Store block-specific parameters
48+
# Block-specific parameters
4949
self.block_duration = block_duration
5050
self.block_trial_size = block_trial_size
5151
self.n_blocks = n_blocks

eegnb/experiments/visual_vep/pattern_reversal_vep.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ def create_vr_checkerboard(intensity_checks):
6969

7070
def load_stimulus(self) -> Dict[str, Any]:
7171
# Frame rate, in Hz
72-
# GetActualFrameRate() crashes in psychxr due to 'EndFrame called before BeginFrame'
72+
# TODO: Fix - Rift.GetActualFrameRate() crashes in psychxr due to 'EndFrame called before BeginFrame'
7373
actual_frame_rate = np.round(self.window.displayRefreshRate if self.use_vr else self.window.getActualFrameRate())
74+
7475
# Ensure the expected frame rate matches and is divisable by the stimulus rate(soa)
7576
assert actual_frame_rate % self.soa == 0, f"Expected frame rate divisable by stimulus rate: {self.soa}, but got {actual_frame_rate} Hz"
7677
assert self.display_refresh_rate == actual_frame_rate, f"Expected frame rate {self.display_refresh_rate} Hz, but got {actual_frame_rate} Hz"

0 commit comments

Comments
 (0)