Changeset 769 for trunk/src/series.m


Ignore:
Timestamp:
May 3, 2014, 10:40:25 AM (10 years ago)
Author:
sommeria
Message:

corrections to be able to process image correlation in series

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r767 r769  
    253253        display_file_name(handles,Param.FileName,'one')%refresh the input table
    254254    end
     255else
     256    set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed
    255257end 
    256258if isfield(Param,'incr_i')
     
    260262    set(handles.num_incr_j,'String',num2str(Param.incr_j))
    261263end
    262 set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed
    263264
    264265%------------------------------------------------------------------------
     
    10221023switch FileType
    10231024    case {'civx','civdata'}
    1024         FieldList=set_field_list('U','V','C');
    1025         set(handles.FieldName,'String',[FieldList;{'get_field...'}]);%standard menu for civx data
     1025        FieldList=set_field_list('U','V');
     1026        set(handles.FieldName,'String',[FieldList;{'C'};{'get_field...'}]);%standard menu for civx data
    10261027        set(handles.FieldName,'Value',1) % set menu to 'velocity
    10271028        set(handles.Coord_x,'Value',1);
     
    14041405function RUN_Callback(hObject, eventdata, handles)
    14051406
     1407%% read the data on the GUI series
     1408Param=read_GUI_series(handles);%displayed parameters
     1409SeriesData=get(handles.series,'UserData');%hidden parameters
     1410if isfield(Param,'InputFields')&& isequal(Param.InputFields.FieldName,'get_field...')
     1411    msgbox_uvmat('ERROR','input field name(s) not defined, select get_field...')
     1412    return
     1413end
     1414
    14061415%% settings of the button RUN
    14071416set(handles.RUN,'BusyAction','queue');% activation of STOP button will set BusyAction to 'cancel'
     
    14121421status_Callback(hObject, eventdata, handles)
    14131422
    1414 %% read the data on the GUI series
    1415 Param=read_GUI_series(handles);%displayed parameters
    1416 SeriesData=get(handles.series,'UserData');%hidden parameters
    1417 
    1418 
    1419 
    14201423%% select the Action mode, 'local', 'background' or 'cluster' (if available)
    14211424RunMode='local';%default (needed for first opening of the GUI series)
    14221425if isfield(Param.Action,'RunMode')
    14231426    RunMode=Param.Action.RunMode;
     1427    Param.Action=rmfield(Param.Action,'RunMode');%remove from the recorded xml file to avoid interference during ImportConfig
    14241428end
    14251429ActionExt='.m';%default
    14261430if isfield(Param.Action,'ActionExt')
    14271431    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
    14281433end
    14291434ActionName=Param.Action.ActionName;
    14301435ActionPath=Param.Action.ActionPath;
     1436
    14311437path_series=fileparts(which('series'));
    14321438
     
    14831489
    14841490%% 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 % end
    14931491if strcmp(ActionExt,'.sh')
    14941492    TransformPath='';
     
    15061504            currentdir=pwd;
    15071505            cd(get(handles.ActionPath,'String'))% go to the directory of Action
    1508             %  addpath(get(handles.TransformPath,'String'))
    15091506            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'
    15111507            compile(ActionName,TransformPath)
    15121508            cd(currentdir)
     
    15231519                currentdir=pwd;
    15241520                cd(get(handles.ActionPath,'String'))% go to the directory of Action
    1525                 %  addpath(get(handles.TransformPath,'String'))
    15261521                addpath(path_uvmat)% add the path to uvmat to run the fct 'compile'
    15271522                addpath(fullfile(path_uvmat,'transform_field'))% add the path to uvmat to run the fct 'compile'
     
    23302325                set(handles.VelType,'visible','on')
    23312326        end
     2327        set(handles.FieldName,'Value',1)
     2328        set(handles.FieldName,'String',[FieldList; {'get_field...'}]);
    23322329        if ~strcmp(GetFieldData.FieldOption,'civdata...')
     2330            set(handles.FieldName,'Value',[1:numel(FieldList)])%select all input fields by default
    23332331            set(handles.VelType,'visible','off')
    23342332            XName=GetFieldData.Coordinates.Coord_x;
     
    23532351            end
    23542352        end
    2355         set(handles.Coord_x,'String',{XName})
     2353                set(handles.Coord_x,'String',{XName})
    23562354        set(handles.Coord_y,'String',YName)
    2357         set(handles.FieldName,'Value',1)
    2358         set(handles.FieldName,'String',[FieldList; {'get_field...'}]);
    23592355    end
    23602356end
     
    28022798    fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters
    28032799    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       
    28042805    if isfield(Param,'ActionInput')%  introduce  parameters specific to an Action fct, for instance PIV parameters
    28052806        set(handles.ActionInput,'Visible','on')
Note: See TracChangeset for help on using the changeset viewer.