Changeset 20511 for issm/trunk-jpl/src/m/plot/processdata.js
- Timestamp:
- 04/14/16 19:12:45 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/processdata.js
r19888 r20511 191 191 throw Error("Log option cannot be applied on negative values. Use caxis option (Rignot''s settings: [1.5 max(data)])"); 192 192 } 193 193 for(var i=0;i<md.mesh.numberofvertices;i++){ 194 194 data[i]=Math.log10(data[i])/Math.log10(options.getfieldvalue('log')); 195 195 } 196 196 } 197 197 } … … 200 200 if (datasize==md.mesh.numberofvertices+1){ 201 201 datatype=5; 202 203 //log? 204 if (options.exist('log')){ 205 var bounds=options.getfieldvalue('caxis',[ArrayMin(data),ArrayMax(data)]); 206 for(var i=0;i<md.mesh.numberofvertices;i++) { 207 for(var j=0;j<data[i].length;j++) { 208 if(data[i][j]<bounds[0])data[i][j]=bounds[0]; 209 } 210 } 211 for(var i=0;i<md.mesh.numberofvertices;i++) { 212 for(var j=0;j<data[i].length;j++) { 213 if(data[i][j]>bounds[1])data[i][j]=bounds[1]; 214 } 215 } 216 for(var i=0;i<md.mesh.numberofvertices;i++) { 217 for(var j=0;j<data[i].length;j++) { 218 if(data[i][j]<=0) { 219 throw Error("Log option cannot be applied on negative values. Use caxis option (Rignot''s settings: [1.5 max(data)])"); 220 } 221 } 222 } 223 for(var i=0;i<md.mesh.numberofvertices;i++){ 224 for(var j=0;j<data[i].length;j++) { 225 data[i][j]=Math.log10(data[i][j])/Math.log10(options.getfieldvalue('log')); 226 } 227 } 228 } 202 229 } 203 230
Note:
See TracChangeset
for help on using the changeset viewer.