photutils
photutils copied to clipboard
WIP: Allow a 2D threshold in StarFinder classes
As @rainerschoedel noted in https://github.com/astropy/photutils/issues/1284 a non-uniform threshold over an image would be nice to have. As find_peaks already supports this, it appeared to be relatively straightforward to implement in the StarFinder
classes.
I won't have much time the next few weeks, so if is this PR is something that you would consider merging let me know and I'll clean it up when I find the time.
What needs a bit of work
- Reading the table in tests with 2D threshold is really hacky.
- A test with an image with variable background to see it in action
- A bit of QOL: Verify the shapes of threshold and data as soon as possible and report understandable error
What I'm not sure about
- Is padding the threshold with zeros the right thing to do? Or should it just be restricted to be used with
exclude_border
?
Hello @krachyon! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
- In the file
photutils/detection/daofinder.py
:
Line 415:5: E301 expected 1 blank line, found 0