Skip to content

Commit

Permalink
Using sep-pjw as substitute for sep
Browse files Browse the repository at this point in the history
SEP is not maintained anymore, so I'm using Peter J Watson's sep fork for source extraction.
  • Loading branch information
martinberoiz committed Oct 13, 2024
1 parent 6aba41b commit e7226e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion astroalign.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def register(

def _find_sources(img, detection_sigma=5, min_area=5, mask=None):
"""Return sources (x, y) sorted by brightness."""
import sep
import sep_pjw as sep

image = img.astype("float32")
bkg = sep.Background(image, mask=mask)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainers = [{ name = "Martin Beroiz", email = "[email protected]" }]
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.7"
dependencies = ["numpy>=1.17", "scipy>=0.15", "scikit-image", "sep"]
dependencies = ["numpy>=1.17", "scipy>=0.15", "scikit-image", "sep-pjw"]
license = { file = "LICENSE.txt" }
keywords = [
"astronomy",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def compare_image(self, the_image):
"""Return the fraction of sources found in the reference image"""
# pixel comparison is not good, doesn't work. Compare catalogs.
full_algn = the_image.astype("float32")
import sep
import sep_pjw as sep

bkg = sep.Background(full_algn)
thresh = 5.0 * bkg.globalrms
Expand Down Expand Up @@ -724,7 +724,7 @@ def compare_image(self, the_image):
"""Return the fraction of sources found in the reference image"""
# pixel comparison is not good, doesn't work. Compare catalogs.
full_algn = np.mean(the_image, axis=-1, dtype="float32")
import sep
import sep_pjw as sep

bkg = sep.Background(full_algn)
thresh = 5.0 * bkg.globalrms
Expand Down

0 comments on commit e7226e2

Please sign in to comment.