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

Add early error message if using calexp as template and no id supplied #20

Merged
merged 1 commit into from
May 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion python/lsst/ip/diffim/getTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,17 @@ def run(self, exposure, sensorRef, templateIdList):

\param[in] exposure -- exposure (unused)
\param[in] sensorRef -- a Butler data reference
\param[in] templateIdList -- list of data ids. Only visit used.
\param[in] templateIdList -- list of data ids, which should contain as single item.
If there are multiple items, only the first is used.
Only the entry 'visit' from the data id is used.

\return a pipeBase.Struct
- exposure: a template calexp
- sources: source catalog measured on the template
"""

if len(templateIdList) == 0:
raise RuntimeError("No template supplied! Please supply a template visit id.")
if len(templateIdList) > 1:
self.log.warn("Multiple template visits supplied. Getting template from first visit: %s" %
(templateIdList[0]['visit']))
Expand Down