Error when running TweakReg

zhao13zhao13 Member Posts: 8
edited June 27 in Alignment
Hello,
I was trying to run TweakReg on a list of FLT files I got from HST archive. All the FLT files are association members, and there are 3 FLT files for each association. I want to run TweakReg to align all of them to the first image in the list (the reference image by default). After importing tweakreg from drizzlepac, I typed:

tweakreg.TweakReg('*flt.fits',updatehdr=False,conv_width=3.5,threshold=1500,peakmax=70000)

then I was prompted with the following error:

Traceback (most recent call last): File "//anaconda/lib/python2.7/site-packages/drizzlepac/util.py", line 214, in wrapper func(*args, **kwargs) File "//anaconda/lib/python2.7/site-packages/drizzlepac/tweakreg.py", line 213, in run **catfile_kwargs)) File "//anaconda/lib/python2.7/site-packages/drizzlepac/imgclasses.py", line 60, in __init__ wnames = altwcs.wcsnames(self.hdulist,ext=sciext) File "//anaconda/lib/python2.7/site-packages/stwcs/wcsutil/altwcs.py", line 561, in wcsnames _check_headerpars(fobj, ext) File "//anaconda/lib/python2.7/site-packages/stwcs/wcsutil/altwcs.py", line 438, in _check_headerpars raise ValueError("Expected a file name, a file object or a header\n") ValueError: Expected a file name, a file object or a header Traceback (innermost last): File "<console>", line 1, in <module> File "//anaconda/lib/python2.7/site-packages/drizzlepac/tweakreg.py", line 403, in TweakReg run(configObj) File "//anaconda/lib/python2.7/site-packages/drizzlepac/util.py", line 224, in wrapper raise TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType

I wonder if any one has encountered similar problem as I did, or if it is just not plausible to align FLT files from different association?

Cheers
Yue
Tagged:

Comments

  • mack@stsci.edumack@stsci.edu Member, Institute_Staff, Moderator_DrizzlePac Posts: 28
    Hi Yue, Can you confirm the version of drizzlepac you are using? To do so, please type:
    drizzlepac.__version__

    It is most likely that you need to update astroconda so that the DrizzlePac software is compatible with the latest FLT files obtained from MAST.

    For your second question, yes it is possible to align/combine FLTs from different associations.
    Jennifer
  • zhao13zhao13 Member Posts: 8
    Hello Jennifer,

    The drizzlepac version I have is 1.1.16.

    cheers
    Yue
  • mack@stsci.edumack@stsci.edu Member, Institute_Staff, Moderator_DrizzlePac Posts: 28
    This version is deprecated, and we advise you to update your software.
    http://astroconda.readthedocs.io/en/latest/

    For more information on drizzling, please see the drizzlepac website
    http://drizzlepac.stsci.edu/
Sign In or Register to comment.