'One dimensional Box model function'

@staticmethod
def evaluate(x, amplitude, x_0, width):

    inside = np.logical_and((x >= (x_0 - (width / 2.0))), (x <= (x_0 + (width / 2.0))))
    result = np.select([inside], [amplitude], 0)
    if isinstance(amplitude, Quantity):
        return Quantity(result, unit=amplitude.unit, copy=False)
    else:
        return result
