Commit 5529d6d4 authored by Tom Dwelly's avatar Tom Dwelly
Browse files

fixed bug related to flux scale. Previously the fluxes were plotted at too low...

fixed bug related to flux scale. Previously the fluxes were plotted at too low a level (due to incorrect use of the pady,padx parameters)
parent fe00f7f1
......@@ -503,7 +503,7 @@ function plotData() {
ctx.textAlign="center";
var zratio = (1. + znow)/(1. + modelz0);
var dx_inv = (xsize-padx)/(x1-x0);
var dy_inv = (ysize-padx)/(y1-y0);
var dy_inv = (ysize-2.*pady)/(y1-y0);
var dx2_inv = (xsize-padx)*(1.+znow)/(x1-x0);
ctx.clearRect (0 ,0,canvas.width, canvas.height);
ctx.strokeStyle = "#000000";
......@@ -1134,11 +1134,11 @@ document.body.addEventListener('mousedown', function (evt){
var ysize = canvas.height;
if ( mousePos.x >= 0.0 && mousePos.x <= xsize &&
mousePos.y >= 0.0 && mousePos.y <= ysize ) {
var dx = (x1-x0)/(xsize-padx);
var dy = (y1-y0)/(ysize-2.*pady);
var lobs = (mousePos.x - padx1)*dx + x0;
var flux = (ysize - mousePos.y - pady)*dy + y0;
var lrest = lobs / (znow + 1.);
var dl_dx = (x1-x0)/(xsize-padx);
var dflux_dy = (y1-y0)/(ysize-2.*pady);
var lobs = (mousePos.x - padx1)*dl_dx + x0;
var flux = (ysize - mousePos.y - pady)*dflux_dy + y0;
var lrest = lobs / (znow + 1.);
var str = sprintf("(%s,%s,F%s)=(%.2f%s, %.2f%s, %.2f%s)",
String.fromCharCode(955,8338), String.fromCharCode(955,7523), String.fromCharCode(955),
lobs,String.fromCharCode(8491),lrest,String.fromCharCode(8491),flux,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment