本文整理汇总了Python中experiment.Experiment.shakerIsActive方法的典型用法代码示例。如果您正苦于以下问题:Python Experiment.shakerIsActive方法的具体用法?Python Experiment.shakerIsActive怎么用?Python Experiment.shakerIsActive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类experiment.Experiment
的用法示例。
在下文中一共展示了Experiment.shakerIsActive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getJob
# 需要导入模块: from experiment import Experiment [as 别名]
# 或者: from experiment.Experiment import shakerIsActive [as 别名]
def getJob(self):
'Return the next job on the queue to execute, removing it from queue'
if self.runningJob!=None:
print "Call of getJob() while a job is running - returning None"
return None
# Remove any shake jobs that are unneeded
for id,j in self.jobs.items():
if j['type']=='shake' and len(j['prereqs'])==0 and j['sample'].isMixed() and not Experiment.shakerIsActive():
#print "Removing unneeded shake job ",id
self.removeJob(id)
for id in self.jobs:
j=self.jobs[id]
if j['type']!='transfer' or len(j['prereqs'])>0 or j['src'].plate.curloc!='Home' or j['dest'].plate.curloc!='Home':
#if j['type']=='transfer':
# print "Can't execute job ",id,": ",j,", curlocs=",j['src'].plate.curloc,", ",j['dest'].plate.curloc
continue
return id
for id,j in self.jobs.iteritems():
if j['type']!='multitransfer' or len(j['prereqs'])>0 or j['src'].plate.curloc!='Home' or j['dest'].plate.curloc!='Home':
continue
# Combine with all other multitransfers from same src
alldest=[]
allvol=[]
for id2,j2 in self.jobs.items():
if j2['type']!='multitransfer' or len(j2['prereqs'])>0 or j['src']!=j2['src']:
continue
alldest.append(j2['dest'])
allvol.append(j2['volume'])
self.removeJob(id2)
combined=self.addMultiTransfer(volume=allvol,src=j['src'],dest=alldest,prereqs=[])
return combined
for id in self.jobs:
j=self.jobs[id]
if j['type']!='shake' or len(j['prereqs'])>0 or not j['sample'].plate.curloc=='Home' or Experiment.shakerIsActive():
continue
return id
# Nothing to do
return None