Home > fmri > utils > psyscope_data_stats.m

psyscope_data_stats

PURPOSE ^

SYNOPSIS ^

function psyscope_data_stats(data, verbosity)

DESCRIPTION ^

 psyscope_data_stats(data, verbosity);

  Assumes data structure returned by rd_psyscope_data()

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function psyscope_data_stats(data, verbosity)
0002 %
0003 % psyscope_data_stats(data, verbosity);
0004 %
0005 %  Assumes data structure returned by rd_psyscope_data()
0006 %
0007 
0008 % 03/24/00 PJ
0009 
0010 nevents = length(data.trial);
0011 
0012 disp(sprintf('%d events', nevents))
0013 
0014 trials = unique(data.trial);
0015 disp(sprintf('Encountered %d unique trials', length(trials)))
0016 
0017 states = unique(data.state);
0018 disp(sprintf('Encountered %d unique state_masks', length(states)))
0019 
0020 if verbosity > 1
0021   disp(sprintf('\t%d', states))
0022 end
0023 
0024 %
0025 %  Determine the number of active input lines
0026 %
0027 
0028 active =find(states < 512);
0029 
0030 mask = 0;
0031 
0032 for i = 1:length(active)
0033   mask = bitor(mask, states(active(i)));
0034 end
0035 
0036 disp(sprintf('Active lines: %s', sprintf('%d ', find(bitget(mask,1:8)))))

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003