Skip to content

Commit

Permalink
adding more infor about sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
erinconrad committed May 20, 2024
1 parent 86eff77 commit 0dbee70
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions prep_data/prep_data_mt.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
all_rel_bp_iqr = cell(npts,3,3);
all_ll_iqr = cell(npts,3,3);
all_n_wake_sleep = nan(npts,2);
all_n_transition = nan(npts,1);
all_n_n1_rem = nan(npts,2);
all_disconnected = nan(npts,72);
all_n_wake_sleep_connected = nan(npts,2);
all_atropos = cell(npts,1);
Expand Down Expand Up @@ -212,8 +214,17 @@
sleep = strcmp(seeg_stage,'N3') | strcmp(seeg_stage,'N2');% | ...
%strcmp(seeg_stage,'N1') | strcmp(seeg_stage,'R');
wake = strcmp(seeg_stage,'W');
transition = cellfun(@isempty,seeg_stage);

if 0
table(times,seeg_stage)
table(seeg_secs,stage)
end

all_n_wake_sleep(p,:) = [sum(wake) sum(sleep)];
all_n_transition(p) = sum(transition);
all_n_n1_rem(p,:) = [sum(strcmp(seeg_stage,'N1')) sum(strcmp(seeg_stage,'R'))];
assert(sum(wake)+sum(sleep)+sum(transition)+sum(strcmp(seeg_stage,'N1')) + sum(strcmp(seeg_stage,'R'))==72)
all_n_wake_sleep_connected(p,:) = [sum(wake&~low_amplitude) sum(sleep&~low_amplitude)];


Expand Down Expand Up @@ -505,6 +516,8 @@

out.all_n_wake_sleep = all_n_wake_sleep;
out.all_n_wake_sleep_connected = all_n_wake_sleep_connected;
out.all_n_transition = all_n_transition;
out.all_n_n1_rem = all_n_n1_rem;
out.spikes_subsample = spikes_subsample;
out.durations = durations;

Expand Down

0 comments on commit 0dbee70

Please sign in to comment.