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

tickets/DM-3213 #6

Merged
merged 4 commits into from Oct 5, 2015
Merged

tickets/DM-3213 #6

merged 4 commits into from Oct 5, 2015

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented Sep 23, 2015

No description provided.

try:
kernelCandidate = kernelCandidate.getSource()
except:
raise RuntimeError, ("Candiate not of type afwTable.SourceRecord")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message is incomplete, since the problem is that the kernelCandidate is neither a SourceRecord nor an object (what kind?) that has a getSource() method.

Cadiate -> Candidate

Do you expect all candidates to be of the same type? If so, I think it would be safer and cleaner to preprocess candidateInList based on the type of the first entry (e.g. convert it to a list of source records, regardless of what it started out as).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the modern version of raise:

raise RuntimeError("Candidate something something")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on where the kernel candidates come from they are either a lsst.afw.table.SourceRecord or a lsst.meas.algorithms.algorithmsLib.PsfCandidateF.

That is a much better idea to check the type and convert the whole list; I'll move this to the calling task, ImagePsfMatchTask.makeCandidateList(), which already has some type checking in it.

    dipoleMeasurment: Add SourceFlagChecker to __all__
    diaCatalogSourceSelector: default flag slot names
    DipoleMeasurementConfig: default slots.centroid
    - 'ip_diffim_NaiveDipoleCentroid_pos'-->'ip_diffim_NaiveDipoleCentroid'
    - '..._pos' is not an algorithm and does not work in slots.centroid
       outside of unit tests. When running ip_diffim_NaiveDipoleCentroid in
       a slot both unit tests and ImageDifferenceTask require
       _x/_y fields be added to schema.
Existing type check was a no-op: type of the type and class were both <type 'type'>.
Improve to convert the candidateList to a list of SourceRecords if possible.
For example, if kernelCandidates recycled from the src dataset, the
candidatelList is of type lsst.meas.algorithms.PsfCandidateF.
No need to log pexExcept.Expections and Expections separately anymore
@yalsayyad yalsayyad merged commit dd403b3 into master Oct 5, 2015
@ktlim ktlim deleted the tickets/DM-3213 branch August 25, 2018 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants