Closed ghost closed 4 years ago
Hi Ramiro, I think it would be helpful if you included the full function definition here.
Btw, were you able to verify in the mean time that your function does what you want it to do? I would start with that before trying to fit anything
First step could be to just verify the function values (define a source with this morphology, set the parameters, print the values at a few different energies/positions, change the parameter(s), print again etc).
Next step could be to make model maps for a few different values of your parameter(s).
I tried to develop a morphology lookup table very similar to
template_model.py
. In my case, I adapted the template model to read in FITS files to build a data frame of flux values that is multi-index by morphology parameters and information of energy, RA, and Dec. I first interpolate over the morphology parameters and then over energy, RA, and dec. The full program is here:My problem comes to running the fit for my model. When I try to make a fit using
JointLikelihood
, the parameters seem to be sent to the fitter, but thelogL
values do not changeThe first interpolation is done in this function
the parameter values are to evaluated to give an interpolated map and be used for interpolation over energy, RA, and dec
the function _interpolate gets called inside the evaluate function, and the self._interpolator should evalute the different values of energy, ra, and dec
here is an example of the problem using the diffusion coefficient as a fitting parameter
trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.5187e+26 -> logL = -11079569737.757 trial values: 3.3807e+26 -> logL = -11079569737.757 trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.5187e+26 -> logL = -11079569737.757 trial values: 3.3807e+26 -> logL = -11079569737.757 trial values: 4.0881e+26 -> logL = -11079569737.757 trial values: 2.7351e+26 -> logL = -11079569737.757 trial values: 4.3404e+26 -> logL = -11079569737.757 trial values: 2.395e+26 -> logL = -11079569737.757 trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.4501e+26 -> logL = -11079569737.757 trial values: 3.45e+26 -> logL = -11079569737.757 trial values: 3.4503e+26 -> logL = -11079569737.757 trial values: 3.4497e+26 -> logL = -11079569737.757 trial values: 3.453e+26 -> logL = -11079569737.757 trial values: 3.4471e+26 -> logL = -11079569737.757 trial values: 3.4798e+26 -> logL = -11079569737.757