-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
actually it runs on my computer.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:]) |