Skip to content

Commit

Permalink
brainhack package v01
Browse files Browse the repository at this point in the history
  • Loading branch information
brungio committed Nov 26, 2022
1 parent 755c4d6 commit f3cc799
Show file tree
Hide file tree
Showing 8 changed files with 639 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.asv
*.asv
results/bhack_task_03_output_distances.mat
25 changes: 23 additions & 2 deletions code/analyze_v01.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
%%% analyses that will likely saturate your RAM and potentially return an
%%% error

fs = 125/2; %target sampling frequency for all signals
fs = 125/4; %target sampling frequency for all signals

max_time_s = 500;%maximum time of timecourse to consider for analyses (seconds)

Expand All @@ -76,7 +76,7 @@
%Also potentially useful if chunks are trials and onset/offset
%effects need to be discarded from analysis

ms_lags = 0:10:500; %feature-to-brain-lags (ms; 200 ms = the brain represents
ms_lags = 100:50:500; %feature-to-brain-lags (ms; 200 ms = the brain represents
%the feature 200 ms after the waveform reaches the tympanic
%membrane)

Expand Down Expand Up @@ -112,6 +112,27 @@
ns_time_folding = floor(ms_time_folding/1000*fs); %folding window in n samples


%store analysis parameters
analysis_pars=struct([]);
analysis_pars(1).fs = fs;
analysis_pars.max_time_s = max_time_s;
analysis_pars.n_chunks = n_chunks;
analysis_pars.p_chunk_out = p_chunk_out;
analysis_pars.ms_lags = ms_lags;
analysis_pars.ms_time_folding= ms_time_folding;
analysis_pars.do_zscore = do_zscore;
analysis_pars.ns_max = ns_max;
analysis_pars.ns_chunk = ns_chunk;
analysis_pars.ns_chunk_out = ns_chunk_out;
analysis_pars.ns_lags = ns_lags;
analysis_pars.n_lags = n_lags;
analysis_pars_cell={fs max_time_s n_chunks p_chunk_out ms_lags ms_time_folding,...
do_zscore ns_max ns_chunk ns_chunk_out ns_lags n_lags};
analysis_par_names={'fs' 'max_time_s' 'n_chunks' 'p_chunk_out' 'ms_lags' 'ms_time_folding',...
'do_zscore' 'ns_max' 'ns_chunk' 'ns_chunk_out' 'ns_lags' 'n_lags'};




Xs = {X_aco X_sem X_eeg}; %datasets

Expand Down
Loading

0 comments on commit f3cc799

Please sign in to comment.