htbGetRas | R Documentation |
Creates htbRas object from htbDb objects.
htbGetRas(
db_data,
db_event,
alignment,
incld = NULL,
excld = NULL,
cond = all,
ch = NULL,
event = NULL,
title = NULL
)
db_data |
An |
db_event |
An |
alignment |
A named list.
Each element of the list must be a vector of length two,
that designate the range of the extracted data
around the time of aligning event in standard xlim style in R,
i.e., |
incld |
A named list.
The task event(s) needed to exist within an arbitrary range
from the aligning event (designated by |
excld |
A named list.
Same to |
cond |
A function.
Conditional function (either |
ch |
Integer(s). The channel(s) of |
event |
Strings.
The names of task events you want to include in returning |
title |
Strings.
The titles for the extraction whose length
equals to that of |
In order to assess the function of recorded neural activity, you need to examine the relationship between neuron's firing and other experimental factors such as task events. For example, some neurons may be activated at the time of visual cue presentation, while others may fire when the response is made. For this analysis, your first step will be aligning the neural activity by the occurrence of a given task event. In other words, you need to collect the activity of the neuron around the onset of the targeted task event for multiple times, then you can create a rastergram or histogram for visually assess the event-related activity of the neuron.
htbGetRas()
performs this data alignment process
for a given htbDb
object.
A pair of htbDb objects with spike
and event
types
are used to create an aligned activity
packed into a dedicated list variable called htbRas
object.
You can also use an htbDb
object of analog
type
when you want to align continuous data
(e.g., local field potential, electromyography, eye trajectory)
instead of intermittent spike timing data.
In either case, the spike/analog
database and event
database
must have been recorded in the same session
with completely identical storing configuration.
Otherwise, resulting alignment of the data does not make sense
since htbGetRas()
has no capability in detecting
temporal offset or mismatch between provided databases.
An htbRas
object.
alignment <- list(CUEON_L = c(-1500, 2000), CUEON_R = c(-1500, 2000))
incld <- list(TRIALSTART = c(-2000, 0), TRIALEND = c(0, 2000))
excld <- list(ERROR = c(0, 2000))
## Not run:
db_sp <- htbGetDb("spike.htb")
db_ev <- htbGetDb("event.htb")
ras <- htbGetRas(db_sp, db_ev, alignment,
incld = incld, excld = excld)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.