Skip to content

Commit

Permalink
remove triggering on negative zogy scores
Browse files Browse the repository at this point in the history
  • Loading branch information
guynir42 committed Jun 12, 2024
1 parent 5229d96 commit bb4ffa3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pipeline/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,8 @@ def extract_sources_filter(self, image):
# TODO: we should check if we still need this after b/g subtraction on the input images
mu, sigma = sigma_clipping(score)
score = (score - mu) / sigma
det_map = abs(score) > self.pars.threshold # catch negative peaks too (can get rid of them later)
# det_map = abs(score) > self.pars.threshold # catch negative peaks too (can get rid of them later)
det_map = score > self.pars.threshold

# dilate the map to merge nearby peaks
struc = np.zeros((3, 3), dtype=bool)
Expand Down
4 changes: 4 additions & 0 deletions tests/models/test_x.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from models.cutouts import Cutouts
from models.measurements import Measurements

import pdb
import matplotlib.pyplot as plt


def test_filtering_measurements(ptf_datastore):
# printout the list of relevant environmental variables:
Expand Down Expand Up @@ -44,6 +47,7 @@ def test_filtering_measurements(ptf_datastore):

m = measurements[0] # grab the first one as an example

# pdb.set_trace()
# test that we can filter on some measurements properties
with SmartSession() as session:
ms = session.scalars(sa.select(Measurements).where(Measurements.flux_apertures[0] > 0)).all()
Expand Down

0 comments on commit bb4ffa3

Please sign in to comment.