Once you have downloaded the scripts and added the sleepsmg folder to your path in Matlab, you can start the program by typing:
Once you start up the program you will see this box in the upper left corner of the program:
This is the name of the file that contains your eeg data. This file can come in 3 different formats:
- .mat - This should be a saved copy of an EEGlab data struct. To make this file, open your data in EEGlab and then use
save('myEEGdata.mat', 'EEG')to save the resulting struct.
- .edf - (requires EEGlab to be open) When you use this option it will automatically load your data using EEGlab.
- .set - (requires EEGlab to be open) When you use this option it will automatically load your data using EEGlab.
When sleeepSMG loads the data it will expect that the
EEG.chanlocs contains labels for all of the channels used in your montage. The default montage (
sleep_Montage) requires these channels: ROC, LOC, C3, O2, C4, O1, EMG1, EMG2, EMG3. The order of the channels does no matter, only the labels. Click here for more about montages and how to set up your own montage.
This is the name of the .mat file that will contain all of your stage information. If you want to start a new set of scores, just type in whatever filename you want to use. If you want to review data that you previously scored or continue scoring, you can enter that file instead.
After scoring, if you load this file in matlab you will find a struct called
stageData that will contain all of the information you entered using sleepSMG. Click here for more details about stageData output.
You are not required to enter a notes file. However, if you select a type of notes file from this drop down menu, you can enter a file that contains notes recorded during the sleep recording (i.e. things like the time of lights on and lights off or information from your bio-calibrations). Currently the only working notes format is from Twin recordings. Click here for more information about how to read in note files.
After you press load another box will appear so that you can enter in critical landmarks for your sleep data:
If this is the first time you have scored this data using this stage file, you will need to enter in the times for the record start, lights off and lights on using the hhmmss.fff format. This information will be saved so that if you load the stage file later it will be filled in.
The window size is the number of seconds that you want to show in each "window" to be scored. In other words it is the length of time (in seconds) in each epoch.