Description Super class Public fields Active bindings Methods Examples
Definition for 'LFP' electrodes
Definition for 'LFP' electrodes
ravecore::RAVEAbstarctElectrode
-> LFP_electrode
type
type of electrode
exists
whether electrode exists in subject
h5_fname
'HDF5' file name
fst_fname
'FST' file name
reference_equals_cached
whether referenced data has been cached in 'RAVE' folder
valid
whether current electrode is valid: subject exists and contains current electrode or reference; subject electrode type matches with current electrode type
raw_sample_rate
voltage sample rate
power_sample_rate
power/phase sample rate
preprocess_info
preprocess information
set_reference()
set reference for current electrode
LFP_electrode$set_reference(reference)
reference
either NULL
or LFP_electrode
instance
new()
constructor
LFP_electrode$new(subject, number, is_reference = FALSE)
subject, number, is_reference
see constructor in
RAVEAbstarctElectrode
load_unreferenced_voltage()
load voltage data, un-referenced
LFP_electrode$load_unreferenced_voltage(block, persist = FALSE)
block
experiment block
persist
whether to persist in the instance, default is false, however, if this function will be called multiple times, set it to true.
voltage data before reference
load_unreferenced_power()
load power data, un-referenced
LFP_electrode$load_unreferenced_power(block, persist = FALSE)
block
experiment block
persist
whether to persist in the instance, default is false, however, if this function will be called multiple times, set it to true.
power data before reference
load_unreferenced_phase()
load phase data, un-referenced
LFP_electrode$load_unreferenced_phase(block, persist = FALSE)
block
experiment block
persist
whether to persist in the instance, default is false, however, if this function will be called multiple times, set it to true.
phase data before reference
reference_power()
reference power for given block
LFP_electrode$reference_power(block)
block
character, experiment block
referenced power
reference_phase()
reference phase for given block
LFP_electrode$reference_phase(block)
block
character, experiment block
referenced phase
reference_voltage()
reference voltage for given block
LFP_electrode$reference_voltage(block)
block
character, experiment block
referenced voltage
is_power_cached()
check whether power is cached in run-time set-ups
LFP_electrode$is_power_cached(before_onset, after_onset)
before_onset
seconds before trial onset
after_onset
seconds after trial onset
logical whether power has been cached in a lazyarray
epoch_power()
perform epoch on power with epoch and reference
LFP_electrode$epoch_power(before_onset, after_onset)
before_onset
seconds before trial onset
after_onset
seconds after trial onset
An lazyarray
object that can be subset like normal arrays
clear_cache()
method to clear cache on hard drive
LFP_electrode$clear_cache(...)
...
ignored
clear_memory()
method to clear memory
LFP_electrode$clear_memory(...)
...
ignored
clone()
The objects of this class are cloneable with this method.
LFP_electrode$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ## Not run:
# Download demo subject KC
# Electrode 14
e <- LFP_electrode$new(subject = 'demo/DemoSubject',
number = 14, is_reference = FALSE)
# Reference "ref_13-16,24"
ref <- LFP_electrode$new(subject = 'demo/DemoSubject',
number = "ref_13-16,24", is_reference = TRUE)
# ------ Reference ------
# By default there is no reference
e$reference_name # "noref
# set reference
e$set_reference(reference = ref)
e$reference_name # "ref_13-16,24"
# Set epoch
e$set_epoch(epoch = 'auditory_onset')
# Now epoch power
power <- e$epoch_power(before_onset = 1, after_onset = 2)
# Trial x Frequency x Time x Electrodes
power
# Subset power
subset(power, Time ~ Time < 0, Electrode ~ Electrode == 14)
# clear memory in RAM and cache on hard disk
e$clear_cache()
e$clear_memory()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.