Skip to main content

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

latbin-0.1.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

latbin-0.1.1.macosx-10.5-i386.exe (71.7 kB view details)

Uploaded Source

File details

Details for the file latbin-0.1.1.tar.gz.

File metadata

  • Download URL: latbin-0.1.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for latbin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a8dc3ae7e5ce53a462e9c702d394f9c8a9f8648f05b75a039c1349ae4e6ff3f6
MD5 e80162ee620dae247259520e3724dfb8
BLAKE2b-256 5bf4c17a999efd69e86fb460ec59367f986a07b20071cb045ca7b6099a9ad2d3

See more details on using hashes here.

File details

Details for the file latbin-0.1.1.macosx-10.5-i386.exe.

File metadata

File hashes

Hashes for latbin-0.1.1.macosx-10.5-i386.exe
Algorithm Hash digest
SHA256 7d1bb5717b420d7b34c7d0ead43bef5dbad7aab3d23582428f4b605817d3683f
MD5 d46ea4fb95379632136d36204c3d0a07
BLAKE2b-256 1d19546d087041f6d63d8c2fcb161ed2406a87f2a85b75b20f63ecc184626849

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page