AkB2010 extended and adjusted for use in the new Swiss Hazard model [2014]

AkB2010 extended and adjusted for use in the new Swiss Hazard model [2014]
This method has to be rewritten. If I understand it correctly this could be a possible option:

c1_rrup = np.zeros_like(discs.rjb)

idx = dists.rjb < C['Rc11']
c1_rrup[idx] = C['phi_11']

idx = (dists.rjb >= C['Rc11']) & (dists.rjb <= C['Rc21'])
c1_rrup[idx] = C['phi_11'] + (C['phi_21'] - C['phi_11']) * \
                ((dists.rjb[idx] - C['Rc11']) / (C['Rc21'] - C['Rc11']))

idx = dists.rjb > C['Rc21']
c1_rrup[idx] = C['phi_21']