Changeset 719 for trunk


Ignore:
Timestamp:
Feb 26, 2014, 9:33:47 PM (10 years ago)
Author:
sommeria
Message:

corrrections to series

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r715 r719  
    245245%% introduce the input file name(s) if defined from input Param
    246246if isfield(Param,'FileName')&&~isempty(Param.FileName)
    247     %InputTable={'','','','',''}; % refresh the file input table
    248     InputTable={}
     247    InputTable={};
    249248    set(handles.InputTable,'Data',InputTable)
    250249    if isfield(Param,'FileName_1')
     
    318317end
    319318%% launch the browser
    320 fileinput=uigetfile_uvmat('pick a file to append in the input table',oldfile);
    321 if ~isempty(fileinput)
    322       display_file_name(handles,fileinput,'one')
     319fileinput=uigetfile_uvmat('pick an input file in the series',oldfile);
     320hh=dir(fileinput);
     321if numel(hh)>1
     322    msgbox_uvmat('ERROR','invalid input, probably a broken link');
     323else
     324    if ~isempty(fileinput)
     325        display_file_name(handles,fileinput,'one')
     326    end
    323327end
    324328
     
    348352%% launch the browser
    349353fileinput=uigetfile_uvmat('pick a file to append in the input table',oldfile);
    350 if ~isempty(fileinput)
     354hh=dir(fileinput);
     355if numel(hh)>1
     356    msgbox_uvmat('ERROR','invalid input, probably a broken link');
     357else
     358    if ~isempty(fileinput)
    351359        display_file_name(handles,fileinput,'append')
     360    end
    352361end
    353362
     
    936945
    937946%% enable j index visibility
    938 %check_jindex=~isempty(find(~cellfun(@isempty,SeriesData.j1_series))); %look for non empty j indices
    939947status_j='on';%default
    940948if isempty(find(~cellfun(@isempty,SeriesData.j1_series), 1)); % case of empty j indices
    941949    status_j='off'; % no j index needed
    942950elseif strcmp(get(handles.PairString,'Visible'),'on')
    943         PairString=get(handles.PairString,'Data');       
    944         check_burst=cellfun(@isempty,regexp(PairString,'^j'));%=0 for burst case, 1 otherwise
    945  %   check_nopair=cellfun(@isempty,PairString);
    946     if isempty(find(check_burst, 1))% if all pair string begins by j (burst)
     951    PairString=get(handles.PairString,'Data');
     952    check_burst=cellfun(@isempty,regexp(PairString,'^j'));%=0 for burst case, 1 otherwise
     953    if isempty(find(check_burst, 1))% if all pair string begins by j (burst)
    947954        status_j='off'; % no j index needed for bust case
    948955    end
     
    954961Position=get(handles.FileStatus,'Position');
    955962set(handles.FileStatus,'Units','normalized')
    956 xI=0.5:Position(3)-0.5;
     963%xI=0.5:Position(3)-0.5;
    957964nbview=numel(SeriesData.i1_series);
    958965j_max=cell(1,nbview);
     
    964971    MaxIndex_i(iview)=max(find(j_max{iview}))-1;% max ref index i
    965972    MinIndex_i(iview)=min(find(j_max{iview}))-1;% min ref index i
    966 %     pair_max{iview}=squeezSeriesData.i1_series{iview},[],1)); %max on pair index
    967 %     if (strcmp(get(handles.num_first_j,'Visible'),'off')&& size(pair_max{iview},2)~=1)
    968 %         pair_max{iview}=squeeze(max(pair_max{iview},[],1)); % consider only the i index
    969 %     end
    970973end
    971974MinIndex_i=min(MinIndex_i);
     
    19671970update_waitbar(handles.Waitbar,0)
    19681971
    1969 %% default setting for the visibility of the GUI elements
    1970 % set(handles.FieldTransform,'Visible','off')
    1971 % set(handles.CheckObject,'Visible','off');
    1972 % set(handles.ProjObject,'Visible','off');
    1973 % set(handles.CheckMask,'Visible','off')
    1974 % set(handles.Mask,'Visible','off')
    1975 
    19761972%% create the function handle for Action
    19771973path_series=which('series');
     
    20102006    nb_netcdf=numel(find(strcmp('netcdf',SeriesData.FileType)));
    20112007end
    2012 %menu={''};
    20132008if numel(iview_civ)>=1
    20142009    menu=set_veltype_display(SeriesData.FileInfo{iview_civ(1)}.CivStage,SeriesData.FileType{iview_civ(1)});
     
    20652060            set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;
    20662061end
     2062
     2063%% hide j index if useful (for civ in burst mode)
     2064if isfield(ParamOut,'Hide_j_index')&&isequal(ParamOut.Hide_j_index,'on')
     2065    status_j='off';% no j index visible
     2066else
     2067    status_j='on';%default
     2068    if isempty(find(~cellfun(@isempty,SeriesData.j1_series), 1)); % case of empty j indices
     2069        status_j='off'; % no j index needed
     2070    elseif strcmp(get(handles.PairString,'Visible'),'on')
     2071        PairString=get(handles.PairString,'Data');
     2072        check_burst=cellfun(@isempty,regexp(PairString,'^j'));%=0 for burst case, 1 otherwise
     2073        if isempty(find(check_burst, 1))% if all pair string begins by j (burst)
     2074            status_j='off'; % no j index needed for bust case
     2075        end
     2076    end
     2077end
     2078enable_j(handles,status_j) % no j index needed
    20672079
    20682080%% NbSlice visibility
Note: See TracChangeset for help on using the changeset viewer.