Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Error with Blotting Step

jdepasqualejdepasquale Member, Institute_Staff Posts: 4
I'm consistently running into an error with astrodrizzle at the blot back median image step where it appears that the *sciX_blt.fits image is not actually being written to disk, and then is subsequently not found throwing a FileNotFound error...if that makes sense. For some context, I'm assembling a mosaic using SExtractor catalogs fed to Tweakreg and am now at the stage of assembling and drizzling the full mosaic. Not sure if this matters or not, but I noticed that astrodrizzle seems to be ignoring case in the file system.

This is the error output:

==== Processing Step Create Median finished at 18:43:43.473 (09/10/2018)

==== Processing Step Blot started at 18:43:43.47 (09/10/2018)

Blot: creating blotted image: /opo/opousers/JDepasquale/ComaCluster/F475W/visit10/j9ty15cbq_flc_F475W.fits[sci,1]

Using default C-based coordinate transformation...

-Generating simple FITS output: /opo/opousers/jdepasquale/comacluster/f475w/visit10/j9ty15cbq_flc_f475w_sci1_blt.fits

Writing out image to disk: /opo/opousers/jdepasquale/comacluster/f475w/visit10/j9ty15cbq_flc_f475w_sci1_blt.fits

##############################################################################
# #
# ERROR: #
# AstroDrizzle Version 2.1.3.dev encountered a problem! Processing #
# terminated at 18:44:34.892 (09/10/2018). #
# #
##############################################################################


-------------------- --------------------
Step Elapsed time
-------------------- --------------------

Initialization 169.1451 sec.

Static Mask 195.2830 sec.

Subtract Sky 1165.4939 sec.

Separate Drizzle 2637.7156 sec.

Create Median 11749.1913 sec.

Blot 0.0000 sec.

==================== ====================

Total 15916.8288 sec.

Trailer file written to: astrodrizzle.log


FileNotFoundError: [Errno 2] No such file or directory: '/opo/opousers/jdepasquale/comacluster/f475w/visit10/j9ty15cbq_flc_f475w_sci1_blt.fits'
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/drizzlepac/util.py in wrapper(*args, **kwargs)
218 try:
--> 219 func(*args, **kwargs)
220 except Exception as errorobj:

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/drizzlepac/astrodrizzle.py in run(configobj, wcsmap)
219 ablot.runBlot(imgObjList, outwcs, configobj, wcsmap=wcsmap,
--> 220 procSteps=procSteps)
221

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/drizzlepac/ablot.py in runBlot(imageObjectList, output_wcs, configObj, wcsmap, procSteps)
186 run_blot(imageObjectList, output_wcs.single_wcs, paramDict,
--> 187 wcsmap=wcsmap)
188 else:

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/drizzlepac/ablot.py in run_blot(imageObjectList, output_wcs, paramDict, wcsmap)
317 versions=_versions,blend=False,
--> 318 virtual=img.inmemory)
319

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/drizzlepac/outputimage.py in writeFITS(self, template, sciarr, whtarr, ctxarr, versions, overwrite, blend, virtual)
461 # write out file to disk
--> 462 fo.writeto(self.outdata)
463 del fo,hdu

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/astropy/io/fits/hdu/hdulist.py in writeto(self, fileobj, output_verify, clobber, checksum)
684 # but only if the file doesn't exist.
--> 685 fileobj = _File(fileobj, mode='ostream', clobber=clobber)
686 hdulist = self.fromfile(fileobj)

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/astropy/io/fits/file.py in __init__(self, fileobj, mode, memmap, clobber, cache)
140 elif isinstance(fileobj, string_types):
--> 141 self._open_filename(fileobj, mode, clobber)
142 else:

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/astropy/io/fits/file.py in _open_filename(self, filename, mode, clobber)
492 else:
--> 493 self._file = fileobj_open(self.name, PYFITS_MODES[mode])
494

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/astropy/io/fits/util.py in fileobj_open(filename, mode)
400
--> 401 return open(filename, mode, buffering=0)
402 elif six.PY2:

FileNotFoundError: [Errno 2] No such file or directory: '/opo/opousers/jdepasquale/comacluster/f475w/visit10/j9ty15cbq_flc_f475w_sci1_blt.fits'

During handling of the above exception, another exception occurred:

UnboundLocalError Traceback (most recent call last)
in ()
----> 1 astrodrizzle.AstroDrizzle('visit*/*flc_F475W.fits', output='f475w_mosaic', wcskey='', static=False, skysub=False, driz_separate=False, median=False, blot=True, driz_cr=True, driz_combine=True, final_wcs=True, final_scale=0.05)

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/drizzlepac/astrodrizzle.py in AstroDrizzle(input, mdriztab, editpars, configobj, wcsmap, **input_dict)
121 # already called 'run()'.
122 if editpars == False:
--> 123 run(configObj, wcsmap=wcsmap)
124
125 #

/home/jdepasquale/miniconda3/envs/astroconda/lib/python3.4/site-packages/drizzlepac/util.py in wrapper(*args, **kwargs)
226 # Insure that any exception raised by the code gets passed on
227 # (hope that end_logging didn't change the last exception raised)
--> 228 if errorobj:
229 raise errorobj
230

UnboundLocalError: local variable 'errorobj' referenced before assignment

Comments

  • jdepasqualejdepasquale Member, Institute_Staff Posts: 4
    For future reference, I think I zeroed in on the cause of this error. Because I was working on a per-visit basis with SExtractor, I had isolated each visit into its own subdirectory. I ran astrodrizzle pointing the input files to each directory using 'input=visit*/*flc.fits' - so it was grabbing the flc files from each "visit" subdirectory. This error is confusing because some of the initial tools run by astrodrizzle worked and generated files in each visit directory. However, when it came to the blotting step, it failed with the error quoted above. I believe this is the source of the error because I moved all of the flc files into the same directory and re-ran everything only changing the input parameter and it worked.
Sign In or Register to comment.