Exemple #1
0
 def setreagenttemp(self,temp=None):
     if temp is None:
         worklist.pyrun("RIC\\ricset.py IDLE")
         decklayout.REAGENTPLATE.liquidTemp=22.7
     else:
         worklist.variable("dewpoint",temp,userprompt="Enter dewpoint",minval=0,maxval=20)
         worklist.variable("rictemp","~dewpoint~+2")
         worklist.pyrun("RIC\\ricset.py ~rictemp~")
         decklayout.REAGENTPLATE.liquidTemp=temp+2   # Assumes that temp is the one used
Exemple #2
0
 def setreagenttemp(self, temp=None):
     if temp is None:
         worklist.pyrun("RIC\\ricset.py IDLE")
         decklayout.REAGENTPLATE.liquidTemp = 22.7
     else:
         worklist.variable("dewpoint",
                           temp,
                           userprompt="Enter dewpoint",
                           minval=0,
                           maxval=20)
         worklist.variable("rictemp", "~dewpoint~+2")
         worklist.pyrun("RIC\\ricset.py ~rictemp~")
         decklayout.REAGENTPLATE.liquidTemp = temp + 2  # Assumes that temp is the one used
Exemple #3
0
    def volcheck(self,tipMask,well,volToRemove):
        '''Check if the well contains the expected volume'''
        if self.lastvolcheck is not None:
            # Decide if a volume check is needed
            if volToRemove==0:
                # No need to check if not removing anything and it has been checked previously (i.e. lastvolcheck is not None)
                return
            if self.volume-volToRemove > max(30,self.lastvolcheck-200) or self.volume-volToRemove>200:
                # Not needed
                return
        self.lastvolcheck=self.volume
        height=self.plate.getliquidheight(self.volume)
        gemvol=self.plate.getgemliquidvolume(height)	# Volume that would be reported by Gemini for this height
        if gemvol is None:
            logging.warning( "No volume equation for %s, skipping initial volume check"%self.name)
            return

        volwarn=self.volume*0.80
        heightwarn=min(self.plate.getliquidheight(volwarn),height-1.0)	# threshold is lower of 1mm or 80%
        gemvolwarn=self.plate.getgemliquidvolume(heightwarn)	# Volume that would be reported by Gemini for this height

        volcrit=self.plate.unusableVolume*0.8+volToRemove
        heightcrit=self.plate.getliquidheight(volcrit)
        gemvolcrit=self.plate.getgemliquidvolume(heightcrit)	# Volume that would be reported by Gemini for this height
    
        worklist.flushQueue()
        worklist.comment( "Check that %s contains %.1f ul (warn< %.1f, crit<%.1f), (gemvol=%.1f (warn<%.1f,crit<%.1f); height=%.1f (>%.1f) )"%(self.name,self.volume,volwarn,volcrit,gemvol,gemvolwarn,gemvolcrit,height,heightwarn))
        tipnum=0
        tm=tipMask
        while tm>0:
            tm=tm>>1
            tipnum+=1

        volvar='detected_volume_%d'%tipnum
        worklist.variable(volvar,-2)
        worklist.detectLiquid(tipMask,well,self.inliquidLC,self.plate)
        doneLabel=worklist.getlabel()
        worklist.condition(volvar,">",gemvolwarn,doneLabel)
        ptmp=clock.pipetting;
        warnLabel=worklist.getlabel()
        worklist.condition(volvar,">",gemvolcrit,warnLabel)
        worklist.moveliha(worklist.WASHLOC)	# Get LiHa out of the way
        msg="Failed volume check of %s - should have  %.0f ul (gemvol=~%s~, crit=%.0f)"%(self.name,self.volume,volvar,gemvolcrit)
        worklist.email(dest='*****@*****.**',subject=msg)
        worklist.stringvariable("response","retry",msg+" Enter 'ignore' to ignore and continue, otherwise will retry.")
        worklist.condition("response","==","ignore",doneLabel)
        # Retry
        worklist.detectLiquid(tipMask,well,self.inliquidLC,self.plate)
        worklist.condition(volvar,">",gemvolcrit,doneLabel)
        worklist.stringvariable("response","retry","Still have <%.0f. Enter 'ignore' to ignore and continue, otherwise will retry."%self.volume)
        worklist.condition("response","==","ignore",doneLabel)
        # Retry again
        worklist.detectLiquid(tipMask,well,self.inliquidLC,self.plate)
        worklist.condition(volvar,">",gemvolcrit,doneLabel)
        worklist.stringvariable("response","ignore","Still have <%.0f. Will continue regardless."%self.volume)
        worklist.condition("response","!=","warn",doneLabel)

        worklist.comment(warnLabel)
        msg="Warning: volume check of %s - should have  %.0f ul (gemvol=~%s~, warn=%.0f, crit=%.0f)"%(self.name,self.volume,volvar,gemvolwarn,gemvolcrit)
        worklist.email(dest='*****@*****.**',subject=msg)
        worklist.comment(doneLabel)
        clock.pipetting=ptmp   # All the retries don't usually happen, so don't count in total time
        self.addhistory("LD",0,tipMask)
