-
Notifications
You must be signed in to change notification settings - Fork 3
Home
spipy : Python tools for XFEL Single-Particle-Imaging analysis and reconstruction
-
analyse
- q ------------- tools for pixel transmission between reciprocal space and real space
- saxs ---------- tools for generating and analyzing averaged intensity profile (SAXS)
- orientation --- tools for 3D orientation ssampling, analysis and visualization
- SH_expan ------ (spherical) harmonics analysis
- criterion ----- metrics for SPI reconstruction
- rotate -------- 3D matrix rotation and alignment
-
image
- radp ---------- radial profile tools and spherical/circle shells/solid generation
- quat ---------- quaternion calculation
- classify ------ single particle diffraction classification
- preprocess ---- pretreatment tools for raw data
- io ------------ read/write data from/to different formats
-
merge
- emc ----------- orientation recovery and merging using EMC algorithm
- utils --------- utility functions for merging, such as slices generation and merge, etc
-
phase
- phase2d ------- 2d phasing algorithms : relaxed averaged alternating reflections, difference map and error reduction
- phase3d ------- 3d phasing algorithms : relaxed averaged alternating reflections, difference map and error reduction
-
simulate
- sim ----------- simulate diffraction photon patterns from pdb files, by direct Fourier transformation of density map
- sim_adu ------- simulate diffraction intensity patterns from pdb files, by atom scattering simulation
Example :
from spipy.analyse import saxs
import spipy.image as spiimage
The package need Anaconda python2.7 version installed in advance. Download here
2.1 Download
git clone https://github.com/LiuLab-CSRC/spipy.git
2.2 Make file
[Firstly]
To fully compile this program, MPI and openmp are required. But, if you don't need to use spipy.merge.emc (module) and spipy.simulation.sim (module), you can skip the compiling of these two parts and use other functions of this package:
# After putting the downloaded package to somewhere you want, then cd into the package and run
./make_all.sh -x
Fully compiling:
# After putting the downloaded package to somewhere you want, then cd into the package and run
./make_all.sh
[Then you should know]
As macos/OSX do not support openMP for its built-in clang, you are required to specify another gcc compiler with MPI and openMP installed (We recommend gcc-7 or higher). Besides, if you are using Linux, notice that 'mpicc' in Anaconda can not be used to compile this program, you need to install independent openmpi (version > 2.0.0) in your computer.
[How to install openmpi on Linux or gcc-7/openmpi on Mac ?]
# install gcc-7 for Mac, recommend to use HomeBrew
brew install gcc@7
# build openmpi from source for both Linux and Mac (You can also use HomeBrew in Mac)
wget https://www.open-mpi.org/software/ompi/v3.1/downloads/openmpi-3.1.0.tar.gz
tar -xf openmpi-3.1.0.tar.gz
cd openmpi-3.1.0
./configure --prefix=/Your-Install-Path
make
make install
# add installation path to your ~/.bashrc (or ~/.bash_profile)
vim ~/.bashrc
# export PATH="/Your-Install-path/bin:$PATH"
# export LD_LIBRARY_PATH="/Your-Install_path/lib/:$LD_LIBRARY_PATH"
source ~/.bashrc
# install gsl for both Linux and Mac
# Mac
brew install gsl
# ubnutu
apt-get install libgsl0-dev libgsl0-bin
# Centos
yum install gsl-devel
2.3 Appendix Info
All dependencies for miniconda2 (clean Python 2.7)
numpy
, scipy
, scikit-learn
, matplotlib
, h5py
, numexpr
, psutil
, mpi4py
You can refer to help function of spipy or its modules to get immediate help. For example :
"Anaconda Ipython 2.7"
>> import spipy
>> spipy.help()
>> spipy.phase.help()
>> spipy.phase.phase2d.help("function_name")
In the test_spipy
directory, you can find examples about how to use functions in every modules. For example :
cd ./test_spipy/image
# read file
open test_classify.py
# run file
python test_classify.py #some scripts need command line parameters
Any questions or bug report please contact [email protected]