Skip to content

Commit

Permalink
related to #267
Browse files Browse the repository at this point in the history
actually it runs on my computer.
  • Loading branch information
kif committed Mar 31, 2016
1 parent 79d45be commit bf553cc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions sandbox/bug_267.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python
import sys
import numpy

import fabio
from pyFAI.calibration import calib, get_detector
from pyFAI.calibrant import ALL_CALIBRANTS

def get_calibrant(calibrant_name):
return ALL_CALIBRANTS[calibrant_name]

def calibration(img, calibrant_name, detector_name, wavelength):
calibrant = get_calibrant(calibrant_name)
calibrant.wavelength = wavelength
detector = get_detector(detector_name)
calib(img, calibrant, detector)

if __name__ == "__main__":
img = fabio.open(sys.argv[1]).data
print(sys.argv)
calibration(img, *sys.argv[2:])

0 comments on commit bf553cc

Please sign in to comment.