Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/lsst/ip/diffim/detectAndMeasure.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,8 @@ def _find_glint_trails(self, diaSources):
candidateDiaSources = diaSources
trailed_glints = self.findGlints.run(candidateDiaSources)
glint_mask = [True if id in trailed_glints.trailed_ids else False for id in diaSources['id']]
diaSources['glint_trail'] = np.array(glint_mask)
if np.any(glint_mask):
diaSources['glint_trail'] = np.array(glint_mask)
Comment on lines +909 to +910
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If there are in fact diaSources, and glint_mask is full of False, wouldn't this leave the column empty?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, diaSources['glint_trail'] is all False before this line, not empty.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah ok, so self.schema.addField("glint_trail", "Flag", "DiaSource is part of a glint trail.") creates the column AND sets it default False? The more you know 🌈


slopes = np.array([trail.slope for trail in trailed_glints.parameters])
intercepts = np.array([trail.intercept for trail in trailed_glints.parameters])
Expand Down