Skip to content

Commit

Permalink
Updated loading fits to allow using AIPSCC=True even if no table exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldjohnson committed Jan 24, 2019
1 parent 23ba3d5 commit 76d40bd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ehtim/io/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,19 @@ def load_im_fits(filename, aipscc=False, pulse=PULSE_DEFAULT,

# Update the image using the AIPS CC table
if aipscc:
# Get AIPS CC Table
try:
aipscctab = hdulist["AIPS CC"]
except:
raise ValueError("Input FITS file does not have an AIPS CC table.")
print("Input FITS file does not have an AIPS CC table. Loading image instead.")
aipscc = False
#raise ValueError("Input FITS file does not have an AIPS CC table.")

if aipscc:
# Get AIPS CC Table
# try:
# aipscctab = hdulist["AIPS CC"]
# except:
# raise ValueError("Input FITS file does not have an AIPS CC table.")

print("loading the AIPS CC table.")
print("force the pulse function to be the delta function.")
Expand Down

0 comments on commit 76d40bd

Please sign in to comment.