Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stamp generation OSError when opening FITS file #2

Open
genghisken opened this issue Jun 7, 2022 · 0 comments
Open

Stamp generation OSError when opening FITS file #2

genghisken opened this issue Jun 7, 2022 · 0 comments
Assignees

Comments

@genghisken
Copy link
Owner

Code needs a try/except clause around opening the FITS file. Don't know why it fails, but it occasionally does with the following error. Need to get to the bottom of why the FITS file is not valid, but in the meantime a quick fix is to add the exception on line 713.

Waiting for jobs to complete...
Process Process-46:
Traceback (most recent call last):
  File "/usr/local/swtools/python/atls/anaconda3/envs/atlas37/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/local/swtools/python/atls/anaconda3/envs/atlas37/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/ps1code/gitrelease/psat-server/psat-server/scripts/stamps/python/makeATLASStampsMultiprocess.py", line 90, in workerStampCutter
    objectsForUpdate = makeATLASObjectPostageStamps3(conn, listFragment, PSSImageRootLocation, limit = limit, mostRecent = mostRecent, nonDets = nondetections, discoveryLimit = discoverylimit, lastDetectionLimit=lastdetectionlimit, requestType = requestType, ddc = ddc, wpwarp = wpwarp, options = options)
  File "/usr/local/ps1code/gitrelease/psat-server/psat-server/scripts/stamps/python/makeATLASStamps.py", line 637, in makeATLASObjectPostageStamps3
    status, rot = imu.getMonstaPostageStamp(imageFilenames[imageType], absoluteLocalImageName, x, y, dx)
  File "/usr/local/ps1code/gitrelease/psat-server/psat-server/scripts/stamps/python/image_utils.py", line 713, in getMonstaPostageStamp
    h = pf.open(filename)
  File "/usr/local/swtools/python/atls/anaconda3/envs/atlas37/lib/python3.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 174, in fitsopen
    lazy_load_hdus, ignore_missing_simple, **kwargs)
  File "/usr/local/swtools/python/atls/anaconda3/envs/atlas37/lib/python3.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 411, in fromfile
    lazy_load_hdus=lazy_load_hdus, **kwargs)
  File "/usr/local/swtools/python/atls/anaconda3/envs/atlas37/lib/python3.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 1090, in _readfrom
    raise OSError('No SIMPLE card found, this file does not '
OSError: No SIMPLE card found, this file does not appear to be a valid FITS file
@genghisken genghisken self-assigned this Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant