Hi Maurice, Maurice> I am importing a histogram I made in another program. I use Maurice> "define_counts" to make it into a spectrum I can fit with isis, and I Maurice> assume a perfect response, fitting individual lines as Gaussians. I can Maurice> define a Gaussian model with "fit_fun", preset parameter values to be I have done exactly that. Maurice> close to the best fit values using "set_par", and use "eval_counts" or Maurice> "renorm_counts" to make sure that the function evaluates, and Maurice> renormalize the line strength before fitting the centroid and width. So Maurice> far so good. Maurice> However, when I do "fit_counts", it doesn't fit the data, or it barely Maurice> changes the fit parameters. The one clue that something may be wrong is Is it very narrow? If you use a large sigma, does that shrink? How about if you use the subplex method? (a single Gaussian should fit w/ just about any method, but a subplex does a better search). Have you excluded all other histograms (if any)? Are the data integer valued? (that might matter if your uncertainties are expected to be integers). You can also use define_flux and fit_flux, if you have real-valued data. Maurice> that the "step" field is set to zero for all model parameters I want to Maurice> fit, even if I explicitly set it using "set_par". I have checked this I'll let John and Mike reply to "step" - I've never used it. Here's my quick test using an ideal case: (w1,w2) = linear_grid( 1.0, 20.0, 1024); y = exp( -(w1-10)^2 / 0.5^2 / 2) * 100; dy = sqrt(y); define_counts( w1, w2, y, dy ) ; set_par( 1, 1, 0, 0, 10000); set_par( 2, 10.5, 0, 9, 12); set_par( 3, 0.1, 0, 0.01, 1); fit_counts(Ideal_ARFRMF); -- Dave David Huenemoerder 617-253-4283 (o); -253-8084 (f); http://space.mit.edu/home/dph MIT Kavli Institute for Astrophysics and Space Research 70 Vassar St., NE80-6065, Cambridge, MA 02139 [Admin. Asst.: Elaine Tirrell, 617-253-7480, egt_at_email.domain.hidden ---- You received this message because you are subscribed to the isis-users list. To unsubscribe, send a message to isis-users-request_at_email.domain.hiddenwith the first line of the message as: unsubscribeReceived on Tue Jul 06 2010 - 19:53:06 EDT
This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:46 EDT