Skip to content

Commit

Permalink
Merge pull request #391 from LCOGT/photometry-omit-large-sources
Browse files Browse the repository at this point in the history
Photometry omit large sources
  • Loading branch information
cmccully authored Apr 23, 2024
2 parents afa292a + 52423c6 commit 8c20311
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.17.0 (2023-04-24)
-------------------
- We now omit sources in the photometry stage that have an area larger than 1000 pixels as they lead to long
processing times and are almost invariably spurious.

1.16.1 (2023-04-23)
-------------------
- Correction to aperture photometry. We were incorrectly using the radius instead of the diameter
Expand Down
4 changes: 4 additions & 0 deletions banzai/photometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def do_stage(self, image):
# Do an initial source detection
segmentation_map = detect_sources(convolved_data, self.threshold, npixels=self.min_area)

# We now remove any sources with an area > 1000 pixels because they are almost invariably spurious
segmentation_map.remove_labels(segmentation_map.labels[segmentation_map.areas > 1000])
segmentation_map.relabel_consecutive(1)

logger.info('Deblending sources', image=image)
# Note that nlevels here is DEBLEND_NTHRESH in source extractor which is 32 by default
deblended_seg_map = deblend_sources(convolved_data, segmentation_map,
Expand Down

0 comments on commit 8c20311

Please sign in to comment.