Skip to content

A python histogram object for scientific data-reduction and statistical analysis

License

Notifications You must be signed in to change notification settings

janpipek/histogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

image

histogram

A histogram object written in Python for scientific data-reduction and statistical analysis

The primary object of this module is a continuous-domain histogram. Any number of dimensions is supported though only the lower dimensions can be visualized. For more information, see the following documentation:

This package is dependent on NumPy and SciPy, provides methods for producing and showing graphics through Matplotlib and can be serialized via python's pickling, NumPy's binary format or HDF5.

For collecting statistics on discrete keys or catagories you may want to look into the collections.Counter class.

Quick Start

In this module, the histogram is elevated to its own object, effectively merging the array and associated edges returned by the numpy.histogramdd() method. Creating, filling and displaying a histogram should be as simple as this example:

import numpy as np
from matplotlib import pyplot
from histogram import Histogram, plothist

np.random.seed(1)

h = Histogram(100,[0,10])
h.fill(np.random.normal(5,1,10000))
plothist(h)

pyplot.show()

Example Histogram

Example Histogram

Similar Packages and Software

While there is no lack of other histogramming libraries out there, most have a narrow focus or seem to be quickly put together, lacking documentation, or are part of a much larger analysis framework. The goal of this project is to be a solution for all python developers who want just a bit more functionality than that provided by NumPy's histogramdd() method.

This project took many cues from the following python packages, trying to merge the features of each one into a single object:

Furthermore, the author was greatly influenced by the histogram classes found in CERN's ROOT data analysis framework.

About

A python histogram object for scientific data-reduction and statistical analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages