Skip to content

Neuro-Mechatronics-Interfaces/Mouse_SCS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MOUSE_SCS

For mouse SCS procedures.

Quick Start

Following steps assume you are running an experiment for "Pilot_SCS_N_CEJ_03":

  1. Start Intan RHX software. Select 20kHz for sample rate.
  2. In RHX UI, click File > Load Settings and select Mouse_SCS.xml.
  3. In RHX UI, click Network > Remote TCP Control, set Host to 127.0.0.1 and click Connect.
  4. In MATLAB, navigate to C:/MyRepos/NML/Mouse_SCS.
  5. Open experiment_2024_06_04.m and click Run from the Editor tab in the UI.
  6. Open processing_2024_06_04.m.
  7. Enter experimental parameters and click RUN from the stimulation controller GUI.
  8. After each sweep, update the SWEEP constant at the top of processing_2024_06_04.m and then click Run from the Editor 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.

Contents

Important

  • parameters - Return parameters struct, which sets default values for things like epoch durations etc.

Experiment Scripts

Main Experiment Functions

  • 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 Functions

TMSi SAGA Controller Functions

  • 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.

Interface Initializers

  • 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.

Data Loaders

  • loadData - Load all data associated with a single sweep.
  • loadMultiData - Load multiple sweeps into single sweep table.
  • loadSweepSpreadsheet - Load spreadsheet for sweeps based on sweep folder and raw data root folder.

Plotting Functions

Raspberry Pi Stim Channel Switcher

Code that was run on the Raspberry Pi v4b that managed stimulation switching is saved in the following gist.

About

For running Mouse SCS experiments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published