Python lattice binning package for large data
Project description
This python package is used for binning onto lattices in multiple dimensions.
Why Use Lattices
For “regular” 2D histogramming you implicitly use a Z2 lattice! But the errors involved with quantizing to a Z2 lattices is larger than A2.
insert plot here showing proper comparison of Z2 and A2 give name of file which creates Z2-A2 comparison
Basic Example
This example shows how to take a normal data set and histogram the data onto an A2 (aka honeycomb) lattice using latbin.
import latbin
import numpy as np
# create some fake data with shape (npts,ndim)
npts,ndim = 60000,2
data = np.random.normal(size=(npts, ndim))*4.0
# create an A2 lattice (honeycomb binning)
a2 = latbin.ALattice(2)
# histogram the data onto A2 Lattice
h = a2.histogram(data)
# get the lattice points in the data space
centers = h.centers()
# show the result
import matplotlib.pylab as plt
plt.title("Honeycomb binning (A2 Lattice)")
plt.scatter(centers[:,0],centers[:,1],c=h.values(), s=70)
plt.show()
Installation
In the terminal you can install this in the usual way.
python setup.py install
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file latbin-0.1.2.tar.gz.
File metadata
- Download URL: latbin-0.1.2.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b13e24bc89236d9c9fa2d1d99aba1d6281b7ec2d2f39e7fe852c67875f2ab83
|
|
| MD5 |
f9cb4b837140283c60cfd7cf9951017c
|
|
| BLAKE2b-256 |
f63bdf2a03925103b60bc99d5c8c5ab01690a9f14223f8f33cdc9ed374c0d610
|
File details
Details for the file latbin-0.1.2.macosx-10.5-i386.exe.
File metadata
- Download URL: latbin-0.1.2.macosx-10.5-i386.exe
- Upload date:
- Size: 71.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e6717c44c27c2445970c02decd9af9ea290359aa9727edd7e86e965829f7663
|
|
| MD5 |
8b3d9d463871c84d36c24bcd785daac9
|
|
| BLAKE2b-256 |
4b1a84d636c4c6784b8d8311d6baa3625dc598c6355b6d9da2ddabf61fa6f0a8
|