Page History
...
For some more useful analysis examples, in the following we'll stick to writing customized pyana modules and running pyana from the command line.
But before getting to the pyana modules, I'll briefly touch on a few items general to python that may be useful: saving files, matplotlib for plotting, and IPython for interactive work.
Saving data arrays
Here are a few examples of how you can save data arrays in python.
saving numpy arrays to numpy file
...
For more examples, see How to access HDF5 data from Python and http://code.google.com/p/h5py/
Plotting with MatPlotLib
One of the most commonly used tools for plotting in python: matplotlib. Other alternatives exist too.
Matplotlib:
...
- Or you can load arrays from a file and interactively plot them in iPython. The same ('recommended') syntax as above can be used, or if you use 'import *' you don't need to prepend the commands with the package name, which is handy when plotting interactively:
Code Block from matplotlib.pyplot import * ion() plot(array) draw()
Related useful tools and links
- http://www.scipy.org/NumPy_for_Matlab_Users
- http://www.scipy.org/
- http://www.sagemath.org/
- http://code.google.com/p/spyderlib/
Interactive analysis with IPython
Interactive analysis with IPython
The LCLS offline analysis The LCLS offline analysis group does have plans for a real interactive pyana, but currently this is not available.
2011-11-04 iPsana Interactive Analysis Framework.pdf
...
Panel | ||
---|---|---|
| ||
|
Links
- http://www.scipy.org/NumPy_for_Matlab_Users
- http://www.scipy.org/
- http://www.sagemath.org/
- http://code.google.com/p/spyderlib/
Extracting the data with pyana, some examples
...
Cloak | ||
---|---|---|
| ||
|
Image peak finding
Here are a collection of useful algorithms for image analysis: http://docs.scipy.org/doc/scipy/reference/ndimage.html
...