Project

General

Profile

Make DE movie stack » correctstack.py

Anchi Cheng, 06/18/2012 09:39 PM

 
#!/usr/bin/env python
import sys
from appionlib import apDDprocess, apDatabase
from pyami import mrc

if __name__ == '__main__':
dd = apDDprocess.DirectDetectorProcessing()
if len(sys.argv) != 2:
print 'Usage: correctframes.py image'
print ' image (str or int): imagefilename or imageid'
sys.exit()
imagevalue = sys.argv[1]
try:
imageid = int(imagevalue)
dd.setImageId(imageid)
except ValueError:
imgtree = apDatabase.getSpecificImagesFromDB([imagevalue])
dd.setImageData(imgtree[0])
stackpath = dd.makeCorrectedRawFrameStack('.')
print stackpath
(2-2/2)