Changeset 883 for trunk/src/series.m


Ignore:
Timestamp:
Mar 13, 2015, 8:19:39 PM (9 years ago)
Author:
sommeria
Message:

bugs corrected in series, transform functions with input parameters introduced, civ/deformation corrected (sign)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r882 r883  
    639639    set(handles.series,'UserData',[])%refresh the stored info
    640640end
    641 for iview=1:size(InputTable,1)
     641nbview=size(InputTable,1);
     642for iview=1:nbview
    642643    RootPath=fullfile(InputTable{iview,1},InputTable{iview,2});
    643644    if ~exist(RootPath,'dir')
    644645        i1_series=[];
    645         %RootPath=fileparts(RootPath); %will try the upper folder
    646646        RootFile='';
    647647    else %scan the input folder
     
    662662    end
    663663end
     664
     665%% update MinIndex_i and MaxIndex_i if the input table content has been reduced in line nbre
     666MinIndex_i_table=get(handles.MinIndex_i,'Data');%retrieve the min indices in the table MinIndex
     667set(handles.MinIndex_i,'Data',MinIndex_i_table(1:nbview,:));
     668MinIndex_j_table=get(handles.MinIndex_j,'Data');%retrieve the min indices in the table MinIndex
     669set(handles.MinIndex_j,'Data',MinIndex_j_table(1:nbview,:));
     670MaxIndex_i_table=get(handles.MaxIndex_i,'Data');%retrieve the min indices in the table MinIndex
     671set(handles.MaxIndex_i,'Data',MaxIndex_i_table(1:nbview,:));
     672MaxIndex_j_table=get(handles.MaxIndex_j,'Data');%retrieve the min indices in the table MinIndex
     673set(handles.MaxIndex_j,'Data',MaxIndex_j_table(1:nbview,:));
     674PairString=get(handles.PairString,'Data');%retrieve the min indices in the table MinIndex
     675set(handles.PairString,'Data',PairString(1:nbview,:));
     676TimeTable=get(handles.TimeTable,'Data');%retrieve the min indices in the table MinIndex
     677set(handles.TimeTable,'Data',TimeTable(1:nbview,:));
     678
    664679%% enable field and veltype menus, in accordance with the current action
    665680ActionName_Callback([],[], handles)
     
    766781    SeriesData.Time={};
    767782end
    768    SeriesData.i1_series(iview+1:end)=[];
     783if isfield(SeriesData,'i1_series')
     784    SeriesData.i1_series(iview+1:end)=[];
    769785    SeriesData.i2_series(iview+1:end)=[];
    770786    SeriesData.j1_series(iview+1:end)=[];
     
    773789    SeriesData.FileInfo(iview+1:end)=[];
    774790    SeriesData.Time(iview+1:end)=[];
    775  InputTable(iview,:)=[{RootPath},{SubDir},{RootFile},{NomType},{FileExt}];
     791end
     792InputTable(iview,:)=[{RootPath},{SubDir},{RootFile},{NomType},{FileExt}];
    776793if iview >1
    777794    set(handles.InputLine,'String',num2str(iview))
     
    14111428Param=read_GUI_series(handles);%displayed parameters
    14121429SeriesData=get(handles.series,'UserData');%hidden parameters
     1430if isfield(SeriesData,'TransformInput')
     1431    Param.TransformInput=SeriesData.TransformInput;
     1432end
    14131433if ~isfield(SeriesData,'i1_series')
    14141434    errormsg='The input field series needs to be refreshed: press REFRESH';
     
    24032423end
    24042424set(handles.OutputSubDir,'String',SubDirOut)
     2425set(handles.OutputSubDir,'BackgroundColor',[1 1 1])% set edit box to white color to indicate refreshment
    24052426set(handles.OutputDirExt,'Visible',OutputDirVisible)
    24062427set(handles.OutputSubDir,'Visible',OutputDirVisible)
     
    29712992set(handles.TransformName,'UserData',TransformPathList);
    29722993
     2994%% create the function handle of the selected fct
     2995if ~isempty(TransformName)
     2996    current_dir=pwd;%current working dir
     2997    cd(TransformPathList{TransformIndex})
     2998    transform_handle=str2func(TransformName);
     2999    cd(current_dir)
     3000    Field.Action.RUN=0;% indicate that the transform fct is called only to get input param
     3001    DataOut=feval(transform_handle,Field,[]);% execute the transform fct to get the required conditions
     3002    if isfield(DataOut,'TransformInput')%  used to add transform parameters at selection of the transform fct
     3003        SeriesData=get(handles.series,'UserData');
     3004        SeriesData.TransformInput=DataOut.TransformInput;
     3005        set(handles.series,'UserData',SeriesData)
     3006    end
     3007end
     3008
    29733009%------------------------------------------------------------------------
    29743010% --- fct activated by the upper bar menu ExportConfig
     
    30343070    Param.ActionInput.ConfigSource=filexml;% record the source of config for future info
    30353071    SeriesData.ActionInput=Param.ActionInput;
     3072end
     3073if isfield(Param,'TransformInput')%  introduce  parameters specific to a transform fct
     3074    SeriesData.TransformInput=Param.TransformInput;
    30363075end
    30373076if isfield(Param,'ProjObject') %introduce projection object if relevant
     
    34713510    set(handles.InputTable,'Data',InputTable);
    34723511end
     3512set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refr
    34733513
    34743514
Note: See TracChangeset for help on using the changeset viewer.