Exemple #4
0
    def volcheck(self, tipMask, well, volToRemove):
        '''Check if the well contains the expected volume'''
        if self.lastvolcheck is not None:
            # Decide if a volume check is needed
            if volToRemove == 0:
                # No need to check if not removing anything and it has been checked previously (i.e. lastvolcheck is not None)
                return
            if self.volume - volToRemove > max(
                    30, self.lastvolcheck -
                    200) or self.volume - volToRemove > 200:
                # Not needed
                return
        self.lastvolcheck = self.volume
        height = self.plate.getliquidheight(self.volume)
        gemvol = self.plate.getgemliquidvolume(
            height)  # Volume that would be reported by Gemini for this height
        if gemvol is None:
            logging.warning(
                "No volume equation for %s, skipping initial volume check" %
                self.name)
            return

        volcrit = self.plate.unusableVolume * 0.8 + volToRemove
        volwarn = min(volcrit, self.volume * 0.80)

        heightwarn = min(self.plate.getliquidheight(volwarn),
                         height - 1.0)  # threshold is lower of 1mm or 80%
        gemvolwarn = self.plate.getgemliquidvolume(
            heightwarn
        )  # Volume that would be reported by Gemini for this height

        heightcrit = self.plate.getliquidheight(volcrit)
        gemvolcrit = self.plate.getgemliquidvolume(
            heightcrit
        )  # Volume that would be reported by Gemini for this height

        worklist.flushQueue()
        worklist.comment(
            "Check that %s contains %.1f ul (warn< %.1f, crit<%.1f), (gemvol=%.1f (warn<%.1f,crit<%.1f); height=%.1f (>%.1f) )"
            % (self.name, self.volume, volwarn, volcrit, gemvol, gemvolwarn,
               gemvolcrit, height, heightwarn))
        tipnum = 0
        tm = tipMask
        while tm > 0:
            tm = tm >> 1
            tipnum += 1

        volvar = 'detected_volume_%d' % tipnum
        worklist.variable(volvar, -2)
        worklist.detectLiquid(tipMask, well, self.inliquidLC, self.plate)
        doneLabel = worklist.getlabel()
        worklist.condition(volvar, ">", gemvolwarn, doneLabel)
        ptmp = clock.pipetting
        warnLabel = worklist.getlabel()
        worklist.condition(volvar, ">", gemvolcrit, warnLabel)
        worklist.moveliha(worklist.WASHLOC)  # Get LiHa out of the way
        msg = "Failed volume check of %s - should have  %.0f ul (gemvol=~%s~, crit=%.0f)" % (
            self.name, self.volume, volvar, gemvolcrit)
        worklist.email(dest='*****@*****.**', subject=msg)
        worklist.stringvariable(
            "response", "retry", msg +
            " Enter 'ignore' to ignore and continue, otherwise will retry.")
        worklist.condition("response", "==", "ignore", doneLabel)
        # Retry
        worklist.detectLiquid(tipMask, well, self.inliquidLC, self.plate)
        worklist.condition(volvar, ">", gemvolcrit, doneLabel)
        worklist.stringvariable(
            "response", "retry",
            "Still have <%.0f. Enter 'ignore' to ignore and continue, otherwise will retry."
            % self.volume)
        worklist.condition("response", "==", "ignore", doneLabel)
        # Retry again
        worklist.detectLiquid(tipMask, well, self.inliquidLC, self.plate)
        worklist.condition(volvar, ">", gemvolcrit, doneLabel)
        worklist.stringvariable(
            "response", "ignore",
            "Still have <%.0f. Will continue regardless." % self.volume)
        worklist.condition("response", "!=", "warn", doneLabel)

        worklist.comment(warnLabel)
        msg = "Warning: volume check of %s - should have  %.0f ul (gemvol=~%s~, warn=%.0f, crit=%.0f)" % (
            self.name, self.volume, volvar, gemvolwarn, gemvolcrit)
        worklist.email(dest='*****@*****.**', subject=msg)
        worklist.comment(doneLabel)
        clock.pipetting = ptmp  # All the retries don't usually happen, so don't count in total time
        self.addhistory("LD", 0, tipMask, "detect")