You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@NNiethard comment in main function: add a hypno function (adding for each sample the sleep stage) + a function that tells you for each sample whether its solid in a sleep stage: isStage(FT-Structure, sample, boundary_in_sec)
Problem: This would require the hypnogram and epoch length in the histogram (it would work on the output of detectEvents). What's the use case?
The text was updated successfully, but these errors were encountered:
function [stage, solid] = isStage(time, hyp, epoch_length, solid_margin, solid_range)
% Returns the sleep stage for a given time point. Also returns whether this
% time point is solid within that sleep stage (= more than solid_margin
% away from another stage) or any other sleep stage given in solid_range.
%
% INPUT VARIABLES:
% data time (in sec) for which the sleep stage is
% requested
% hyp hypnogram (num_epochs x 1)
% epoch_length length of each epoch in hyp (in sec)
% solid_margin optional; margin (in sec) around time point
% to check for sleep stage changes (+/- solid_margin; e.g., 1.5)
% solid_range optional (only required if solid_margin is
% provided); array of ints (n x 1); sleep
% stages other than the current one
% permissable for stage to be solid (e.g.,
% for checking whether a time point is in
% solid NREM sleep: [2 3 4])
% OUTPUT VARIABLES:
% stage sleep stage of provided time point (taken from hyp)
% solid logical; 1 if sleep stage does not change (or
% does not change to stage other than solid_range)
% within +/- solid_margin seconds
@NNiethard comment in main function:
add a hypno function (adding for each sample the sleep stage) + a function that tells you for each sample whether its solid in a sleep stage: isStage(FT-Structure, sample, boundary_in_sec)
Problem: This would require the hypnogram and epoch length in the histogram (it would work on the output of detectEvents). What's the use case?
The text was updated successfully, but these errors were encountered: