next up previous contents_motif.gif
Next: 7.6.1 Scientific.Statistics.median Up: 7 Development Previous: 7.5 Interfacing


7.6 ScientificPython-2.4.5

ScientificPython is a collection of Python modules that are useful for scientific computing. Almost all modules make extensive use of Numerical Python (NumPy,Numeric), which must be installed prior to Scientific Python. Scientific constist of about one dozen modules, which contain methods written in Python that may come handy, but may be slow. The following lists a number of them.

stat() statistics() command calculates the statistics for all the channels in the range. Using plotmean() plotrms() we can plot mean and RMS values of each channels. The examples are as shows below:

Figure 7.1: Plotting the Signal for channels in the range.
Image signal

Figure 7.2: Plotting the Mean values of signal.
Image Plot_Mean

Figure 7.3: Plotting the RMS values of signal.
Image Plot_Rms

You need to import Numeric for Scientific. You can access the methods by importing the class or all methods:

  >>> from Numeric import *
  >>> import Scientific.Statistics
  >>> Scientific.Statistics.median([1,2,3,5,6])
  3.0
or alternatively
  >>> from Scientific.Statistics import *
  >>> median([1,2,3,5,6])
  3.0

Available method in class Scientific.Statistics:

  moment(data, order, about=None, theoretical=1)
  mean(data)
  weightedMean(data, sigma)
  variance(data)
  standardDeviation(data)
  median(data)
  mode(data)
  normalizedMoment(data, order)
  skewness(data)
  kurtosis(data)
  correlation(data1, data2)

There are also two classes for histograms:

  Histogram
  WeightedHistogram(Histogram)

The following explains only those Scientific methods which are useful for Boa. Consult the scripts or the (very sparse) documentation for more info.


Subsections
next up previous contents_motif.gif
Next: 7.6.1 Scientific.Statistics.median Up: 7 Development Previous: 7.5 Interfacing
Frank Bertoldi 2005-11-10