View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

n2gaussfit not fitting all parameters … why?

Lowell Tacconi-Garman wrote on Jun 29, 2010

Perhaps I'm doing something stupid, but I'm having a problem with n2gaussfit in that it doesn't seem to fit all the parameters. Specifically, it seems that FWHM, Ellip., and Theta remain constant for all fitting that I do. Below you will find my params for n2gaussfit and tgausspars. Following that are three example input lines and their corresponding output values. Any ideas why this is failing?


    fitting> lpar n2gaussfit

    input = "cont_Pm180[258:278,966:986]" >image(s) to fit
    output = "n2gaussfit.db" >output table
    (rt = no) >get initial guess from table ?
    (tablein = "") >table with initial guess
    (row = 1) >row from which to take initial guess
    (tgausspars = "") >pset for 2-d Gaussian
    (errorpars = "") pset for error-related parameters
    (controlpars = "") pset for algorithm control parameters
    (verbose = yes) >display results ?
    (averbose = yes) >display iteration info ?
    (version = "05May91") >date of installation
    (mode = "al")

    fitting> lpar tgausspars

    (a = 0.) >initial guess for background
    (ampl = INDEF) >initial guess for peak amplitude
    (xcent = INDEF) >initial guess for X center position
    (ycent = INDEF) >initial guess for Y center position
    (fwhm = INDEF) >initial guess for fwhm
    (ellip = INDEF) >initial guess for ellipticity
    (theta = INDEF) >initial guess for position angle (degrees)
    (boxsize = 21) >box size
    (va = yes) >vary background ?
    (vampl = yes) >vary amplitude ?
    (vxcent = yes) >vary X center ?
    (vycent = yes) >vary Y center ?
    (vfwhm = yes) >vary fwhm ?
    (vellip = yes) >vary ellip ?
    (vtheta = yes) >vary theta ?
    (version = "12Jul90") >date of installation
    (mode = "h")


To illustrate the point, the three lines:


    n2gaussfit(input="line+cont_Pm180[430:450,106:126]",output="n2gaussfit.db")
    n2gaussfit(input="line+cont_Pm180[633:653,047:067]",output="n2gaussfit.db")
    n2gaussfit(input="line+cont_Pm180[502:522,502:522]",output="n2gaussfit.db")


produce


    fitting> prfit n2gaussfit.db

    Original file: line+cont_Pm180[430:450,10
    Time: Mon 15:08:36 28-Jun-2010
    Row: 38
    Function: twodgaus chi-square: 20.01 rms: 4.507928
    Units: Auto npts: 441
    Ampl. = 16.08 X = 10.96 FWHM = 0.2
    Back. = -3.712 Y = 10.95 Ellip = 0.1
    Ang. = 1146.

    Original file: line+cont_Pm180[633:653,04
    Time: Mon 15:08:36 28-Jun-2010
    Row: 39
    Function: twodgaus chi-square: 13.8 rms: 3.743816
    Units: Auto npts: 441
    Ampl. = 12.65 X = 10.99 FWHM = 0.2
    Back. = -2.864 Y = 11.97 Ellip = 0.1
    Ang. = 1146.

    Original file: line+cont_Pm180[502:522,50
    Time: Mon 15:08:36 28-Jun-2010
    Row: 40
    Function: twodgaus chi-square: 59409. rms: 245.6183
    Units: Auto npts: 441
    Ampl. = 2076. X = 11.01 FWHM = 0.2
    Back. = 15.14 Y = 11. Ellip = 0.1
    Ang. = 1146.

Last post on Jun 29, 2010