On Fri, Oct 2, 2015 at 12:24 PM, Srikrishna Sekhar <
kri...@gmail.com> wrote:
> Hi,
>
> My routine seems to match scipy.stats.sigmaclip, within a few percent either
> way on my benchmarks. Looking at the scip.stats.sigmaclip code, I'm using
> almost the exact same algorithm which explains the performance.
>
> Right now I'm trying to add in astropy.stats.sigma_clip's functionality and
> see what happens to the performance. If there is still an improvement on the
> astropy function, I will submit a pull request. This way we won't have to
> pull in the scipy dependency for this function.
To be honest I don't think we should be reinventing the wheel (where
there is no obvious benefit).
I've mentioned multiple times in the recent past (and this comment
isn't specifically directed at you Srikrishna) that we should make
scipy a hard requirement. The previous reason for not doing so was
installation difficulty. But that is much less a problem now than it
was 5 years ago, both due to improvements in packaging and wider use
of scientific Python distributions.
So if there's no tangible performance benefit to your sigma_clip
function over the one in scipy, I don't think we should be adding
additional code that needs to be maintained to Astropy. Instead, if
there are improvements that can be made to the scipy implementation I
would suggest making them directly in scipy.
That said, don't hesitate to make a PR and we can discuss further there.
Thanks,
Erik