Closed adl1995 closed 7 years ago
The results look good to me.
You have to update the function docstring. It currently describes the old algorithm (very briefly, with one sentence summary).
Concerning implementation, I have to admit that I find the current np.bincount
followed by np.nonzero
very hard to understand (even after looking at https://docs.scipy.org/doc/numpy/reference/generated/numpy.bincount.html).
@adl1995 - Could you please try https://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html as suggested here? https://stackoverflow.com/a/25943480/498873 It should give identical results, be one line shorter/simpler and my guess is that it's also faster (although we shouldn't spend time on benchmarking that now, we'll do that once we have a complete package to find the bottlenecks: probably it's going to be the projective transform call in drawing)
@tboch - How do you want to handle updates to https://hips.readthedocs.io/en/latest/drawing_algo.html#naive-algorithm ? Would it be OK if @adl1995 updates that description to reflect the algorithm we're implementing? (e.g. that page currently still says that tiles should be split in triangles, and that query_disk is called)
@cdeil I have made the changes. Please check.
@cdeil - I'm fine with @adl1995 updating https://hips.readthedocs.io/en/latest/drawing_algo.html#naive-algorithm .
OK, I'm merging this now so that you can more easily continue with your other PRs.
@tboch - If you ever find that I merged something too quickly, please just leave another comment or open a new issue.
Made improvements to the algorithm as outlined in #43.