Sleep Scoring Test Bed
----------------------

The files in this zip archive are designed to permit you to see for yourself how
sleep scoring with OSI's telemetry system, Neuroplayer Tool, and Event
Classifier operates and performs. The demonstration is based upon 490 hours of
iEEG and EMG recorded from two separate wild-type mice, starting twenty-four
hours after implantation of A3049J2 dual-channel iEEG/EMG sensors. The first
sensor transmitted iEEG on telemetry channel No163 and EMG on No164. The second
sensor transmitted iEEG on No195 and EMG on No196.

The zip archive does not include any of the raw telemetry archives. You can
download a set of 5 hours taken from the full 490 hours from the link below.
These recordings were made with an A3038C Animal Location Tracker (ALT), so they
also provide for each animal an average movement velocity for each interval. We
use this independent measurement of movement to produce an activity plot in
units of cm/s.

https://www.opensourceinstruments.com/SCT/Recordings/EMG_iEEG_09JUN26.zip

We include in this zip archive the following filed and directories:

ACRP1R1.tcl: Activity and Circadian Rhythm Processor (ACRP), a Neuroplayer interval
processor designed to process eight-second intervals and produce measurements of
iEEG delta power, theta power, sigma power, and EMG amlitude. The processor assumes
two-channel iEEG/EMG recordings from an A3049J2 or equivalent imlantable telemetry
sensor. The comments in the processor explain how it works.

ACRP1_Characteristics: A directory containing the 490 characteristics files generated
by ACRP1R1, one for each hour-long data archive.

SSP1R1.tcl: Sleep Scoring Processor (SSP), a Neuroplayer event classification
processor that produces metrics representing iEEG delta power, theta power,
delta-theta power ratio, and EMG power. 

SSP1_Metrics: A directory containing the 490 characteristics files generated
by SSP1R1, one for each hour-long data archive.

SSP1_Library.txt: A library of NREM, REM, and Wake intervals that we use to
classify all other intervals. Load this library into the Event Classifier and
you will be able to score intervals in any iEEG/EMG recording made with an
A3049J2 sensor, assuming your electrodes are all well-secured.

Score_163.txt: The output from the Batch Classifier in which each eight-second interval
of the No163/No164. Each eight-second interval is scored as NREM, REM, or Wake, and 
very rarely Unknown. We used the SSP1_Library to generate this file.

Score_195.txt: The same as Score_163.txt, but for transmitter No195/No196.

plot_acrp.py: A program that plots the delta power, theta power, EMG amlitude,
and ALT-measured activity as well as reading in the score file and plotting the
sleep scoring. To run the program, you will need a Python environment and some
plotting packages. The program includes instructions on how to set up the Python
environment.

plot_ssp.py: Like plot_acrp.py, but does not plot scoring, just the metrics.
