Functions | Variables

unlock/analysis/andres/Code/loadUnlockFile.m File Reference

Functions

Number of EEG leads and extra channels (EMG, EOG, triggers) nChs
total number of sample iterations (times data from all channels is collected) rawData
end of rawData (iIter,:)
place data in bulks of nCols posData (iIter,:)
if ~isequal (rawData, rawDataRead) warning('Loaded file does not match the one loaded with textread!!') end else%textread will not be supported in the future warning('File%s does not exist in the specified folder!!\n'
if unlockInfo main fileName end fclose (fileID)
Checking orientation of data
Always columns will be rows
samples if 
szData (1)< szData(2) rawData
resolution factor to multiply
raw data to get in µV
otherwise 
warning ('The specified system,%s, is not supported...yet!', systemID) end%%Getting events
resolution factor to multiply
raw data to get in µV
otherwise end of trial flags
and decoded 
target (from the harmonic sum decision-HSD-) unlockData.endTrl
end of trial flags (-1 by default) unlockData.dcdTgt

Variables

 function [unlockData, unlockInfo]
number of channels Loading file fileID = fopen(unlockInfo.main.parentFile)
all data in one stream nIter = length(rawCol{1})/nCols
initializing data vble posData = nan(nIter,2)
sample number of data sampling
iteration Build the matrix
with data per sampling clock
time for 
iIter
start of trial iEnd = (iIter)*nCols
closing file szData = size(rawData)
Checking orientation of data
Always columns will be 
channels
end Data processing done in the bioamplifier
end Data processing done in
the sampling frequency and
resolution This should
originally be saved in an info
structure included in the
loaded files switch unlockInfo
main systemID Enobio case
enobio 
Fs = 512
 chSensit = ''
channel sensitivity is microvolts
channel sensitivity is passing
from micro to millivolts 
filtHigh = ''
high pass bound for filter filtLow = ''
low pass bound for filter resolutFactor = ''
low pass bound for filter data
decoded target
data size unlockInfo main nTrials = sum(unlockData.endTrl)
total number of trials
unlockInfo main 
nChs = nChs
number of channels unlockInfo main len = unlockInfo.main.szData(1)

Function Documentation

Number of EEG leads and extra channels ( EMG  ,
EOG  ,
triggers   
)
if unlockInfo main fileName end fclose ( fileID   ) 
end of trial flags ( -1 by  default  ) 
total number of sample iterations ( times data from all channels is  collected  ) 
place data in bulks of nCols posData ( iIter  ,
 
)
end of rawData ( iIter  ,
 
)
Checking orientation of data Always columns will be rows samples if szData (  ) 
resolution factor to multiply raw data to get in µV otherwise end of trial flags and decoded target ( from the harmonic sum decision-HSD-   ) 
resolution factor to multiply raw data to get in µV otherwise warning ( 'The specified  system,
s,
is not supported...yet!'  ,
systemID   
)
if ~isequal ( rawData  ,
rawDataRead   
)

Variable Documentation

end Data processing done in the bioamplifier
Checking orientation of data Always columns will be channels
sampling frequency unlockInfo main chSensit = ''
decoded given by the HSD Taken only the channels with real info unlockData data
Initial value:
 (int16 value)*(2*5/(2^16*4))*(Channel Sensitivity in µV) [µV]  
        resolutFactor = (2*5/(2^16*4))*(chSensit)
channel sensitivity is passing from micro to millivolts unlockInfo main filtHigh = ''
high pass bound for filter filtLow = ''
length in samples unlockInfo main Fs = 512
function[unlockData, unlockInfo]
Initial value:
 loadUnlockFile(unlockInfo)
% function [unlockData,unlockInfo] = loadUnlockFile(unlockInfo.main.)
% 
% Loads the recorded data and creates structures with useful information
% for further analysis. Data from recorded EEG channels is in milliVolts. 
%
%
%
% Andres. V1. 17 Dec 2013

nCols = unlockInfo.main.nCols
start of trial iEnd = (iIter)*nCols
sample number of data sampling iteration Build the matrix with data per sampling clock time for iIter
Initial value:
 1:nIter
        iStart = (iIter-1)*nCols + 1
number of channels unlockInfo main len = unlockInfo.main.szData(1)
channel sensitivity is microvolts
total number of trials unlockInfo main nChs = nChs
all data in one stream nIter = length(rawCol{1})/nCols
data size unlockInfo main nTrials = sum(unlockData.endTrl)
initializing data vble posData = nan(nIter,2)
low pass bound for filter [Hz] unlockInfo main resolutFactor = ''
Multiplying by to get data from µV to mV Getting file info unlockInfo main szData = size(rawData)
decoded target