SciAnalysis
Revision as of 15:24, 4 May 2017 by KevinYager (talk | contribs)
SciAnalysis is a set of Python scripts for batch processing of image data, including x-ray scattering detector images. The code was written primarily by Kevin Yager.
Install
- Install Python: To use SciAnalysis, you must have Python installed (preferably Python3). There are many Python distributions that can be installed. The 'right one' depends on your preferences, operating system, etc. The canonical Python distribution can be donwloaded from python.org. You may prefer to install a version of Python that handles packages/dependencies for you; e.g. Anaconda.
- Install libraries: SciAnalysis uses a bunch of standard Python libraries to perform parts of the analysis. These will of course need to be installed. You can either install them one at a time yourself, or use one of the Python environments that handles this for you.
- Required libraries
- One must have scipy, numpy, and matplotlib installed. You can install these individually, or start with a Python distribution that has these pre-loaded (such as Anaconda).
- An xml library (preferably lxml) should be installed.
- Optional libraries
- For image analysis, you may need to install Python Imaging Library.
- For reading HDF5 data files (such as those output by modern Dectris Pilatus and Eiger detectors), you will need h5py and pims.
- Required libraries
- Copy code
- Move the provided SciAnalysis folder somewhere on your computer. These are the primary code files (you generally shouldn't modify them).
- Make a copy of a "runXS.py" file, and put it somewhere. (There are examples in the folder "SciAnalysis/main/examples/".) You will end up having multiple "runXS.py" files on your computer (for different analyses you want to perform).
- Modify your "runXS.py" file, updating the line (near the top) that specifies the "SciAnalysis_PATH". You should update this to point to the location where you moved the "SciAnalysis" folder.
Usage
- Modify a particular "runXS.py" file, to specify the detector calibration, the mask, the files you want to analyze, and the protocols you want to run.
- Use Python to run the file. For example:
- python3 ./runXS.py