initial version of chi-sq ellipsoids. to be made exportable and general.