Changeset 652 for trunk/src/plot_field.m


Ignore:
Timestamp:
Jun 25, 2013, 7:15:42 PM (11 years ago)
Author:
sommeria
Message:

bug corrected for reading low resolution color image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plot_field.m

    r651 r652  
    904904    if ~CheckContour
    905905        % interpolate field to increase resolution of image display
    906         test_interp=1;
    907         if max(np) <= 64
    908             npxy=8*np;% increase the resolution 8 times
    909         elseif max(np) <= 128
    910             npxy=4*np;% increase the resolution 4 times
    911         elseif max(np) <= 256
    912             npxy=2*np;% increase the resolution 2 times
    913         else
    914             npxy=np;
    915             test_interp=0; % no interpolation done
    916         end
    917         if test_interp==1%if we interpolate
     906        test_interp=0;
     907        if size(B,3)==1 % scalar of B/W image
     908            test_interp=1;
     909            if max(np) <= 64
     910                npxy=8*np;% increase the resolution 8 times
     911            elseif max(np) <= 128
     912                npxy=4*np;% increase the resolution 4 times
     913            elseif max(np) <= 256
     914                npxy=2*np;% increase the resolution 2 times
     915            else
     916                npxy=np;
     917                test_interp=0; % no interpolation done
     918            end
     919        end
     920        if test_interp%if we interpolate
    918921            x=linspace(AX(1),AX(2),np(2));
    919922            y=linspace(AY(1),AY(2),np(1));
Note: See TracChangeset for help on using the changeset viewer.