Problem with DAOPhot
craigswenson wrote on Jul 10, 2007
Warning: Image header parameter not found (FUNCTION)
I've been experimenting with the autoalign.cl script and I'm sure it must be changing something in my header, but I'm not sure how to fix/update my header. I haven't been able to find out what is being modified in my headers yet, because whatever it is isn't displayed in the regular "full" header.
DAOPhot works fine on my un-aligned frames, so there's nothing wrong with the headers until after the align script is run.
Any ideas would be appreciated.
Thank you.
Mike Fitzpatrick wrote on Jul 10, 2007
As you already know, allstar needs the header parameter FUNCTION, from
the psf image, to fit the psf for all other stars. This parameter is
written when you run the psf task, which gets the FUNCTION parameter
from 'daopars'.
If you take a look at the psf header, you should find parameters such
as PSFX, PSFY, PSFHEIGHT, and PSFMAG. These are accompanied by the
FUNCTION parameter.
If the FUNCTION parameter is missing, you should check that you have the
function type set in 'daopars' (see 'phelp daopars' for a list of
available functions). Also be sure that 'update' is set to 'yes' in the
daophot parameters (epar daophot).
Write back if you still have problems.
-Mike
craigswenson wrote on Jul 10, 2007
dvodonnell wrote on Jul 10, 2007
Any ideas?
Thanks.;.
Mike Fitzpatrick wrote on Jul 10, 2007
Pixel file "/tmp/foo.pix" [NO PIXEL FILE]then it means the pixel file associated with the .imh can't be found. This can happen when you move imh images between machines and forget to copy the .pix files, have an invalid 'imdir' so it couldn't be created, or the directory doesn't exist. You can HEDIT the 'i_pixfile' header parameter to reset this pathname and reconnect to the .pix file, otherwise check that your 'imdir' directory exists and you can write to it (the value is set in login.cl).
Updating/reading of headers should still be allowed, but sometimes errors cascade from some underlying reason like this and so may be bogus. Try fixing the pixel file problem first.
Cheers,
-Mike
dvodonnell wrote on Jul 10, 2007
I have both image.imh and image.pix in the directory, shouldn't it automatically detect it there?
If not, perhaps the problem is with my login.cl. Is there something that tells me what login.cl file IRAF is currently using (I have about 6 on my machine in various places...).
Thanks again for the help -- haven't used IRAF in a long time!
dvodonnell wrote on Jul 10, 2007
still getting the Function error however
Mike Fitzpatrick wrote on Jul 10, 2007
I have both image.imh and image.pix in the directory, shouldn't it automatically detect it there? [/quote[f not, perhaps the problem is with my login.cl. Is there something that tells me what login.cl file IRAF is currently using (I have about 6 on my machine in various places...). [/quote]
Only if the i_pixfile and your 'imdir' use "HDR$" to tell it to look in the same directory as the .imh file, otherwise it's an explicit path (with a node! prefix usually.
Do a "cl> show home". Note that certain paths are created by MKIRAF when writing the login.cl that may become invalid if what you do is simply copy the login.cl file to a new location rather than do a separate MKIRAF.
-Mike
dvodonnell wrote on Jul 10, 2007
if so, that's probably the problem here, because a psf pix file is not being generated, only a psf.imh.
Mike Fitzpatrick wrote on Jul 10, 2007
cl> reset imdir = HDR$
cl> flpr 0 # zero not oh
To reset it so the .pix is in the same dir as the .imh, and edit the login.cl to make the change for the next time.
-Mike
dvodonnell wrote on Jul 10, 2007
Really appreciate your help here Mike...
Mike Fitzpatrick wrote on Jul 10, 2007
cl> imcopy dev$pix fooDo you get both a foo.imh and foo.pix file in the current directory or some error message? Did you do the 'flpr' so tasks would reset with the new value? Is you 'imtype' variable set to 'imh' or are you putting that explicitly as an extension to the image name?
-Mike
dvodonnell wrote on Jul 10, 2007
I have been specifying image.imh (including the extension) at the prompts.
dvodonnell wrote on Jul 10, 2007
Mike Fitzpatrick wrote on Jul 10, 2007
-Mike
dvodonnell wrote on Jul 10, 2007
Any remaining ideas greatly appreciated....
Mike Fitzpatrick wrote on Jul 10, 2007
The imcopy test indicates your 'imdir' is fine. A missing .pix can also occur if an image was mapped (created) but then an error occurred when writing it. Sometimes obscure things like a /tmp directory at 100% capacity can cause it, other times its a more obvious error message from the system.
-Mike
dvodonnell wrote on Jul 10, 2007
imutil> imheader mosaic_fixed2.psf.imh longheader=yes
mosaic_fixed2.psf.imh[0][real]:
No bad pixels, min=unknown, max=unknown
Line storage mode, physdim [0], length of user area 1 s.u.
Created Wed 18:34:03 15-Aug-2007, Last modified Wed 18:34:03 15-Aug-2007
Pixel file "" [NO PIXEL FILE]
Mike Fitzpatrick wrote on Jul 10, 2007
What was the command that created the image? Is it an IRAF task or something locally written?
-Mike
dvodonnell wrote on Jul 10, 2007
>imcopy mosaic.fits mosaic.imh
That successfully created the original .imh and .pix, both of which seem valid.
As for the PSF image, I'm simply using the psf command to generate that as output, which yields only that .imh file with the seemingly bad header.
Mike Fitzpatrick wrote on Jul 10, 2007
I'm thinking having a mosaic.fits and mosaic.imh in the same directory may be confusing things, Using imh isn't required but if you want to do it try using a different name so the images are unique.
-Mike
dvodonnell wrote on Jul 10, 2007
Mike Fitzpatrick wrote on Jul 10, 2007
-Mike
dvodonnell wrote on Jul 10, 2007
Just wanted to say thanks for all your help though, much appreciated!
Guest wrote on Dec 04, 2013
If the error is due to long path, you can use Long Path Tool, it handles such issues..
Last post on Dec 04, 2013