Home > bioelectromagnetism > eeg_lap2scd_script.m

eeg_lap2scd_script

PURPOSE ^

eeg_lap2scd_script - load ERP Laplacian data and convert to SCD

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 eeg_lap2scd_script - load ERP Laplacian data and convert to SCD
 Author: Darren.Weber_at_radiology.ucsf.edu
 calls eeg_load_ascii, eeg_write_ascii, & eeg_lap2scd

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % eeg_lap2scd_script - load ERP Laplacian data and convert to SCD
0002 % Author: Darren.Weber_at_radiology.ucsf.edu
0003 % calls eeg_load_ascii, eeg_write_ascii, & eeg_lap2scd
0004 
0005 clear; close all;
0006 
0007 inpath  = 'd:\MyDocuments\emse_data\ptsd-pet\lap14hz\';
0008 outpath = 'd:\MyDocuments\emse_data\ptsd-pet\scd14hz\';
0009 
0010 infile_ext  = '_lap14hz.txt';
0011 outfile_ext = '_scd14hz.txt';
0012 
0013 format = '%12.4f ';
0014 
0015 
0016 groups = {'c' 'p'};
0017 subjects = {'01' '02' '03' '04' '05' '06' '07' '08' '09' '10'};
0018 conditions = {'o' 'oac' 'oat' 'ouc' 'out' 't' 'tac' 'tad' 'tat' 'tuc' 'tud' 'tut'};
0019 
0020 for g = 1:length(groups)
0021     for s = 1:length(subjects)        subj = strcat(char(groups(g)),char(subjects(s)));
0022         for c = 1:length(conditions)  cond = char(conditions(c));
0023             
0024             infile = strcat(inpath,subj,cond,infile_ext);    % load input Laplacian ascii data
0025             lap = eeg_load_ascii(infile);                    % for this data, lap in uV/m^2
0026             
0027             scd = eeg_lap2scd(lap);                          % calculate scalp current density
0028                                                              % given lap uV/m^2, scd in uA/m^3
0029             
0030             outfile = strcat(outpath,subj,cond,outfile_ext); % output scalp current density data
0031             eeg_write_ascii(outfile,scd,format);
0032         end
0033     end
0034 end

Generated on Mon 15-Aug-2005 15:36:19 by m2html © 2003