pyavs.get_meg_timestamp¶
- pyavs.get_meg_timestamp(meg_events: ndarray, trial: int, block: int, block_trigger_offset: int = 1000, verbose: bool = False, optimized_timing: bool = True, use_block_trigger: bool = False) float | None[source]¶
Returns the timestamp of the scene onset in the MEG data.
- Parameters:
meg_events (numpy.ndarray) – Events structure of the MEG data
trial (int) – Trial number
block (int) – Block number (across all sessions)
block_trigger_offset (int, optional) – Offset of the block trigger in the MEG data as used in repair_events function (default: 1000)
verbose (bool, optional) – If True prints some information (default: False)
optimized_timing (bool, optional) – If True the function will return the timestamp of the scene onset not based on the trial number trigger but the interpolation between the block and the trial number trigger timestamp. (This aligns better with the actual scene onset, as measured by the photodiode) (default: True)
use_block_trigger (bool, optional) – If True the function will use the block trigger to find the scene onset. If False it will use the trial number trigger. This does not work with “optimized timing” (default: False)
- Returns:
Timestamp of the scene onset in the MEG data
- Return type:
float or None