def get_box_delta(halfwidth):
    """
    Transform from halfwidth (arcsec) to the box_delta value which gets added
    to failure probability (in probit space).

    :param halfwidth: scalar or ndarray of box sizes (halfwidth, arcsec)
    :returns: box deltas
    """
    # Coefficents for dependence of probability on search box size (halfwidth).  From:
    # https://github.com/sot/skanb/blob/master/pea-test-set/fit_box_size_acq_prob.ipynb
    B1 = 0.96
    B2 = -0.30

    box120 = (halfwidth - 120) / 120  # normalized version of box, equal to 0.0 at nominal default
    box_delta = B1 * box120 + B2 * box120 ** 2

    return box_delta