Details
-
Type:
Story
-
Status: To Do
-
Resolution: Unresolved
-
Fix Version/s: None
-
Component/s: meas_algorithms
-
Labels:
-
Epic Link:
-
Team:Alert Production
Description
The following code can fail at getMaskedImage:
try:
|
psfCandidate = algorithmsLib.makePsfCandidate(star, exposure)
|
except Exception as err:
|
self.log.warn("Failed to make a psfCandidate from star %d: %s" % (star.getId(), err))
|
continue
|
|
# The setXXX methods are class static, but it's convenient to call them on
|
# an instance as we don't know Exposure's pixel type
|
# (and hence psfCandidate's exact type)
|
if psfCandidate.getWidth() == 0:
|
psfCandidate.setBorderWidth(self.config.borderWidth)
|
psfCandidate.setWidth(self.config.kernelSize + 2*self.config.borderWidth)
|
psfCandidate.setHeight(self.config.kernelSize + 2*self.config.borderWidth)
|
|
im = psfCandidate.getMaskedImage().getImage()
|
with an error such as:
Box2I(Point2I(-2,1120),Extent2I(41,41)) doesn't fit in image 2048x4176...
|
It is easy to wrap more of this code in a try/except block (and that is what we will do for now in starSelector.py) but it would be nice if the code was more robust and complained when the bad values were set, instead of later when the masked image was requested.
Attachments
Issue Links
- is triggered by
-
DM-5663 Config override fixes needed due to new star selector
- Done
-
DM-5532 Change star selectors to return stars instead of PSF candidates
- Done
- relates to
-
DM-19155 Redesign PsfCandidate
- To Do
-
DM-27547 Geometrically check that PsfCandidates are sufficiently far from edge
- Done
-
DM-15121 LengthError in making psfCandidate
- Done
-
RFC-477 Convert makePsfCandidates into its own task
- Implemented
-
DM-5578 making PSF candidates should be simpler
- Invalid
Activity
Epic Link |
|
Team | Alert Production [ 10300 ] | |
Labels | SciencePipelines |
Team | Alert Production [ 10300 ] | Data Release Production [ 10301 ] |
Description |
The following code can fail at getMaskedImage:
{code} try: psfCandidate = algorithmsLib.makePsfCandidate(star, exposure) except Exception as err: self.log.warn("Failed to make a psfCandidate from star %d: %s" % (star.getId(), err)) continue # The setXXX methods are class static, but it's convenient to call them on # an instance as we don't know Exposure's pixel type # (and hence psfCandidate's exact type) if psfCandidate.getWidth() == 0: psfCandidate.setBorderWidth(self.config.borderWidth) psfCandidate.setWidth(self.config.kernelSize + 2*self.config.borderWidth) psfCandidate.setHeight(self.config.kernelSize + 2*self.config.borderWidth) im = psfCandidate.getMaskedImage().getImage() {code} with an error such as: {code} Box2I(Point2I(-2,1120),Extent2I(41,41)) doesn't fit in image 2048x4176... {code} It is easy to wrap more of this code in a try/except block (and that is what we will do for now in starSelector.py) but it would be nice if the code was more robust and complained when the bad values were set. Even better, I want a standalone function that made a PSF candidate with all this extra code. It is used in many places (even after |
The following code can fail at getMaskedImage:
{code} try: psfCandidate = algorithmsLib.makePsfCandidate(star, exposure) except Exception as err: self.log.warn("Failed to make a psfCandidate from star %d: %s" % (star.getId(), err)) continue # The setXXX methods are class static, but it's convenient to call them on # an instance as we don't know Exposure's pixel type # (and hence psfCandidate's exact type) if psfCandidate.getWidth() == 0: psfCandidate.setBorderWidth(self.config.borderWidth) psfCandidate.setWidth(self.config.kernelSize + 2*self.config.borderWidth) psfCandidate.setHeight(self.config.kernelSize + 2*self.config.borderWidth) im = psfCandidate.getMaskedImage().getImage() {code} with an error such as: {code} Box2I(Point2I(-2,1120),Extent2I(41,41)) doesn't fit in image 2048x4176... {code} It is easy to wrap more of this code in a try/except block (and that is what we will do for now in starSelector.py) but it would be nice if the code was more robust and complained when the bad values were set, instead of later when the masked image was requested. |
Team | Data Release Production [ 10301 ] | Alert Production [ 10300 ] |