annotate aim-mat/gui/init_aim_parameters.m @ 4:537f939baef0 tip

various bug fixes and changed copyright message
author Stefan Bleeck <bleeck@gmail.com>
date Tue, 16 Aug 2011 14:37:17 +0100
parents 20ada0af3d7d
children
rev   line source
tomwalters@0 1 % procedure for 'aim-mat'
tomwalters@0 2 %
tomwalters@0 3 % INPUT VALUES:
tomwalters@0 4 % handles : all relevant parameters
tomwalters@0 5 %
tomwalters@0 6 % RETURN VALUE:
tomwalters@0 7 %
bleeck@3 8 %
tomwalters@0 9 % (c) 2011, University of Southampton
bleeck@3 10 % Maintained by Stefan Bleeck (bleeck@gmail.com)
bleeck@3 11 % download of current version is on the soundsoftware site:
bleeck@3 12 % http://code.soundsoftware.ac.uk/projects/aimmat
bleeck@3 13 % documentation and everything is on http://www.acousticscale.org
bleeck@3 14
tomwalters@0 15
tomwalters@0 16
tomwalters@0 17
tomwalters@0 18 function handles=init_aim_parameters(handles,filename)
tomwalters@0 19
tomwalters@0 20 % reset program:
tomwalters@0 21 handles.info=[];
tomwalters@0 22 handles.data=[];
tomwalters@0 23 handles.slideredit_start=[];
tomwalters@0 24 handles.slideredit_duration=[];
tomwalters@0 25 handles.slideredit_scale=[];
tomwalters@0 26 handles.slideredit_frames=[];
tomwalters@0 27 handles.currentslidereditcombi=[];
tomwalters@0 28 handles.all_options=[];
tomwalters@0 29
tomwalters@0 30 handles.info.default_start_module_pcp='gm2002';
tomwalters@0 31 handles.info.default_start_module_bmm='dcgc';
tomwalters@0 32 handles.info.default_start_module_nap='hl';
tomwalters@0 33 handles.info.default_start_module_strobes='sf2003';
tomwalters@0 34 handles.info.default_start_module_sai='ti2003';
tomwalters@0 35 handles.info.default_start_module_usermodule='mellin';
tomwalters@0 36 handles.info.default_start_module_movie='screen';
tomwalters@0 37
tomwalters@0 38 % set up all names, that we need in this project
tomwalters@0 39 handles=setupnames(handles,filename);
tomwalters@0 40
tomwalters@0 41 % check, wheter there is an existing project, if yes, load it
tomwalters@0 42 directoryname=handles.info.directoryname;
tomwalters@0 43 % if directory is empty, delete it
tomwalters@0 44 if exist(lower(directoryname))==7 || exist(directoryname)==7
tomwalters@0 45 cd(directoryname);
tomwalters@0 46 dir_struct = dir;
tomwalters@0 47 if length(dir_struct)<=2
tomwalters@0 48 cd ..
tomwalters@0 49 % ELN fix:
tomwalters@0 50 ELNmessage=rmdir(directoryname);
tomwalters@0 51 else
tomwalters@0 52 cd ..
tomwalters@0 53 end
tomwalters@0 54 end
tomwalters@0 55
tomwalters@0 56 if exist(lower(directoryname))==7 || exist(directoryname)==7
tomwalters@0 57 % first load the standart parameters. Maybe some new modules are added.
tomwalters@0 58 % Old data is overwritten in the process.
tomwalters@0 59 handles=createparameterfile(handles);
tomwalters@0 60 if handles.error==1
tomwalters@0 61 return
tomwalters@0 62 end
bleeck@3 63 handles=aim_loadproject(handles);
tomwalters@0 64 handles=aim_loadcurrentstate(handles);
tomwalters@0 65 else
tomwalters@0 66 % otherwise create a new project
tomwalters@0 67 % ELN fix:
tomwalters@0 68 ELNmessage=mkdir(directoryname);
tomwalters@0 69 handles.info.pcp_loaded=0;
tomwalters@0 70 handles.info.bmm_loaded=0;
tomwalters@0 71 handles.info.nap_loaded=0;
tomwalters@0 72 handles.info.strobes_loaded=0;
tomwalters@0 73 handles.info.sai_loaded=0;
tomwalters@0 74 handles.info.usermodule_loaded=0;
tomwalters@0 75 handles.info.movie_loaded=0;
tomwalters@0 76 handles=createparameterfile(handles); % create standart parameters
tomwalters@0 77 handles=aim_loadsignalfile(handles,filename); % load the signal file and set up
tomwalters@0 78 handles=aim_saveparameters(handles,handles.info.parameterfilename); % and save them again in case, they are overwritten
tomwalters@0 79 end
tomwalters@0 80
tomwalters@0 81
tomwalters@0 82
tomwalters@0 83