def _ordinate(data):
    """
    Determine interpolation ordinate for the dataset.  This is Qz for 1-D data
    but theta for n-D data (since Q varies across the detector).
    """
    if data.Qz.ndim == 1:
        return data.Qz
    # This is similar to code in Refldata.Qz ...
    if data.Qz_basis == 'actual':
        return data.sample.angle_x
    if data.Qz_basis == 'target':
        return data.sample.angle_x_target
    if data.Qz_basis == 'detector':
        return data.sample.detector_x/2
    if data.Qz_basis == 'sample':
        return data.sample.angle_x
    raise KeyError("Qz basis must be one of [actual, detector, sample, target]")