ctf_read_gui

ctf_read_gui - function [ctf,GUI] = ctf_read_gui(command);...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
function [ctf,GUI] = ctf_read_gui(command); % ctf_read_gui - GUI interface to read data from a CTF .ds folder % % [ctf,FIG] = ctf_read_gui( [command] ); % % eg, % ctf = ctf_read_gui; % % ctf struct has fields: % % ctf.folder % ctf.header % ctf.setup % ctf.sensor % ctf.data % % This function calls: % ctf_read_res4 - to read in header, gain/offset, and sensor information % ctf_read_meg4 - to read in the data % % <>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> % % < > % % < DISCLAIMER: > % % < > % % < THIS PROGRAM IS INTENDED FOR RESEARCH PURPOSES ONLY. > % % < THIS PROGRAM IS IN NO WAY INTENDED FOR CLINICAL OR > % % < OFFICIAL USE. > % % < > % % <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<> % % % $Revision: 1.1 $ $Date: 2009/01/30 03:49:27 $ % Copyright (C) 2004 Darren L. Weber % % This program is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License % as published by the Free Software Foundation; either version 2 % of the License, or (at your option) any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. % Modified: 11/2003, Darren.Weber_at_radiology.ucsf.edu % - modified from NIH code % simply to allocate data into one large struct %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if ~exist('command','var'), command = 'init'; end
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Paint the GUI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% switch command, case 'init', [ctf,GUI] = INIT; case 'update', CTFopen = get(gcbf,'Userdata'); ctf = CTFopen.ctf; % update the folder set(CTFopen.handles.EctfFolder,'String',ctf.folder); CTFopen.CHANNELS = 1:ctf.setup.number_channels; CTFopen.TIME = ctf.setup.time_sec; CTFopen.TRIALS = 1:ctf.setup.number_trials; % update the channels channelvalue = get(CTFopen.handles.PctfCHANNELS,'Value'); channeltype = CTFopen.channeltypes{channelvalue}; switch channeltype, case 'all', CTFopen.CHANNELS = 1:ctf.setup.number_channels; case 'eeg', CTFopen.CHANNELS = ctf.sensor.index.eeg; case 'meg', CTFopen.CHANNELS = ctf.sensor.index.meg; case 'ref', CTFopen.CHANNELS = ctf.sensor.index.ref; case 'other', CTFopen.CHANNELS = ctf.sensor.index.other; otherwise, CTFopen.CHANNELS = []; end; set(CTFopen.handles.EctfCHANNELS,'value',CTFopen.CHANNELS); set(CTFopen.handles.EctfCHANNELS,'string',num2str(CTFopen.CHANNELS)); % update time start = sprintf('%6.5f', CTFopen.TIME(1)); step = sprintf('%6.5f',[CTFopen.TIME(2) - CTFopen.TIME(1)]); stop = sprintf('%6.5f', CTFopen.TIME(end));
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/07/2010 for the course ENG 42336 taught by Professor Thomasholland during the Spring '10 term at UC Davis.

Page1 / 8

ctf_read_gui - function [ctf,GUI] = ctf_read_gui(command);...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online