View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

daophot psf does not react to colon commands

hansmor wrote on Apr 13, 2010

Hi,

I try to find a PSF for my crowded field photometry with the daophot psf task.
My first results look really bad, so I want to change the parameters, e.g. try different functions.

I thought I could try a function, change it with a colon command and see what fits better:

   
Fitting function lorentz    norm scatter: 0.03348998

Analytic PSF fit 
    Function: lorentz  X: 511.5  Y: 511.5  Height: 15421.59  Psfmag: 15.804
    Par1: 1.836041  Par2: 1.690642  Par3: -0.003770575

Computed 1 lookup table(s)
:function
function = gauss

Fitting function lorentz    norm scatter: 0.03348998

Analytic PSF fit 
    Function: lorentz  X: 511.5  Y: 511.5  Height: 15421.59  Psfmag: 15.804
    Par1: 1.836041  Par2: 1.690642  Par3: -0.003770575

Computed 1 lookup table(s)


It seems, that changing the function did not do anything. I experienced the same for other parameters e.g. psfrad and fitrad

Is there another command I have to give to make make changes take effect for the next fit?

Cheers,

Hans Moritz

Mike Fitzpatrick wrote on Apr 13, 2010

Hans,

Thanks for the report. Indeed, there was a bug in the code that wasn't properly saving the modified function value before doing the new fit. This has been fixed for the next release and if you need a patched binary sooner just let me know what platform you're using.

Otherwise, I didn't see a problem with changing the e.g. fitrad/psfrad parameters. Could you provide an example that demonstrates the problem you were seeing? Remember, you need to type 'f' manually to refit the psf after changing settings.

-Mike

hansmor wrote on Apr 13, 2010

Hi Mike,
thanks for the fast reply.
Here is an example for changing psfrad to three different values. Yet, the fits are identical to at least five digits. Either the fit really does not care about the parameter (but why is norm scatter constant in this case?) or there is something wrong.


:psfrad
psfrad = 22. scale units

Fitting function lorentz    norm scatter: 0.03348998

Analytic PSF fit 
    Function: lorentz  X: 511.5  Y: 511.5  Height: 15421.59  Psfmag: 15.804
    Par1: 1.836041  Par2: 1.690642  Par3: -0.003770575

Computed 1 lookup table(s)
:psfrad 1.
:psfrad
psfrad = 1. scale units

Fitting function lorentz    norm scatter: 0.03348993

Analytic PSF fit 
    Function: lorentz  X: 511.5  Y: 511.5  Height: 15421.64  Psfmag: 15.804
    Par1: 1.836037  Par2: 1.690639  Par3: -0.003770623

Computed 1 lookup table(s)
:psfrad 10.

Fitting function lorentz    norm scatter: 0.03348993

Analytic PSF fit 
    Function: lorentz  X: 511.5  Y: 511.5  Height: 15421.64  Psfmag: 15.804
    Par1: 1.836037  Par2: 1.690639  Par3: -0.003770623

Computed 1 lookup table(s)


Thanks for fixing the function bug. For now I will just start psf setting different functions as a workaround and save out sysadmins the work to change the binaries (they usually build everything from the source).

Cheers,

Hans

Mike Fitzpatrick wrote on Apr 13, 2010

It may be something about the data itself or perhaps the function being used, but here's my output showing more substantial differences:


Current PSF star list
    Star:  106  X:  441.96 Y:  409.66  Mag:   13.96  Sky:       44.4
    Star:    3  X:  465.56 Y:   62.12  Mag:   14.27  Sky:       73.7


Fitting function gauss    norm scatter: 0.02507865

Analytic PSF fit 
    Function: gauss  X: 255.5  Y: 255.5  Height: 5212.001  Psfmag: 13.96
    Par1: 1.270687  Par2: 1.217119

Computed 1 lookup table(s)


fitrad = 3. scale units
:fitrad 20

Fitting function gauss    norm scatter: 0.006434204

Analytic PSF fit 
    Function: gauss  X: 255.5  Y: 255.5  Height: 5327.188  Psfmag: 13.96
    Par1: 1.298189  Par2: 1.244338


This was done using the dev$ypix standard test image, I see similar differences with other functions as well.

Last post on Apr 13, 2010