Changeset 1154 for trunk/src/series.m
- Timestamp:
- Jul 7, 2024, 11:22:00 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r1152 r1154 572 572 PairString=get(handles.PairString,'Data'); 573 573 if numel(PairString)>=iview 574 checkpair=strfind(PairString{iview},'j=');575 if checkpair576 j1=str2double( PairString{iview}(4));577 j2=str2double( PairString{iview}(6));578 end574 r=regexp(PairString{iview},'(?<num1>\d+)-(?<num2>\d+)' ,'names'); 575 if ~isempty(r) 576 j1=str2double(r.num1); 577 j2=str2double(r.num2); 578 end 579 579 end 580 580 InputFile=fullfile_uvmat('','',InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},i1,[],j1,j2); … … 1400 1400 errormsg='input field name(s) not defined, select add_field...'; 1401 1401 return 1402 end 1403 [status,result]=system(['svn info ' Param.Action.ActionPath]); 1404 if status==0 1405 t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');%detect 'revision' or 'Revision' in the text 1406 if ~isempty(t) 1407 Param.UvmatRevision=t.rev; %version nbre of the current package 1408 end 1402 1409 end 1403 1410 … … 2305 2312 return 2306 2313 end 2307 [ tild,ActionName,ActionExt]=fileparts(FileName);2314 [~,ActionName,ActionExt]=fileparts(FileName); 2308 2315 2309 2316 % insert the choice in the menu ActionName … … 2397 2404 %% Activate the Action fct to adapt the configuration of the GUI series and bring specific parameters in SeriesData 2398 2405 Param=read_GUI_series(handles); % read the parameters from the GUI series 2399 Param.Action.RUN=0; 2400 Param.SeriesData=SeriesData; 2406 Param.Action.RUN=0;% indicate that we are in the mode of parameter input, not program run 2407 Param.SeriesData=SeriesData;% info stored in 'UserData' of the fig 'series' 2401 2408 ParamOut=h_fun(Param); % run the selected Action function to get the relevant input 2402 2409 … … 2465 2472 ind_var=get(handles.FieldName,'Value'); % indices of previously selected variables 2466 2473 for ilist=1:numel(ind_var) 2467 if isempty(find(strcmp(FieldList{ind_var(ilist)},ListVarName) ))2474 if isempty(find(strcmp(FieldList{ind_var(ilist)},ListVarName), 1)) 2468 2475 FieldList={}; % previous choice not consistent with new input field 2469 2476 set(handles.FieldName,'Value',1) … … 2471 2478 end 2472 2479 end 2473 if ~isempty(FieldList) iview_netcdf2474 if isempty(find(strcmp(get(handles.Coord_x,'String'),ListVarName) ))||...2475 isempty(find(strcmp(get(handles.Coord_y,'String'),ListVarName) ))2480 if ~isempty(FieldList) 2481 if isempty(find(strcmp(get(handles.Coord_x,'String'),ListVarName), 1))||... 2482 isempty(find(strcmp(get(handles.Coord_y,'String'),ListVarName), 1)) 2476 2483 FieldList={}; 2477 2484 set(handles.Coord_x,'String','') … … 2479 2486 end 2480 2487 Coord_z=get(handles.Coord_z,'String'); 2481 if ~isempty(Coord_z) && isempty(find(strcmp(Coord_z,ListVarName) ))REFRESH2488 if ~isempty(Coord_z) && isempty(find(strcmp(Coord_z,ListVarName), 1)) 2482 2489 FieldList={}; 2483 2490 set(handles.Coord_z,'String','') … … 2489 2496 end 2490 2497 set(handles_coord,'Visible','on') 2491 if isempty(find(strcmp('add_field...',FieldList) ))2498 if isempty(find(strcmp('add_field...',FieldList), 1)) 2492 2499 FieldList=[FieldList;{'add_field...'}];%add 'add_field...' to the menu FieldName if it is not already 2493 2500 end … … 2496 2503 set(handles.Field_text_1,'Visible','on') 2497 2504 if CheckPivData_1==0 % not civ input made 2498 FieldList_1={'add_field...'} 2505 FieldList_1={'add_field...'}; 2499 2506 ListVarName=SeriesData.FileInfo{iview_netcdf(2)}.ListVarName; 2500 2507 ind_var=get(handles.FieldName,'Value'); % indices of previously selected variables 2501 2508 for ilist=1:numel(ind_var) 2502 if isempty(find(strcmp(FieldList{ind_var(ilist)},ListVarName) ))2509 if isempty(find(strcmp(FieldList{ind_var(ilist)},ListVarName), 1)) 2503 2510 %FieldList_1={}; % previous choice not consistent with new input field 2504 2511 set(handles.FieldName_1,'Value',1) … … 2507 2514 end 2508 2515 warn_coord=0; 2509 if isempty(find(strcmp(get(handles.Coord_x,'String'),ListVarName) ))||...2510 isempty(find(strcmp(get(handles.Coord_y,'String'),ListVarName) ))2516 if isempty(find(strcmp(get(handles.Coord_x,'String'),ListVarName), 1))||... 2517 isempty(find(strcmp(get(handles.Coord_y,'String'),ListVarName), 1)) 2511 2518 warn_coord=1; 2512 2519 end 2513 if ~isempty(Coord_z) && isempty(find(strcmp(Coord_z,ListVarName) ))2520 if ~isempty(Coord_z) && isempty(find(strcmp(Coord_z,ListVarName), 1)) 2514 2521 FieldList_1={'add_field...'}; 2515 2522 warn_coord=1; … … 2547 2554 %% Check whether alphabetical sorting of input Subdir is allowed by the Action fct (for multiples series entries) 2548 2555 if isfield(ParamOut,'AllowInputSort')&&isequal(ParamOut.AllowInputSort,'on')&& size(Param.InputTable,1)>1 2549 [ tild,iview]=sort(Param.InputTable(:,2)); % subdirectories sorted in alphabetical order2556 [~,iview]=sort(Param.InputTable(:,2)); % subdirectories sorted in alphabetical order 2550 2557 set(handles.InputTable,'Data',Param.InputTable(iview,:)); 2551 2558 MinIndex_i=get(handles.MinIndex_i,'Data'); … … 2632 2639 2633 2640 %% NbSlice visibility 2634 % if isfield(ParamOut,'OutputFileMode')&& strcmp(ParamOut.OutputFileMode,'NbSlice')2635 % ParamOut.NbSlice='on';2636 % end2637 2641 if isfield(ParamOut,'NbSlice') && (strcmp(ParamOut.NbSlice,'on')||isnumeric(ParamOut.NbSlice)) 2638 2642 set(handles.num_NbSlice,'Visible','on') … … 2690 2694 end 2691 2695 set(handles.CheckMask,'Visible',MaskVisible); 2696 set(handles.MaskTable,'Visible',MaskVisible); 2697 2692 2698 %% Setting of expected iteration time 2693 2699 if isfield(ParamOut,'CPUTime') … … 2698 2704 InputTable=get(handles.InputTable,'Data'); 2699 2705 [OutputPath,Device,DeviceExt]=fileparts(InputTable{1,1}); 2700 [ OutputPath,Experiment,ExperimentExt]=fileparts(OutputPath);2706 [~,Experiment,ExperimentExt]=fileparts(OutputPath); 2701 2707 set(handles.Device,'String',[Device DeviceExt]) 2702 2708 set(handles.Device,'Visible','on') … … 2710 2716 2711 2717 %% definition of the subdirectory containing the output files 2712 2713 2718 if ~(isfield(SeriesData,'ActionName') && strcmp(ActionName,SeriesData.ActionName)) 2714 2719 OutputDirExt='.series'; % default … … 2752 2757 set(handles.OutputDirExt,'Visible',OutputDirVisible) 2753 2758 set(handles.OutputSubDir,'Visible',OutputDirVisible) 2754 % set(handles.OutputDir_title,'Visible',OutputDirVisible)2755 2759 SeriesData.ActionName=ActionName; % record ActionName for next use 2756 2760 … … 2776 2780 %% definition of an additional parameter set, determined by an ancillary GUI 2777 2781 if isfield(ParamOut,'ActionInput') 2778 % set(handles.ActionInput,'Visible','on')2779 2782 ParamOut.ActionInput.Program=ActionName; % record the program in ActionInput 2780 2783 SeriesData.ActionInput=ParamOut.ActionInput; 2781 2784 else 2782 % set(handles.ActionInput,'Visible','off')2783 2785 if isfield(SeriesData,'ActionInput') 2784 2786 SeriesData=rmfield(SeriesData,'ActionInput');
Note: See TracChangeset
for help on using the changeset viewer.