-
-
Couldn't load subscription status.
- Fork 132
Description
#270 (not merged at the time of this message, but probably will be soon) adds a centroid calculation. The trouble is that centroid algorithms can go wrong if there's a substantial un-subtracted continuum. @brechmos-stsci rightly points out in the docstring that this is essentially the user's responsibility... but we know how users can be about reading docs 😉.
So I think once #210 is in we should consider putting in a check at the top of the centroid function that tries to infer if the continuum has been subtracted. This could do something like:
- run the continuum estimation function
- ask if the resulting continuum is "close" (to be defined...) to zero.
- If no, trigger a warning "Hey user, maybe you forgot to subtract the continuum? If so your centroiding is probably going to fail...", if yes, proceed with centroiding
Definitely will want an argument to turn this off though, since a user who explicitly says "no, trust me, it is subtracted" won't want to have to have the compute expense or potential annoyance of this warning.