[AstroPy] tweakshifts in writeCoordFile()--IndexError: invalid index to scalar variable

Steve White stevan.white at googlemail.com
Mon Jun 20 05:44:16 EDT 2011


Hi!

I'm trying to create a shifts file along the lines of the
	Multidrizzle Handbook 5.5.3.6 Tweakshifts
	http://www.stsci.edu/hst/HST_overview/documents/multidrizzle/ch56.html#251052

Tweakshifts gets stuck in a strange place deep in the python code.
I can't tell if I'm missing some step or if there is a bug in the code.

Iraf 2.14.1 is installed (but also tried 2.15.a1) with stsdas and
tables v 3.13 and pytools SVN revision 11593.
Here, for example, the input files are from HST proposal 6431.

First I determined which files correspond to a single pointing, and feed that
list into
	asnt = asnutil.ASNTable( files, output = out_prefix ),
        asnt.create()
        asnt.write()
to create asn table files.

When I run tweakshifts on the ASN files thus produced,
	--> tweakshifts u34l390250_asn.fits undistort=yes mode=h
it does some stuff then dies, as listed below.

I also attach the ASN file (which seems to consist of mixed text and binary).

Thanks!
----------------------------------------------------------
--> tweakshifts u34l390250_asn.fits undistort=yes mode=h
xyxin:  INDEF    xyyin:  INDEF
fitgeometry:  rscale
Tweakshifts Version  0.7.3 (19 Aug 2010)

+ MAKEWCS Version 1.1.7 (6 Jul 2010)
-Updating image  u34l3901m_c0m.fits[sci,1]
- IDCTAB: Distortion model from row 25 for chip 1 : F555W and CLEAR
- OFFTAB: Offset interpolated from rows 9 and 13
- IDCTAB: Distortion model from row 165 for chip 3 : F555W and CLEAR
- OFFTAB: Offset interpolated from rows 11 and 15
...
Setting up output name:  u34l390250_drz.fits
Starting PyDrizzle Version  6.3.7 (3-Jan-2011)  at  10:02:52 (20/06/2011)
- IDCTAB: Distortion model from row 25 for chip 1 : F555W and CLEAR
- OFFTAB: Offset interpolated from rows 9 and 13
- IDCTAB: Distortion model from row 95 for chip 2 : F555W and CLEAR
...
Drizzle parameters have been calculated. Ready to .run()...
Finished calculating parameters at  10:02:55 (20/06/2011)

> WARNING: Pixel stack overflow at position 493,431

    Computing undistorted target positions for  322 objects.
...
    Computing undistorted target positions for  1 objects.
Traceback (innermost last):
  File "<CL script CL1>", line 1, in <module>
  File "/opt/iraf/extern/stsdas/pkg/analysis/dither/tweakshifts_iraf.py",
line 217, in tweak_iraf
    fitbox        = _fitbox)
  File "/opt/iraf/extern/stsdas/python/tweak.py", line 625, in run
    shift_dict = runCatalog(flist,refname,match_pars)
  File "/opt/iraf/extern/stsdas/python/tweak.py", line 861, in runCatalog
    writeCoordFile(cxylist, fluxes, coordname)
  File "/opt/iraf/extern/stsdas/python/tweak.py", line 252, in writeCoordFile
    cstr = str(coord[0])+'    '+str(coord[1])+'    '+str(flux) +'\n'
IndexError: invalid index to scalar variable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u34l390250_asn.fits.gz
Type: application/x-gzip
Size: 1324 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/astropy/attachments/20110620/abce4e0b/attachment.bin>


More information about the AstroPy mailing list