TMinuit, fitting thousands of Gaussians

hi folks,

I am running my spectrograph program on a new spectrograph, and of course surprises showed up.

We have this IFU spectrograph with 1300 fibers, and I am trying to determine center, sigma and amplitude for all of these fibers (1300) at all wavelengths (4096).

It normally works fine, but when I get far from the center, sometimes the solution starts to bounce back and forth between two minima, like this:

center sigma amplitude
11.418597 3.937581 10316.810710
11.613498 2.697872 10862.134468
11.372858 3.896962 10279.177779
11.525734 2.393638 10785.292080
11.625337 2.765837 10744.202063
11.399946 3.849835 10366.270150
11.514934 2.317529 11099.356812
11.600127 2.718315 10819.541837

  1. this does not happen for the well focused central fibers which have a nice Gaussian profile

  2. I ran exactly the same fits using gnuplot and iraf, their solutions agree with each other and with my low sigma root solution, no bouncing ever.

  3. In root I normally use MIGRAD which is what I have always used and should be best. But I also tried SIMPLEX and I also tried using IMPROVE after running MIGRAD, I get the same problem, the solution bounces back and forth between these two minima.

  4. I know we have to get this thing focused over the entire ccd, period. But still it annoys me to see the solution jumping back and forth, it looks like I could do something to avoid this jumping - something that gnuplot and iraf apparently do :slight_smile:

any ideas most welcome.



There is no much you can do, Minuit will go in the closest local minimum. Which algorithm gnu plot uses for fitting ? Maybe you can try using one of the other minimizer algorithm provided by ROOT, like the genetic one which could be helpful.
See … idim_minim for using the various algorithm