photutils icon indicating copy to clipboard operation
photutils copied to clipboard

WIP: Allow a 2D threshold in StarFinder classes

Open krachyon opened this issue 2 years ago • 1 comments

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?

krachyon avatar Feb 11 '22 10:02 krachyon

Hello @krachyon! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 415:5: E301 expected 1 blank line, found 0

pep8speaks avatar Feb 11 '22 10:02 pep8speaks