Changeset 639 for trunk/src


Ignore:
Timestamp:
May 21, 2013, 1:14:02 AM (12 years ago)
Author:
sommeria
Message:

introduction of mask on projection: fct mask_proj

Location:
trunk/src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_file_series.m

    r635 r639  
    5858        end
    5959    end
    60    
    61     if isempty(incr_i) || isempty(incr_j) || isequal(r(1).mode,'*-*')% free pairs
     60    
     61    if isempty(incr_i) || isempty(incr_j) || isequal(r(1).mode,'*-*')|| isequal(r(1).mode,'*|*')% free pairs or increment
    6262        FilePath=fullfile(InputTable{iview,1},InputTable{iview,2});
    6363        fileinput=[InputTable{iview,3} InputTable{iview,4} InputTable{iview,5}];
     
    6565            i1_input,i2_input,j1_input,j2_input]=find_file_series(FilePath,fileinput);
    6666        i1_series{iview}=squeeze(i1_series{iview}(1,:,:)); %select first  pair index as ordered by find_file_series
     67        i2_series{iview}=squeeze(i2_series{iview}(1,:,:)); %select first  pair index as ordered by find_file_series
    6768        j1_series{iview}=squeeze(j1_series{iview}(1,:,:)); %first  pair index
    6869        j2_series{iview}=squeeze(j2_series{iview}(1,:,:)); %second  pair index
    69         %check_select=i1_series{iview}>=first_i & i1_series{iview}<=last_i;
    7070        if isempty(incr_i)
    71             if isempty(incr_j)
     71            if isempty(first_j) || isempty(incr_j) % no j index or no defined increment for j
    7272                [ref_j,ref_i]=find(i1_series{iview});
    7373                ref_i=ref_i-1;
     
    8383        else
    8484            ref_i=first_i:incr_i:last_i;%default
    85             if isempty(incr_j)
     85            if isempty(first_j) ||isempty(incr_j)% no j index or no defined increment for j
    8686                [ref_j,tild]=find(i1_series{iview});
    8787                ref_j=ref_j-1;
     
    9191            end
    9292        end
    93         i1_series{iview}=i1_series{iview}(ref_j,ref_i);
    94         j1_series{iview}=j1_series{iview}(ref_j,ref_i);
    95         if ~isempty(j2_series{iview})
    96         j2_series{iview}=j2_series{iview}(ref_j,ref_i);
     93        if isempty(ref_j)
     94            i1_series{iview}=i1_series{iview}(2,ref_i+1);
     95            if ~isempty(i2_series{iview})
     96                i2_series{iview}=i2_series{iview}(2,ref_i+1);
     97            end
     98        else
     99            i1_series{iview}=i1_series{iview}(ref_j+1,ref_i+1);
     100            if ~isempty(i2_series{iview})
     101                i2_series{iview}=i2_series{iview}(ref_j+1,ref_i+1);
     102            end
     103        end
     104        if ~isempty(j1_series{iview})
     105            j1_series{iview}=j1_series{iview}(ref_j+1,ref_i+1);
     106            if ~isempty(j2_series{iview})
     107                j2_series{iview}=j2_series{iview}(ref_j+1,ref_i+1);
     108            end
    97109        end
    98110    else
    99111        ref_i=first_i:incr_i:last_i;%default
    100112        ref_j=first_j:incr_j:last_j;%default
    101     end
    102     if ~isequal(r(1).mode,'*-*')% imposed pairs or single i and/or j index
    103113        [i1_series{iview},i2_series{iview},j1_series{iview},j2_series{iview}]=find_file_indices(ref_i,ref_j,str2num(r.num1),str2num(r.num2),r.mode);
    104114    end
     115    %     if ~isequal(r(1).mode,'*-*')% imposed pairs or single i and/or j index
     116    %         [i1_series{iview},i2_series{iview},j1_series{iview},j2_series{iview}]=find_file_indices(ref_i,ref_j,str2num(r.num1),str2num(r.num2),r.mode);
     117    %     end
    105118   
    106     %case of pairs (.nc files)
     119    %list of files
    107120    i2=[];j1=[];j2=[];
    108121    for ifile=1:numel(i1_series{iview})
  • trunk/src/series.m

    r638 r639  
    907907set(handles.FileStatus,'CData',CData);
    908908
    909 
    910 %% enable field and veltype menus, in accordance with the current action
    911 ActionName_Callback([],[], handles)
    912 
    913909%% check for pair display
    914910check_pairs=0;
     
    925921    set(handles.PairString,'Visible','off')
    926922end
     923
     924
     925%% enable field and veltype menus, in accordance with the current action
     926ActionName_Callback([],[], handles)
    927927
    928928%% set length of waitbar
     
    20862086    MaskVisible=ParamOut.Mask;
    20872087end
    2088 set(handles.Mask,'Visible',MaskVisible)
     2088%set(handles.Mask,'Visible',MaskVisible)
    20892089set(handles.CheckMask,'Visible',MaskVisible);
    20902090
     
    24072407
    24082408if get(handles.CheckMask,'Value')
     2409    set(handles.Mask,'Visible','on')
    24092410    InputTable=get(handles.InputTable,'Data');
    24102411    defaultname=InputTable{1,1};
     
    24142415    end
    24152416else
     2417    set(handles.Mask,'Visible','off')
    24162418    set(handles.Mask,'String','')
    24172419end
Note: See TracChangeset for help on using the changeset viewer.