Skip to content

Commit

Permalink
Add check for WCS is None in CalexpCutoutTask
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenam committed Apr 2, 2022
1 parent bbdcaf1 commit 736724f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/lsst/pipe/tasks/calexpCutout.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ def run(self, in_table, calexp):
raise ValueError('Required column missing from the input table. '
'Required columns are "position", "xspan", and "yspan". '
f'The column names are: {in_table.colnames}')
wcs = calexp.getWcs()
if wcs is None:
raise RuntimeError("Calexp has no WCS, so cannot compute sky positions.")
max_idx = self.config.max_cutouts
cutout_list = []
wcs = calexp.getWcs()
mim = calexp.getMaskedImage()
ras = []
decs = []
Expand Down

0 comments on commit 736724f

Please sign in to comment.