convert_grass_scoring¶
- convert_grass_scoring(fname)¶
CONVERT_GRASS_SCORING Extract sleep stages and notation from a GRASS CSV text file
- Usage:
[stages, notation, start_time] = convert_grass_scoring(fname)
- Inputs:
fname : char - path to GRASS comment/scoring CSV – required
- Outputs:
- stagesstruct with fields
stage : 1xN double - stage code (5=Wake, 4=REM, 3=N1, 2=N2, 1=N3, 0=Other)
time : 1xN double - stage onset time in seconds from recording start
- notationstruct with fields
time : 1xM double - annotation times in seconds
text : 1xM cell of char - annotation text
start_time : 1x3 double - [hour minute second] of first timestamp in file
Notes
Time stamps are parsed with datetime using ‘HH:mm:ss’ and wrap across midnight via cumulative modulo of the time-of-day differences.
See also: readgrassstaging, read_staging
∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