Skip to content

Commit

Permalink
Merge branch 'tickets/DM-14290'
Browse files Browse the repository at this point in the history
  • Loading branch information
sr525 committed Aug 22, 2020
2 parents dd5c15c + 4f17558 commit eb4c96b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions examples/imagePsfMatchTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ def run(args):
# Run the requested method of the Task
if args.template is not None and args.science is not None:
if not os.path.isfile(args.template):
raise Exception("Template image %s does not exist" % (args.template))
raise FileNotFoundError("Template image %s does not exist" % (args.template))
if not os.path.isfile(args.science):
raise Exception("Science image %s does not exist" % (args.science))
raise FileNotFoundError("Science image %s does not exist" % (args.science))

try:
templateExp = afwImage.ExposureF(args.template)
except Exception:
raise Exception("Cannot read template image %s" % (args.template))
raise RuntimeError("Cannot read template image %s" % (args.template))
try:
scienceExp = afwImage.ExposureF(args.science)
except Exception:
raise Exception("Cannot read science image %s" % (args.science))
raise RuntimeError("Cannot read science image %s" % (args.science))
else:
templateExp, scienceExp = generateFakeImages()
config.kernel.active.sizeCellX = 128
Expand Down
8 changes: 4 additions & 4 deletions examples/modelPsfMatchTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,18 @@ def run(args):
# Run the requested method of the Task
if args.template is not None and args.science is not None:
if not os.path.isfile(args.template):
raise Exception("Template image %s does not exist" % (args.template))
raise FileNotFoundError("Template image %s does not exist" % (args.template))
if not os.path.isfile(args.science):
raise Exception("Science image %s does not exist" % (args.science))
raise FileNotFoundError("Science image %s does not exist" % (args.science))

try:
templateExp = afwImage.ExposureF(args.template)
except Exception:
raise Exception("Cannot read template image %s" % (args.template))
raise RuntimeError("Cannot read template image %s" % (args.template))
try:
scienceExp = afwImage.ExposureF(args.science)
except Exception:
raise Exception("Cannot read science image %s" % (args.science))
raise RuntimeError("Cannot read science image %s" % (args.science))
else:
templateExp, scienceExp = generateFakeData()
config.kernel.active.sizeCellX = 128
Expand Down
8 changes: 4 additions & 4 deletions examples/snapPsfMatchTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ def run(args):
# Run the requested method of the Task
if args.template is not None and args.science is not None:
if not os.path.isfile(args.template):
raise Exception("Template image %s does not exist" % (args.template))
raise FileNotFoundError("Template image %s does not exist" % (args.template))
if not os.path.isfile(args.science):
raise Exception("Science image %s does not exist" % (args.science))
raise FileNotFoundError("Science image %s does not exist" % (args.science))

try:
templateExp = afwImage.ExposureF(args.template)
except Exception:
raise Exception("Cannot read template image %s" % (args.template))
raise RuntimeError("Cannot read template image %s" % (args.template))
try:
scienceExp = afwImage.ExposureF(args.science)
except Exception:
raise Exception("Cannot read science image %s" % (args.science))
raise RuntimeError("Cannot read science image %s" % (args.science))
else:
templateExp, scienceExp = generateFakeImages()
config.kernel.active.fitForBackground = True
Expand Down
8 changes: 4 additions & 4 deletions python/lsst/ip/diffim/imagePsfMatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,17 @@ def run(args):
# Run the requested method of the Task
if args.template is not None and args.science is not None:
if not os.path.isfile(args.template):
raise Exception("Template image %s does not exist" % (args.template))
raise FileNotFoundError("Template image %s does not exist" % (args.template))
if not os.path.isfile(args.science):
raise Exception("Science image %s does not exist" % (args.science))
raise FileNotFoundError("Science image %s does not exist" % (args.science))
try:
templateExp = afwImage.ExposureF(args.template)
except Exception as e:
raise Exception("Cannot read template image %s" % (args.template))
raise RuntimeError("Cannot read template image %s" % (args.template))
try:
scienceExp = afwImage.ExposureF(args.science)
except Exception as e:
raise Exception("Cannot read science image %s" % (args.science))
raise RuntimeError("Cannot read science image %s" % (args.science))
else:
templateExp, scienceExp = generateFakeImages()
config.kernel.active.sizeCellX = 128
Expand Down
8 changes: 4 additions & 4 deletions python/lsst/ip/diffim/modelPsfMatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,17 @@ def run(args):
# Run the requested method of the Task
if args.template is not None and args.science is not None:
if not os.path.isfile(args.template):
raise Exception("Template image %s does not exist" % (args.template))
raise FileNotFoundError("Template image %s does not exist" % (args.template))
if not os.path.isfile(args.science):
raise Exception("Science image %s does not exist" % (args.science))
raise FileNotFoundError("Science image %s does not exist" % (args.science))
try:
templateExp = afwImage.ExposureF(args.template)
except Exception as e:
raise Exception("Cannot read template image %s" % (args.template))
raise RuntimeError("Cannot read template image %s" % (args.template))
try:
scienceExp = afwImage.ExposureF(args.science)
except Exception as e:
raise Exception("Cannot read science image %s" % (args.science))
raise RuntimeError("Cannot read science image %s" % (args.science))
else:
templateExp, scienceExp = generateFakeData()
config.kernel.active.sizeCellX = 128
Expand Down
8 changes: 4 additions & 4 deletions python/lsst/ip/diffim/snapPsfMatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,17 @@ def run(args):
# Run the requested method of the Task
if args.template is not None and args.science is not None:
if not os.path.isfile(args.template):
raise Exception("Template image %s does not exist" % (args.template))
raise FileNotFoundError("Template image %s does not exist" % (args.template))
if not os.path.isfile(args.science):
raise Exception("Science image %s does not exist" % (args.science))
raise FileNotFoundError("Science image %s does not exist" % (args.science))
try:
templateExp = afwImage.ExposureF(args.template)
except Exception as e:
raise Exception("Cannot read template image %s" % (args.template))
raise RuntimeError("Cannot read template image %s" % (args.template))
try:
scienceExp = afwImage.ExposureF(args.science)
except Exception as e:
raise Exception("Cannot read science image %s" % (args.science))
raise RuntimeError("Cannot read science image %s" % (args.science))
else:
templateExp, scienceExp = generateFakeImages()
config.kernel.active.fitForBackground = True
Expand Down

0 comments on commit eb4c96b

Please sign in to comment.