-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module 'twirl' has no attribute 'find_peaks' #19
Comments
Hi @mrobberto, I hope you're well. There have been some breaking changes in version v0.3.* which is consistent with a pre v1 from a semver sense, but we need to update the documentation it seems as that is referencing the old API. I'll let @lgrcia advise on the equivalent function in v0.3.*. |
Hi @mrobberto, thanks for reporting this issue. As @michealroberts explains, the function has been dropped from the last version. The main reason was that I found the function simple enough to remove it it from Looking back at the readme (that contains the only reference to this function), I think it is still nice to have such a function available. I propose to make a # not tested - need docs
# -----------------------
from astropy.stats import sigma_clipped_stats
from photutils.segmentation import SourceFinder, SourceCatalog
def find_peaks(data, sigma=6):
mean, median, std = sigma_clipped_stats(data, sigma=3.0)
segmented = SourceFinder(5)(data - median, sigma * std)
cat = SourceCatalog(data, segmented)
return (
cat.to_table()
.to_pandas()
.sort_values("area", ascending=False)[["xcentroid", "ycentroid"]]
.values
) and bring the What do you think? |
hi Lionel, |
Thanks for the feedback. You mentioned The documentation should be hosted on twirl.readthedocs.io so I prefer to check we don't have alternative docs out there. |
Bug Report
I am getting this error
that is not present with an earlier version of the code.
How To Reproduce
pip install twirl
python
import twirl
twirl.[TAB]
Code sample
Environment
Screenshots
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered: