Changeset 500 for trunk/src/civ.m
- Timestamp:
- Jul 24, 2012, 7:58:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r498 r500 24 24 %TODO: search range 25 25 26 % Last Modified by GUIDE v2.5 18-Jul-2012 23:20:1226 % Last Modified by GUIDE v2.5 24-Jul-2012 13:14:00 27 27 % Begin initialization code - DO NOT EDIT 28 28 gui_Singleton = 1; … … 59 59 addpath (path_civ) ; %add the path to civ, (useful in case of change of working directory after civ has been s opened in the working directory) 60 60 errormsg=[];%default error message 61 xmlfile= 'PARAM.xml';61 xmlfile=fullfile(path_civ,'PARAM.xml'); 62 62 test_batch=0;%default: ,no batch mode available 63 63 sparam=[]; 64 if ~exist(xmlfile,'file') 65 [success,message]=copyfile(fullfile(path_civ,'PARAM.xml.default'),xmlfile) 66 end 64 67 if exist(xmlfile,'file') 65 68 try … … 71 74 end 72 75 else 73 %errormsg=[xmlfile ' not found: path to civx binaries undefined'];74 76 [s,w]=system('oarstat'); 75 77 if ~isequal(s,0) … … 90 92 end 91 93 if ~isempty(test_command) 92 [s,w]=system(test_command);93 if isequal(s,0)94 test_batch=1;95 end94 [s,w]=system(test_command); 95 if isequal(s,0) 96 test_batch=1; 97 end 96 98 end 97 99 end … … 360 362 % settings for new civ data, 361 363 if strcmp(Data.Conventions,'uvmat/civdata')% case of new civ data, 362 set(handles.Program,'Value', 2) %select civ/Matlab by default364 set(handles.Program,'Value',1) %select civ/Matlab by default 363 365 Program_Callback([],[], handles) 364 366 if ~isempty(Data.CivStage)%test for civ files … … 376 378 % settings for civx data, 377 379 elseif ~isempty(Data.absolut_time_T0')% case of civx data, 378 set(handles.Program,'Value', 1) %select Cix by default380 set(handles.Program,'Value',3) %select Cix by default 379 381 Program_Callback([],[], handles) 380 382 if ~isempty(Data.fix2) … … 1080 1082 %% read the PARAM.xml file to get the binaries (and batch_mode if batch) 1081 1083 path_civ=fileparts(which('civ')); %path to the source directory of uvmat 1082 xmlfile= 'PARAM.xml';1084 xmlfile=fullfile(path_civ,'PARAM.xml'); 1083 1085 s=[]; 1084 1086 if exist(xmlfile,'file')% search parameter xml file in the whole matlab path … … 1152 1154 else 1153 1155 errormsg=['path ' path ' for binaries defined in PARAM.xml does not exist']; 1154 return 1155 end 1156 1156 end 1157 1157 else %look for the full path if the file name has been defined with a relative path in PARAM.xm 1158 1158 fullname=fullfile(path_civ,Param.xml.(bin_name{1})); … … 1161 1161 else 1162 1162 errormsg=['Binary ' Param.xml.(bin_name{1}) ' defined in PARAM.xml does not exist']; 1163 return 1164 end 1165 end 1166 end 1163 end 1164 end 1165 end 1166 end 1167 if ~isempty(errormsg) 1168 if strcmp(Param.Program,'civ_matlab.sh') 1169 errormsg=[{errormsg}; {'run compile_functions.m to create it by compiling civ_matlab.m'}]; 1170 end 1171 return 1167 1172 end 1168 1173 … … 4561 4566 4562 4567 function last_i_Callback(hObject, eventdata, handles) 4563
Note: See TracChangeset
for help on using the changeset viewer.