Hi Mojo_ild
Your general approach is correct, your most recent model is good. no need to use DensityDist, just write the custom distribution in a class and call it with observed.
But you need the logp function to be written purely in Theano. I see you are using hyp1f1 from scipy which is numpy based, so you will need to write this in Theano manually.