Changeset 769 for trunk/src/series.m
- Timestamp:
- May 3, 2014, 10:40:25 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r767 r769 253 253 display_file_name(handles,Param.FileName,'one')%refresh the input table 254 254 end 255 else 256 set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed 255 257 end 256 258 if isfield(Param,'incr_i') … … 260 262 set(handles.num_incr_j,'String',num2str(Param.incr_j)) 261 263 end 262 set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed263 264 264 265 %------------------------------------------------------------------------ … … 1022 1023 switch FileType 1023 1024 case {'civx','civdata'} 1024 FieldList=set_field_list('U','V' ,'C');1025 set(handles.FieldName,'String',[FieldList;{' get_field...'}]);%standard menu for civx data1025 FieldList=set_field_list('U','V'); 1026 set(handles.FieldName,'String',[FieldList;{'C'};{'get_field...'}]);%standard menu for civx data 1026 1027 set(handles.FieldName,'Value',1) % set menu to 'velocity 1027 1028 set(handles.Coord_x,'Value',1); … … 1404 1405 function RUN_Callback(hObject, eventdata, handles) 1405 1406 1407 %% read the data on the GUI series 1408 Param=read_GUI_series(handles);%displayed parameters 1409 SeriesData=get(handles.series,'UserData');%hidden parameters 1410 if isfield(Param,'InputFields')&& isequal(Param.InputFields.FieldName,'get_field...') 1411 msgbox_uvmat('ERROR','input field name(s) not defined, select get_field...') 1412 return 1413 end 1414 1406 1415 %% settings of the button RUN 1407 1416 set(handles.RUN,'BusyAction','queue');% activation of STOP button will set BusyAction to 'cancel' … … 1412 1421 status_Callback(hObject, eventdata, handles) 1413 1422 1414 %% read the data on the GUI series1415 Param=read_GUI_series(handles);%displayed parameters1416 SeriesData=get(handles.series,'UserData');%hidden parameters1417 1418 1419 1420 1423 %% select the Action mode, 'local', 'background' or 'cluster' (if available) 1421 1424 RunMode='local';%default (needed for first opening of the GUI series) 1422 1425 if isfield(Param.Action,'RunMode') 1423 1426 RunMode=Param.Action.RunMode; 1427 Param.Action=rmfield(Param.Action,'RunMode');%remove from the recorded xml file to avoid interference during ImportConfig 1424 1428 end 1425 1429 ActionExt='.m';%default 1426 1430 if isfield(Param.Action,'ActionExt') 1427 1431 ActionExt=Param.Action.ActionExt;% '.m' or '.sh' (compiled) 1432 Param.Action=rmfield(Param.Action,'ActionExt');%remove from the recorded xml file to avoid interference during ImportConfig 1428 1433 end 1429 1434 ActionName=Param.Action.ActionName; 1430 1435 ActionPath=Param.Action.ActionPath; 1436 1431 1437 path_series=fileparts(which('series')); 1432 1438 … … 1483 1489 1484 1490 %% If a compiled version has been selected (ext .sh) check weather it needs to be recompiled 1485 % ActionExtList=get(handles.ActionExt,'String');1486 % ActionExt=ActionExtList{get(handles.ActionExt,'Value')};1487 % ActionList=get(handles.ActionName,'String');1488 % ActionName=ActionList{get(handles.ActionName,'Value')};1489 % TransformPath='';1490 % if ~isempty(get(handles.ActionExt,'UserData'))1491 % TransformPath=get(handles.ActionExt,'UserData');1492 % end1493 1491 if strcmp(ActionExt,'.sh') 1494 1492 TransformPath=''; … … 1506 1504 currentdir=pwd; 1507 1505 cd(get(handles.ActionPath,'String'))% go to the directory of Action 1508 % addpath(get(handles.TransformPath,'String'))1509 1506 addpath(path_uvmat)% add the path to uvmat to run the fct 'compile' 1510 % addpath(fullfile(path_uvmat,'transform_field'))% add the path to uvmat to run the fct 'compile'1511 1507 compile(ActionName,TransformPath) 1512 1508 cd(currentdir) … … 1523 1519 currentdir=pwd; 1524 1520 cd(get(handles.ActionPath,'String'))% go to the directory of Action 1525 % addpath(get(handles.TransformPath,'String'))1526 1521 addpath(path_uvmat)% add the path to uvmat to run the fct 'compile' 1527 1522 addpath(fullfile(path_uvmat,'transform_field'))% add the path to uvmat to run the fct 'compile' … … 2330 2325 set(handles.VelType,'visible','on') 2331 2326 end 2327 set(handles.FieldName,'Value',1) 2328 set(handles.FieldName,'String',[FieldList; {'get_field...'}]); 2332 2329 if ~strcmp(GetFieldData.FieldOption,'civdata...') 2330 set(handles.FieldName,'Value',[1:numel(FieldList)])%select all input fields by default 2333 2331 set(handles.VelType,'visible','off') 2334 2332 XName=GetFieldData.Coordinates.Coord_x; … … 2353 2351 end 2354 2352 end 2355 set(handles.Coord_x,'String',{XName})2353 set(handles.Coord_x,'String',{XName}) 2356 2354 set(handles.Coord_y,'String',YName) 2357 set(handles.FieldName,'Value',1)2358 set(handles.FieldName,'String',[FieldList; {'get_field...'}]);2359 2355 end 2360 2356 end … … 2802 2798 fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters 2803 2799 SeriesData=get(handles.series,'UserData'); 2800 if isfield(Param,'InputFields') 2801 ListField=Param.InputFields.FieldName; 2802 set(handles.FieldName,'String',[ListField;{'get-field...'}]) 2803 set(handles.FieldName,'Value',1:numel(ListField)) 2804 end 2804 2805 if isfield(Param,'ActionInput')% introduce parameters specific to an Action fct, for instance PIV parameters 2805 2806 set(handles.ActionInput,'Visible','on')
Note: See TracChangeset
for help on using the changeset viewer.