Changeset 17843 for trunk/FACT++/www
- Timestamp:
- 05/13/14 09:21:52 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/viewer/index.js
r17838 r17843 1412 1412 ctx.save(); 1413 1413 1414 ctx.scale(1, 2/Math.sqrt(3)); 1415 1414 1416 ctx.translate(h.mean[0], h.mean[1]); 1415 1417 ctx.rotate(h.phi); … … 1511 1513 return; 1512 1514 1515 // Coordinates need to be scaled in y 1516 var f = Math.sqrt(3)/2; 1517 1518 my *= f; 1519 mxy *= f; 1520 my2 *= f*f; 1521 1513 1522 var xx = mx2 - mx*mx/sz; 1514 1523 var yy = my2 - my*my/sz; … … 1527 1536 1528 1537 // Correction for scale in x 1529 var f = Math.sqrt(3)/2; 1530 var ratio = xx/yy/f; 1538 var ratio = xx/yy; 1531 1539 1532 1540 if (d1!=0 || d2==0) … … 1549 1557 axis1 /= s2; 1550 1558 axis2 /= s2; 1551 1552 ratio *= (f + tand*tand)/(tand*tand*f + 1);1553 1559 } 1554 1560 … … 1556 1562 var width = axis2<0 ? 0 : Math.sqrt(axis2/sz); 1557 1563 1558 //var r = (cos*cos*f + sin*sin)/(sin*sin*f + cos*cos);1559 1564 return { 1560 1565 "mean": [ mx/sz, my/sz ], … … 1564 1569 "sumw": sz, 1565 1570 "count": cnt, 1566 "disp": 1.4 2/0.1111*(1-Math.sqrt(ratio)),1571 "disp": 1.47/0.1111*(1-Math.sqrt(ratio)), 1567 1572 }; 1568 1573 }
Note:
See TracChangeset
for help on using the changeset viewer.