View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

nfit1d not showing user function properly?

Paul Boley wrote on Dec 05, 2008

Greetings,

I am trying to use nfit1d to fit a Moffat function [c1*(1.0 + ((x-c2)/c3)**(2.0))**c4] to some data. For some reason, only "half" of the function is plotted. See the picture below. Is this a known issue? The initial guesses used are the results of a fit obtained with another program. The function, as I've written it, is clearly symmetric. The plot is clearly not....

Paul

[img:85d3e09c3b]http://mira.as.arizona.edu/~pboley/images/nfit1d.png[/img:85d3e09c3b]

Paul Boley wrote on Dec 05, 2008

In fact inputting a gaussian as the user func has the same result; only the right half of the function is displayed. Using ngaussfit shows a full gaussian.

Mike Fitzpatrick wrote on Dec 05, 2008

Thanks for posting the plot, it clearly demonstrates the problem. Unfortunately, a quick look through the code doesn't show any obvious problem. I'd have to try to reproduce the error, but since this is an STSDAS task it may be more efficient to report it to the STScI helpdesk (help@stsci.edu) for a fix. Note there was just a release of the v3.9 version of the package but I couldn't find any changelog to indicate this was specifically fixed, and the FITTING package itself hasn't really changed during the v3.x releases.

The fitting and plotting code used by the NFIT1D task is the stuff included in STSDAS and not part of the core libraries so the ST helpdesk should be able to help.

-Mike

Last post on Dec 05, 2008