Project

General

Profile

Feature #966 ยป extendAssessment.py

prototype script - Scott Stagg, 10/27/2010 09:55 AM

 
#!/usr/bin/env python

from appionlib import appionScript
from appionlib import apDefocalPairs
from appionlib import apDatabase
import sys
import os

class ExtendAssessment(appionScript.AppionScript):
def setupParserOptions(self):
self.parser.add_option("--session", dest="session", help="session")
self.parser.add_option('--preset', dest="preset", help='preset')
def checkConflicts(self):
pass
def setRunDir(self):
self.params['rundir']=os.getcwd()
def start(self):
imagelist=apDatabase.getImagesFromDB(self.params['session'], self.params['preset'])

for imagedata in imagelist:
sibling=apDefocalPairs.getDefocusPair(imagedata)
status=apDatabase.getImgAssessmentStatus(imagedata)
apDatabase.insertImgAssessmentStatus(sibling, assessment=status, msg=True)

if __name__ == '__main__':
ea=ExtendAssessment()
ea.start()
ea.close()

    (1-1/1)