R6 class definition
list of electrode type, number, etc.
NULL when no channel is composed.
When flat is TRUE, a data frame of weights with
the columns composing electrode channel numbers, composed channel
number, and corresponding weights; if flat is FALSE,
then a weight matrix;
ravepipeline::RAVESerializable -> RAVEPreprocessSettings
current_versioncurrent configuration setting version
pathsettings file path
backup_pathalternative back up path for redundancy checks
datalist of raw configurations, internally used only
subjectRAVESubject instance
read_onlywhether the configuration should be read-only, not yet implemented
versionconfigure version of currently stored files
old_versionwhether settings file is old format
blocksexperiment blocks
electrodeselectrode numbers
sample_ratesvoltage data sample rate
notch_filteredwhether electrodes are notch filtered
has_waveletwhether each electrode has wavelet transforms
data_importedwhether electrodes are imported
data_lockedwhether electrode, blocks and sample rate are locked? usually when an electrode is imported into 'rave', that electrode is locked
electrode_lockedwhether electrode is imported and locked
electrode_composedcomposed electrode channels, not actual physically contacts, but is generated from those physically ones
wavelet_paramswavelet parameters
notch_paramsNotch filter parameters
electrode_typeselectrode signal types
@freeze_blockswhether to free block, internally used
@freeze_lfp_ecogwhether to freeze electrodes that record 'LFP' signals, internally used
@lfp_ecog_sample_rate'LFP' sample rates, internally used
all_blockscharacters, all possible blocks even not included in some projects
raw_path2raw data path, based on the format standard; for native,
this is equivalent to raw_path; for 'BIDS', this is subject raw
directory in 'BIDS' project
raw_path2_typeraw data path type, 'native' or 'bids'
raw_pathlegacy raw data path for 'RAVE', regardless of
raw_path2_type. This field exists for compatibility support
the legacy scripts. Please use raw_path2 combined with
raw_path2_type for supporting 'BIDS' format
raw_path_typelegacy type for raw_path, always returns
'native'
Inherited methods
@marshal()Internal method
RAVEPreprocessSettings$@marshal(...)...internal arguments
@unmarshal()Internal method
RAVEPreprocessSettings$@unmarshal(object, ...)object, ...internal arguments
new()constructor
RAVEPreprocessSettings$new(subject, read_only = TRUE)subjectcharacter or RAVESubject instance
read_onlywhether subject should be read-only (not yet implemented)
valid()whether configuration is valid or not
RAVEPreprocessSettings$valid()
has_raw()whether raw data folder exists
RAVEPreprocessSettings$has_raw()
set_blocks()set blocks
RAVEPreprocessSettings$set_blocks(blocks, force = FALSE)blockscharacter, combination of session task and run
forcewhether to ignore checking. Only used when data structure is not native, for example, 'BIDS' format
get_block_paths()get block-related files
RAVEPreprocessSettings$get_block_paths(
block,
force_native = FALSE,
check = TRUE
)blockblock names (for all available blocks, see all_blocks)
force_nativewhether to ignore the format standard, such as 'BIDS' and force return the native paths; default is false
checkwhether to check the file paths to make sure the returned paths are valid; default is true
set_electrodes()set electrodes
RAVEPreprocessSettings$set_electrodes(
electrodes,
type = SIGNAL_TYPES,
add = FALSE
)electrodesinteger vectors
typesignal type of electrodes, see SIGNAL_TYPES
addwhether to add to current settings
set_sample_rates()set sample frequency
RAVEPreprocessSettings$set_sample_rates(srate, type = SIGNAL_TYPES)sratesample rate, must be positive number
typeelectrode type to set sample rate. In 'rave', all electrodes with the same signal type must have the same sample rate.
migrate()convert old format to new formats
RAVEPreprocessSettings$migrate(force = FALSE)forcewhether to force migrate and save settings
electrode_info()get electrode information
RAVEPreprocessSettings$electrode_info(electrode)electrodeinteger
get_compose_weights()get weights of each composed channels
RAVEPreprocessSettings$get_compose_weights(flat = TRUE)flatwhether to flatten the data frame; default is true
clone()The objects of this class are cloneable with this method.
RAVEPreprocessSettings$clone(deep = FALSE)deepWhether to make a deep clone.
# The following example require downloading demo subject (~700 MB) from
# https://github.com/beauchamplab/rave/releases/tag/v0.1.9-beta
if( has_rave_subject("demo/DemoSubject") ) {
conf <- RAVEPreprocessSettings$new(subject = 'demo/DemoSubject')
conf$blocks # "008" "010" "011" "012"
conf$electrodes # 5 electrodes
# Electrode 14 information
conf$electrode_info(electrode = 14)
conf$data_imported # All 5 electrodes are imported
conf$data_locked # Whether block, sample rates should be locked
}
Run the code above in your browser using DataLab