Home / Version 2015-02-25
Name Modified Size InfoDownloads / Week
Parent folder
diff2jpg_20150225.zip 2015-02-27 859.5 kB
ReadMe.txt 2015-02-27 2.2 kB
Totals: 2 Items   861.7 kB 0
Diff2jpg.py

This script can convert raw diffraction images to JPEG files.
Support ADSC, MarCCD, Mar345, RAXIS and PILATUS, and can be run on Windows, Linux and Mac OS X.

Written by Feng Yu.
Shanghai Synchrotron Radiation Facility, SSRF
Email: yufeng<at>sinap.ac.cn

Major changes:
2015.02.25
Font size and width of resolution circles can be changed.

2014.08.25
Optimize Auto-level algorithm 

2014.08.08
Mar345 format support was added.

2014.07.23
Optimize Auto-level output.

2014.01.25
PILATUS format support was added.

2013.10.27
Auto-level was added.

2012.07.29
First version

Dependencies:
Python (2.6 or later, Python 3.x is not supported)
https://www.python.org/downloads/

PIL
http://www.pythonware.com/products/pil/

Numpy
http://www.scipy.org/scipylib/download.html

Fabio (0.1.4 or later, optional, needed for Mar345 and PILATUS)
http://sourceforge.net/projects/fable/files/fabio/

On Windows, all dependencies have binary packages. On Linux and Mac OS X, you can download and compile source, or install through apt-get, yum, fink or Macports

Usage:
On Windows:
   python diff2jpg.py [options] file1 file2 ...

On Linux and Mac OS X:
   You should modify the first line to your python path. (#!/usr/bin/env python is default.)
   diff2jpg.py [options] file1 file2 ...

Options:
    -a    Draw beam center, resolution circles and information.
    -b    Draw beam center.
    -r    Draw resolution circles.
    -n    Number of resolution circles. (default = 3)
    -d    Draw specified resolution circles.
    -c    Draw lines, circles and text with colors.
    -x    X position of beam center (in millimeter).
    -y    Y position of beam center (in millimeter).
    -i    Print image information.
    -f    Get beam center from image file. (Image center is default)
    -t    Set font size.  (default = 1)
    -l    Draw wider resolution circles. (default = false)
    -h    Help information.

Examples:
1. diff2jpg.py -ac TxtE_1_001.img
2. diff2jpg.py -acf lyso2b_9kev_195mm_1_0001.cbf
3. diff2jpg.py -a -x81.2 -y81 duf04_001.mccd
4. diff2jpg.py -acf -n10 Mu2330_001.osc
5. diff2jpg.py -bcf -d2.5 duf03_001.mar3450

Source: ReadMe.txt, updated 2015-02-27