Changeset 867 for trunk/src/uvmat.m


Ignore:
Timestamp:
Feb 12, 2015, 9:31:47 PM (10 years ago)
Author:
sommeria
Message:

python option added in series and bug corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r866 r867  
    28182818        elseif ref_j_1<0
    28192819            errormsg='minimum j index reached';
    2820         elseif ref_i_1+1>size(UvData.i1_series{2},3)
     2820        elseif ref_i_1+1>size(UvData.i1_series{2},3)&&~isempty(InputFile.NomType_1)
    28212821            errormsg='maximum i index reached for the second series (reload the input file to update the index bound)';
    2822         elseif ref_j_1+1>size(UvData.i1_series{2},2)
     2822        elseif ref_j_1+1>size(UvData.i1_series{2},2)&&~isempty(InputFile.NomType_1)
    28232823            errormsg='maximum j index reached for the second series(reload the input file to update the index bound)';
    28242824        end
     
    28262826        siz=size(UvData.i1_series{2});
    28272827        ref_indices=ref_i_1*siz(1)*siz(2)+ref_j_1*siz(1)+1:ref_i_1*siz(1)*siz(2)+(ref_j_1+1)*siz(1);
    2828         i1_subseries=UvData.i1_series{2}(ref_indices);
    2829         ref_indices=ref_indices(i1_subseries>0);
    2830         if isempty(ref_indices)% case of pairs (free index i)
    2831             ref_indices=ref_i_1*siz(1)*siz(2)+1:(ref_i_1+1)*siz(1)*siz(2);
     2828        if ~isempty(InputFile.NomType_1)
    28322829            i1_subseries=UvData.i1_series{2}(ref_indices);
    28332830            ref_indices=ref_indices(i1_subseries>0);
    2834         end
    2835         i1_1=UvData.i1_series{2}(ref_indices(end));
    2836         if ~isempty(UvData.i2_series{2})
    2837             i2_1=UvData.i2_series{2}(ref_indices(end));
    2838         end
    2839         if ~isempty(UvData.j1_series{2})
    2840             j1_1=UvData.j1_series{2}(ref_indices(end));
    2841         end
    2842         if ~isempty(UvData.j2_series{2})
    2843             j2_1=UvData.j2_series{1}(ref_indices(end));
     2831            if isempty(ref_indices)% case of pairs (free index i)
     2832                ref_indices=ref_i_1*siz(1)*siz(2)+1:(ref_i_1+1)*siz(1)*siz(2);
     2833                i1_subseries=UvData.i1_series{2}(ref_indices);
     2834                ref_indices=ref_indices(i1_subseries>0);
     2835            end
     2836            i1_1=UvData.i1_series{2}(ref_indices(end));
     2837            if ~isempty(UvData.i2_series{2})
     2838                i2_1=UvData.i2_series{2}(ref_indices(end));
     2839            end
     2840            if ~isempty(UvData.j1_series{2})
     2841                j1_1=UvData.j1_series{2}(ref_indices(end));
     2842            end
     2843            if ~isempty(UvData.j2_series{2})
     2844                j2_1=UvData.j2_series{1}(ref_indices(end));
     2845            end
    28442846        end
    28452847    else% the second series (if needed) is the same file as the first
     
    36003602%% get bounds and dimensions of the input field
    36013603UvData.Field=find_field_bounds(UvData.Field);
    3602 
    36033604testnewseries=UvData.NewSeries;
    36043605UvData.NewSeries=0;% put to 0 the test for a new field series (set by RootPath_callback)
Note: See TracChangeset for help on using the changeset viewer.