Changeset 19415 for trunk/FACT++/www/viewer
- Timestamp:
- 12/05/18 16:56:26 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/viewer/index.js
r19370 r19415 3 3 // ========================================================================== 4 4 5 var camera_type = "FAMOUS"; 6 7 var scale = camera_type=="FACT" ? 83 : 22; 8 var npix = camera_type=="FACT" ? 1440 : 64; 5 var camera_type = "FACT"; 6 7 var scale = camera_type=="FACT" ? 83 : 22; 8 var npix = camera_type=="FACT" ? 1440 : 64; 9 var diameter = camera_type=="FACT" ? 0.1111 : 1.5; 10 var center = camera_type=="FACT" ? [0.5,0] : [0,0] 9 11 10 12 function onRightMouseClick(event) … … 260 262 } 261 263 else 264 { 265 $(document.getElementById("file").value ? '#event' : '#file').focus(); 262 266 setFileChecks(); 267 } 263 268 } 264 269 … … 293 298 var sqrt32 = Math.sqrt(3)/2; 294 299 295 var arr = [ new Array( 1440), new Array(1440) ];296 297 for (var i=0; i< 1440; i++)298 { 299 arr[0][i] = coord[i][0]* 0.1111;300 arr[1][i] = coord[i][1]* 0.1111*sqrt32;300 var arr = [ new Array(npix), new Array(npix) ]; 301 302 for (var i=0; i<npix; i++) 303 { 304 arr[0][i] = coord[i][0]*diameter; 305 arr[1][i] = coord[i][1]*diameter*sqrt32; 301 306 } 302 307 … … 372 377 373 378 $(document).ajaxStart(function() { disableControls(true) }).ajaxStop(function() { disableControls(false); }); 374 375 379 376 380 $.ajax({ … … 836 840 return; 837 841 838 if (!f.type.match('text/plain') && !f.type.match(' application/javascript') && !f.type.match('application/x-javascript'))842 if (!f.type.match('text/plain') && !f.type.match('text/javascript') && !f.type.match('application/javascript') && !f.type.match('application/x-javascript')) 839 843 { 840 844 alert("ERROR - Unknown file type: "+f.type); … … 1368 1372 1369 1373 if (hue<0) 1370 return "e ef"; // 5551374 return "e5f"; // 555 1371 1375 1372 1376 if (hue>1) 1373 return " dde";//"700"; // 6661377 return "600";//"dde";//"700"; // 666 1374 1378 1375 1379 hue *= 14; … … 1494 1498 1495 1499 ctx.beginPath(); 1496 ctx.moveTo( 0.5, 0);1500 ctx.moveTo(center[0], center[1]); 1497 1501 ctx.lineTo(h.mean[0], h.mean[1]); 1498 1502 … … 1594 1598 1595 1599 var cnt = 0; 1596 for (var i=0; i< 1440; i++)1600 for (var i=0; i<npix; i++) 1597 1601 { 1598 1602 if (data[i]===undefined || data[i]<min || data[i]>max) … … 1669 1673 "sumw": sz, 1670 1674 "count": cnt, 1671 "disp": 1.47/ 0.1111*(1-Math.sqrt(ratio)),1675 "disp": 1.47/diameter*(1-Math.sqrt(ratio)), 1672 1676 }; 1673 1677 }
Note:
See TracChangeset
for help on using the changeset viewer.