Metadata-Version: 1.0
Name: SimpleHist
Version: 0.1
Summary: Simple histogram classes, designed for data manipulation
Home-page: https://github.com/ndevenish/simplehistogram
Author: Nicholas Devenish
Author-email: n.e.devenish@sussex.ac.uk
License: Copyright (c) 2011 Nicholas Devenish <n.e.devenish@sussex.ac.uk>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


Description: SimpleHist
        ==========
        
        :Description: A very simple ndarray-based histogram class.
        :Author:      Nicholas Devenish
        
        Overview
        --------
        
        Matplotlib histograms are geared around drawing, not
        data manuipulation. Numpy direct support for histograms is
        extremely limited, and not very different from matpotlib.
        This is intended to turn into a set of very lightweight classes
        for shuffling data around. This is very much a work-in-progress.
        
        The only required depenency is numpy, and the package is designed
        to work for python > 2.6
        
        Type "make test" to run the core unit tests. Some tests, such
        as the pyROOT-based tests, must be run explicitly (or through
        python2.7> unittest discovery). At the moment, the ROOT test
        requires pyROOT, which is why it doesn't run by default as not
        many people have (or need) this dependency. 
        
        Usage
        -----
        
        A summary of usage, taken from the hists.py docstring follows:
        
        Importing:
          >>> from simplehist import Hist
        
        Initialise with bin indices:
          >>> a = Hist([0, 1, 2, 3])
          >>> a.bincount
          3
          >>> a.bins
          (0, 1, 2, 3)
          >>> a.data
          array([ 0.,  0.,  0.])
        
        Optionally include data:
          >>> a = Hist([0, 1, 2, 3], data=[1, 0.2, 3])
          >>> a.data
          array([ 1. ,  0.2,  3. ])
        
        Or just specify the blank data type:
          >>> a = Hist([0, 1, 2, 3], dtype=int)
          >>> a.data
          array([0, 0, 0])
        
        You can do arithmetic operations in place or seperately:
          >>> a = Hist([0, 1, 2, 3], data=[1, 0.2, 3])
          >>> b = a + a
          >>> b -= a
          >>> a.data == b.data
          array([ True,  True,  True], dtype=bool)  
        
        And you can fill bins from values:
          >>> a = Hist([0,1,2,3])
          >>> a.fill(1.4, weight=3)
          >>> a.data
          array([ 0.,  3.,  0.])
        
        Even out of range:
          >>> a = Hist([0,1])
          >>> a.fill(-10)
          >>> a.underflow
          1.0
        
        If you use pyROOT, you can convert from 1D histograms:
          >>> type(source)
          <class 'ROOT.TH1D'>
          >>> convert = fromTH1(source)
          >>> type(convert)
          <class 'simplehist.hists.Hist'>
        
        And you can draw histograms, using any of the options
        that can be passed to matplotlib.pyplot.hist:
        
          >>> hist_object.draw_hist(lw=2)
        
Keywords: histogram
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Topic :: Software Development :: Libraries :: Python Modules
