Error on the tasks “offsets”..
Rizer wrote on May 27, 2008
I was trying to get the offsets between a set of fits files, here is what I did:
Ran "precor" on each of the fits files with .fits[0][*,*,1], with ngroup=4
Made a list by "!\ls -1 *_obj.fits > obj.list"
Then used "offsets" and got the following errors:
fourier> offsets coeffs=""
List with input image names: obj.list
Reference image: u5i22601r_c0f_obj.fits
List or rootname for crosscor images: cross1x
ERROR: Attempt to access undefined local variable `gcount'.
"if (gcount != 4)"
line 135: dither$offsets.cl
called as: `offsets (coeffs=)'
I also tried coeffs="header", but the same error arised.
Please help...thanks alot.
Ran "precor" on each of the fits files with .fits[0][*,*,1], with ngroup=4
Made a list by "!\ls -1 *_obj.fits > obj.list"
Then used "offsets" and got the following errors:
fourier> offsets coeffs=""
List with input image names: obj.list
Reference image: u5i22601r_c0f_obj.fits
List or rootname for crosscor images: cross1x
ERROR: Attempt to access undefined local variable `gcount'.
"if (gcount != 4)"
line 135: dither$offsets.cl
called as: `offsets (coeffs=)'
I also tried coeffs="header", but the same error arised.
Please help...thanks alot.
Mike Fitzpatrick wrote on May 27, 2008
An 'access to undefined local variable' usually means a variable wasn't initialized in some way. In this case, it appears the OFFSET script sets the value by trying to read the GCOUNT header value from an image and scanning it to the 'gcount' script variable. If GCOUNT isn't in the header this would fail and the variable would be empty, leading to the error.
If that doesn't explain it and you don't get another answer here, you might contact the STScI helpdesk (help@stsci.edu).
Cheers,
-Mike
If that doesn't explain it and you don't get another answer here, you might contact the STScI helpdesk (help@stsci.edu).
Cheers,
-Mike
Rizer wrote on May 27, 2008
Thanks Mike, I think that is the problem.
But how do I add such variable into the header? Or is there any other ways to know the offsets in pixels between the WFPC2 images?
I contacted the helpdesk before but never got a reply...
Thanks again.
But how do I add such variable into the header? Or is there any other ways to know the offsets in pixels between the WFPC2 images?
I contacted the helpdesk before but never got a reply...
Thanks again.
Last post on May 27, 2008