def ppm_error(axis, xref, mzref):
    """
    computes the error from a array of positions (xref) and the theoretical m/z (mzref)
    returns an array with errors in ppm
    xref : array of point coordinates of the reference points
    mzref: array of reference m/z
    """
    return 1000000.0 * (axis.itomz(xref) - mzref) / mzref
