Beam Profile Analysing Tools
Library provides methods to work with Beam Profiles which are sets of points
(might be 2-D or 3-D also with extra metadata) sorted by one of coordinates.
beprof is based on nparray class from numpy, and it provides
numerous tools for different computations and data analysis.
This module is dedicated for Python 3.x users
Current version (0.1.0) is not available on PyPi, although once a
stable version is ready it will be pushed to PyPi repo.
For now, installation can be done from this GIT repository, using
~$ pip3 install git+https://github.com/grzanka/beprof.git@master
(where @master
refers to the name of a branch)
To unistall, simply use:
~$ pip3 uninstall beprof
Once you install beprof, you should be able to import is as a python module
Using ipython the code would be i.e.
import beprof
from beprof import curve #imports curve module
from beprof import profile #imports profile module
Once you import necessary modules, you can use them to work with i.e. profiles:
from beprof import profile
dir(profile)
p = profile.Profile([[0, 1], [1, -1], [2, 3], [4, 0]])
print(p)
A few examples of data you can work with using beprof can be downloaded from
another branch of this project named feature/examples
https://github.com/grzanka/beprof.git
You can also use another modules as numpy or matplotlib to work with beprof:
#assuming you already defined p as above
import numpy as np
import matplotlib.pyplot as plt
foo = np.asarray(p)
print(foo.shape())
plt.plot(foo[:,0], foo[:,1])
plt.show()