Chixy chixy = new Chixy();
int j;
double amx,amn,scale,bmn,bmx,d1,d2,r2;
double[] ang = new double[7];
double[] ch = new double[7];
doubleW varx = new doubleW(0);
doubleW vary = new doubleW(0);
doubleW dum1 = new doubleW(0);
Moment.avevar(x,dum1,varx);
Moment.avevar(y,dum1,vary);
scale=sqrt(varx.val/vary.val);
for (j=0;j<ndat;j++) {