# NLLoc covariance and errors

Hello, thanks for all of your work.

I was wondering if anyone could explain to me why within the `obspy.io.nlloc.core` function `_read_single_hypocenter` the longitude, latitude and depth errors are calculated as sqrt(covariance) rather than as suggested in the NLLoc documentation (below)? Any guidence would be appreciated!

From the NonLinLoc 7.0 documentation FAQ http://alomax.free.fr/nlloc/:

How can I obtain the horizontal and 3D standard errors for the PDF scatter sample?
The 2D horizontal errors along the major and minor axes of the horizontal ellipsoid are available in the NLLoc Hypocenter-Phase file: see QML_OriginUncertainty Line.

More generally, the 3D x, y, z errors can be calculated from the covariances in the NLLoc Hypocenter-Phase file STATISTICS line:

double errx = sqrt(DELTA_CHI_SQR_68_3 * cov.xx);
double erry = sqrt(DELTA_CHI_SQR_68_3 * cov.yy);
double errz = sqrt(DELTA_CHI_SQR_68_3 * cov.zz);

where DELTA_CHI_SQR_68 is 3.53, (value for 68% conf, see Num Rec, 2nd ed, sec 15.6, table)

And the 2D x, y errors can be calculated from the covariances in the NLL STATISTICS line:

double errx = sqrt(DELTA_CHI_SQR_68_2 * cov.xx);
double erry = sqrt(DELTA_CHI_SQR_68_2 * cov.yy);

where DELTA_CHI_SQR_68_2 is 2.30, (value for 68% conf, see Num Rec, 2nd ed, sec 15.6, table)