Skip to content

Commit

Permalink
Quick hotfix for catalog generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdaily committed May 24, 2023
1 parent d2aef6d commit 988aa9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions archive/frames/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ def build_nginx_zip_text(frames, directory, uncompress=False, catalog_only=False
raise FunpackError
elif catalog_only and frame.reduction_level == 91 and frame.configuration_type == 'EXPOSE':
logger.info(msg='Adding catalog to manifest')
try:
catalog = image['CAT']
except KeyError:
continue
location = reverse('frame-catalog-catalog', kwargs={'pk': frame.id})
extension = '-catalog.fits'

with file_store.get_fileobj(path) as fileobj:
image = fits.open(fileobj)
try:
catalog = image['CAT']
except KeyError:
continue
with io.BytesIO() as buffer:
hdulist = fits.HDUList([fits.PrimaryHDU(header=image['SCI'].header), catalog])
hdulist.writeto(buffer)
Expand Down

0 comments on commit 988aa9a

Please sign in to comment.