Skip to content

Use a simple Quad Tree to generate a 2D histogram

License

Notifications You must be signed in to change notification settings

jradavenport/qthist2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quad Tree Histogram 2D

DOI

Use a Quad Tree approach to create adaptive bin sizes and compute a histogram (counts or density) in 2 dimensions. Can specify limit on number of points per bin, and how many levels in the tree to go down. Uses np.histogram2d to lazily build each level of the tree, may be slow for very large number of points, or N levels.

qthist2d example

Some simple experiments with using a triangular mesh included as well, but abandoned for now since KDTree & Ball Tree ideas already exist that are probably better suited for many other cases.

This project was developed in part at the online.tess.science meeting, which took place globally in 2020 September.

Code originally developed for the EBHRD project