Changeset 28099


Ignore:
Timestamp:
02/15/24 05:56:35 (14 months ago)
Author:
Mathieu Morlighem
Message:

CHG: do not error out when calling log with 0 speed, just spit out a warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/processdata.m

    r26352 r28099  
    173173                data(find(data<bounds(1)))=bounds(1);
    174174                if any(data<=0),
    175                         error('Log option cannot be applied on negative values. Use caxis option (Rignot''s settings: [1.5 max(data)])');
     175                        warning('Log option cannot be applied on negative values. Using 1 as default, otherwise use ''caxis'' option');
     176                        data(find(data<0)) = 1;
    176177                end
    177178                pos=find(~isnan(data));
     
    203204                data(find(data<bounds(1)))=bounds(1);
    204205                if any(data<=0),
    205                         error('Log option cannot be applied on negative values. Use caxis option (Rignot''s settings: [1.5 max(data)])');
     206                        warning('Log option cannot be applied on negative values. Using 1 as default, otherwise use ''caxis'' option');
     207                        data(find(data<0)) = 1;
    206208                end
    207209                pos=find(~isnan(data));
Note: See TracChangeset for help on using the changeset viewer.