To followup, I’ve had a bit of success when I implement the potential as follows:
pm.Potential(‘phi_e_potential’, np.exp(-var_alpha*S1_phi_e))
However, I get “ValueError: Bad initial energy: nan. The model might be misspecified.” when the initial value is not properly specified