disipyl.utilities (version 1.3)
index
/home/pmagwene/data/pmag/pyth/disipyl/utilities.py

Utility functions for disipyl.
 
-----------------------------------------------------------------------------
(c) Copyright by Paul M. Magwene, 2002  (mailto:paul.magwene@yale.edu)
 
    Permission to use, copy, modify, and distribute this software and its
    documentation for any purpose and without fee or royalty is hereby granted,
    provided that the above copyright notice appear in all copies and that
    both that copyright notice and this permission notice appear in
    supporting documentation or portions thereof, including modifications,
    that you make.
 
    THE AUTHOR PAUL M. MAGWENE DISCLAIMS ALL WARRANTIES WITH REGARD TO
    THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
    FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
    INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE !
-----------------------------------------------------------------------------

 
Modules
            
Numeric
UserList
cPickle
copy
os
pickle
sys
types
 
Classes
            
Histogram
UserList.UserList
Loop
 
class Histogram
      Histogram in one variable
 
From Konrad Hinsen's ScientificPython Package.
 
Constructor: Histogram(|data|, |bins|, |range|=None)
 
Arguments:
 
|data| -- a sequence of data points
 
|bins| -- the number of bins into which the data is to be sorted
 
|range| -- a tuple of two values, specifying the lower and
           the upper end of the interval spanned by the bins.
           Any data point outside this interval will be ignored.
           If no range is given, the smallest and largest
           data values are used to define the interval.
 
The bin index and the number of points in a bin can be obtained by
indexing the histogram with the bin number. Application of len()
yields the number of bins. A histogram thus behaves like a
sequence of bin index - bin count pairs.
 
   Methods defined here:
__getitem__(self, index)
__getslice__(self, first, last)
__init__(self, data, nbins, range=None)
__len__(self)
_addData(self, data)
addData(self, data)
Add the values in |data| (a sequence of numbers) to the
originally supplied data. Note that this does not affect the
default range of the histogram, which is fixed when the
histogram is created.
normalize(self, norm=1.0)
Scales all counts by the same factor such that their sum is |norm|.
normalizeArea(self, norm=1.0)
Scales all counts by the same factor such that the area under
the histogram is |norm|.

Data and non-method functions defined here:
__doc__ = 'Histogram in one variable\n \n From Konra... sequence of bin index - bin count pairs.\n '
__module__ = 'disipyl.utilities'
 
class Loop(UserList.UserList)
      Circular sequence object.
 
Indexing past last value loops back to the beginning.
 
   Methods defined here:
__getitem__(self, key)

Data and non-method functions defined here:
__doc__ = 'Circular sequence object.\n \n Indexing past last value loops back to the beginning.\n'
__module__ = 'disipyl.utilities'

Methods inherited from UserList.UserList:
_UserList__cast = __cast(self, other)
__add__(self, other)
__cmp__(self, other)
__contains__(self, item)
__delitem__(self, i)
__delslice__(self, i, j)
__eq__(self, other)
__ge__(self, other)
__getslice__(self, i, j)
__gt__(self, other)
__iadd__(self, other)
__imul__(self, n)
__init__(self, initlist=None)
__le__(self, other)
__len__(self)
__lt__(self, other)
__mul__(self, n)
__ne__(self, other)
__radd__(self, other)
__repr__(self)
__rmul__ = __mul__(self, n)
__setitem__(self, i, item)
__setslice__(self, i, j, other)
append(self, item)
count(self, item)
extend(self, other)
index(self, item)
insert(self, i, item)
pop(self, i=-1)
remove(self, item)
reverse(self)
sort(self, *args)
 
Data
             __author__ = 'Paul M. Magwene '
__credits__ = ''
__file__ = '/home/pmagwene/data/pmag/pyth/disipyl/utilities.pyc'
__name__ = 'disipyl.utilities'
__version__ = '$Revision: 1.1.1.1 $'
 
Author
             Paul M. Magwene <paul.magwene@yale.edu>
 
Credits