tomwalters@0: % procedure for 'aim-mat' tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % handles : all relevant parameters tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % bleeck@3: % tomwalters@0: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: function handles=init_aim_parameters(handles,filename) tomwalters@0: tomwalters@0: % reset program: tomwalters@0: handles.info=[]; tomwalters@0: handles.data=[]; tomwalters@0: handles.slideredit_start=[]; tomwalters@0: handles.slideredit_duration=[]; tomwalters@0: handles.slideredit_scale=[]; tomwalters@0: handles.slideredit_frames=[]; tomwalters@0: handles.currentslidereditcombi=[]; tomwalters@0: handles.all_options=[]; tomwalters@0: tomwalters@0: handles.info.default_start_module_pcp='gm2002'; tomwalters@0: handles.info.default_start_module_bmm='dcgc'; tomwalters@0: handles.info.default_start_module_nap='hl'; tomwalters@0: handles.info.default_start_module_strobes='sf2003'; tomwalters@0: handles.info.default_start_module_sai='ti2003'; tomwalters@0: handles.info.default_start_module_usermodule='mellin'; tomwalters@0: handles.info.default_start_module_movie='screen'; tomwalters@0: tomwalters@0: % set up all names, that we need in this project tomwalters@0: handles=setupnames(handles,filename); tomwalters@0: tomwalters@0: % check, wheter there is an existing project, if yes, load it tomwalters@0: directoryname=handles.info.directoryname; tomwalters@0: % if directory is empty, delete it tomwalters@0: if exist(lower(directoryname))==7 || exist(directoryname)==7 tomwalters@0: cd(directoryname); tomwalters@0: dir_struct = dir; tomwalters@0: if length(dir_struct)<=2 tomwalters@0: cd .. tomwalters@0: % ELN fix: tomwalters@0: ELNmessage=rmdir(directoryname); tomwalters@0: else tomwalters@0: cd .. tomwalters@0: end tomwalters@0: end tomwalters@0: tomwalters@0: if exist(lower(directoryname))==7 || exist(directoryname)==7 tomwalters@0: % first load the standart parameters. Maybe some new modules are added. tomwalters@0: % Old data is overwritten in the process. tomwalters@0: handles=createparameterfile(handles); tomwalters@0: if handles.error==1 tomwalters@0: return tomwalters@0: end bleeck@3: handles=aim_loadproject(handles); tomwalters@0: handles=aim_loadcurrentstate(handles); tomwalters@0: else tomwalters@0: % otherwise create a new project tomwalters@0: % ELN fix: tomwalters@0: ELNmessage=mkdir(directoryname); tomwalters@0: handles.info.pcp_loaded=0; tomwalters@0: handles.info.bmm_loaded=0; tomwalters@0: handles.info.nap_loaded=0; tomwalters@0: handles.info.strobes_loaded=0; tomwalters@0: handles.info.sai_loaded=0; tomwalters@0: handles.info.usermodule_loaded=0; tomwalters@0: handles.info.movie_loaded=0; tomwalters@0: handles=createparameterfile(handles); % create standart parameters tomwalters@0: handles=aim_loadsignalfile(handles,filename); % load the signal file and set up tomwalters@0: handles=aim_saveparameters(handles,handles.info.parameterfilename); % and save them again in case, they are overwritten tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: