read_ddf() to read in workloop, twitch, or tetanus experiment
data from multiple .ddf files.
read_ddf_dir(file_path, pattern = "*.ddf", sort_by = "mtime", ...)
Path where files are stored. Should be in the same folder.
Regex pattern for identifying relevant files in the file_path.
Metadata by which files should be sorted to be in the correct
run order. Defaults to
Additional arguments to be passed to
A list of objects of class
tetanus, all of which inherit class
muscle_stim. These objects
data.frames in most situations but also store metadata
from the ddf as attributes.
muscle_stim object's columns contain:
Length change of the muscle, uncorrected for gear ratio
Force, uncorrected for gear ratio
When stimulation occurs, on a binary scale
Frequency at which samples were collected
Number of sequential pulses within a stimulation train
Total number of oscillatory cycles (assuming sine wave trajectory) that the muscle experienced. Cycles are defined with respect to initial muscle length (L0-to-L0 as opposed to peak-to-peak).
amplitude of length change (again, assuming sine wave trajectory)
Frequency of oscillations (again, assuming sine wave trajectory)
The units of measurement for each column in the
data.frame. This might be the most important attribute so please check
that it makes sense!
Read in a .ddf file that contains data from an experiment. If
position and force do not correspond to columns 2 and 3 (respectively),
replace "2" and "3" within
rename_cols accordingly. Similarly,
skip_cols = 4:11 should be adjusted if more than 11 columns are
present and/or columns 4:11 contain important data.
Please note that there is no correction for gear ratio or further
manipulation of data. See
fix_GR to adjust gear ratio. Gear ratio can
also be adjusted prior to analyses within the
function, the data import all-in-one function
the batch analysis all-in-one
Please also note that organization of data within the .ddf file is assumed to
conform to that used by Aurora Scientific's Dynamic Muscle Control and
Analysis Software. YMMV if using a .ddf file from another source. The
as_muscle_stim() function can be used to generate
objects if data are imported via another function. Please feel free to
contact us with any issues or requests.
Vikram B. Baliga and Shreeram Senthivasan