For mouse SCS procedures.
Following steps assume you are running an experiment for "Pilot_SCS_N_CEJ_03"
:
- Start Intan RHX software. Select 20kHz for sample rate.
- In RHX UI, click
File > Load Settings
and selectMouse_SCS.xml
. - In RHX UI, click
Network > Remote TCP Control
, set Host to127.0.0.1
and clickConnect
. - In MATLAB, navigate to
C:/MyRepos/NML/Mouse_SCS
. - Open
experiment_2024_06_04.m
and clickRun
from theEditor
tab in the UI. - Open
processing_2024_06_04.m
. - Enter experimental parameters and click
RUN
from the stimulation controller GUI. - After each sweep, update the
SWEEP
constant at the top ofprocessing_2024_06_04.m
and then clickRun
from theEditor
tab in the UI.
- This should generate a new Powerpoint for each sweep with the stimulus response curves, on the Google Drive mapped in
parameters.m
.
- Configuration
- Experiments
- Main Experiment Functions
- AM4100 Interface
- TMSi Interface
- Initializers
- Loaders
- Plotting
parameters
- Return parameters struct, which sets default values for things like epoch durations etc.
example_run_experiment
- Script for testing/setup prior to experiment.
runStimRecSweep
- Returns a table of the stim/rec sweep intensity and block indices.runStimRecSweepAllChannels
- Returns a table of the stim/rec sweep intensity and block indices, for ALL channels. Requires Raspberry Pi v4b with Relay module to MUX the AM4100 anode to the stimulation channels.
AM4100_sendCommand
- Send message to stimulator and return formatted response message.AM4100_setInterPhaseInterval
- Sets the interval between the two phases of asymmetric/biphasic pulses.AM4100_setStimEventPeriodAndCount
- Set the AM4100 stimulation event period and number of stimuli.AM4100_setStimParameters
- Set the stimulation parameters for AM4100 experiment.AM4100_stimulate
- Stimulate using the AM4100, while recording this event.
SAGA_impedances
- Measure impedances on HD-EMG array(s).SAGA_record
- Run and increment the recording for TMSi-SAGAs AND Plexon (do not manually increment Plexon!).SAGA_setBufferSize
- Updates tmsi client recording buffer samples for the next record.SAGA_stop
- Stop the current recording/running SAGA state.SAGA_updateFileNames
- Update filenames for SAGA A and SAGA B devices.
initAM4100
- Initialize TCP interface to AM4100.initInterfaces
- Initialize interfaces to TMSi and AM4100, plus logging.initTMSi
- Create UDP client to control SAGA state machine running on some host device over IPv4 + UDP.
loadData
- Load all data associated with a single sweep.loadMultiData
- Load multiple sweeps into single sweep table.loadSweepSpreadsheet
- Load spreadsheet for sweeps based onsweep
folder and raw data root folder.
plotRecruitment
- Plot recruitment summary figure.plotSagaRecruitmentRaw
- Plot recruitment for individual SAGA channel data.
Code that was run on the Raspberry Pi v4b that managed stimulation switching is saved in the following gist.