Skip to content

Commit

Permalink
show fid centroids after changing color
Browse files Browse the repository at this point in the history
  • Loading branch information
javierggt committed Dec 12, 2024
1 parent 50582f4 commit 1cce551
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion aperoll/star_field_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,14 @@ def set_excluded(self, excluded):
self._line_1.setPen(pen)
self._line_2.setPen(pen)

def set_fiducial(self, fiducial):
color = QtG.QColor("red") if fiducial else QtG.QColor("blue")
pen = self.pen()
pen.setColor(color)
self.setPen(pen)
self._line_1.setPen(pen)
self._line_2.setPen(pen)


class FidLight(QtW.QGraphicsEllipseItem):
"""
Expand Down Expand Up @@ -571,9 +579,9 @@ def set_show_centroids(self, show=True):
| (row > 511)
| (col < -511)
| (col > 511)
| (self._centroids["IMGFID"])
)
for i, centroid in enumerate(self.centroids):
centroid.set_fiducial(self._centroids["IMGFID"][i])
if off_ccd[i]:
centroid.setVisible(False)
else:
Expand Down

0 comments on commit 1cce551

Please sign in to comment.