weecology / macroecotools

Tools for Macroecological Analyses Using Python
Other
9 stars 13 forks source link

Attempt to improve speed in plot_color_by_pt_dens() #22

Closed rueuntal closed 9 years ago

rueuntal commented 9 years ago

The new function points_on_circle() is part of an unsuccessful attempt to rewrite count_pts_within_radius(), but the function itself may be useful for other purposes. When tested with size = 50000, the modified count_pts_within_radius() is about ten times faster than the original version for logscale=0.

ethanwhite commented 9 years ago

Thanks @rueuntal! I'm a little confused by "unsuccessful attempt", is count_pts_within_radius() still working and faster now?

rueuntal commented 9 years ago

@ethanwhite Sorry about the confusion. Yes it's working, and a lot faster! In the previous version ISD would take about 20 hrs to plot (~380,000 points), which now takes about three hours. points_on_circle() is not called in count_pts_within_radius() - it is an ancillary function of my unsuccessful attempt to use a different algorithm to count points within radius, which turned out to be even slower than the original. But points_on_circle() itself is working and may be useful for some other purposes, so I kept it in.

ethanwhite commented 9 years ago

Ah, OK, got it. I should have looked a little more closely. Thanks!