View source: R/physio_functions.R
augment_ttl_details | R Documentation |
This functions helps to identify the key time markers when TTL codes onset, which is hard to detect using the raw vector alone (since the code will have some duration)
augment_ttl_details(
ep.physio,
lazy_ttl = 2,
zero_code = 0,
code_labels_df = NULL
)
lazy_ttl |
a non-negative integer indicating the lowest number of samples that could reflect a genuine change in a TTL code. Default: 2 |
zero_code |
what code reflects that all pins are off (no active code). If you have a stuck
parallel port pin, set |
ttl_vec |
a vector of integer TTL codes reconstructed from the acq file |
The parallel port cannot truly change all 8 pins simultaneously for a new code. If the speed of the pins changing falls on a sampling boundary on the BIOPAC hardware, this can lead to false codes for very brief periods of time (~2ms). Thus, identify rapid code changes, then interrogate around these, replacing the dubious code with the code that 'sticks' subsequently. This decision means that if any pin has changed, then the experiment has executed a new TTL code.
For example, at 1000Hz, @lazy_ttl
= 2 would flag any codes with duration of 2ms or less as
suspicious and would replace these with the longer, genuine code that immediately follows.
Michael Hallquist
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.