Exemple #1
0
    def save_pipette_values(self):
        """Save pipette values to otone_data/pipette_values.json
        """
        if debug == True: FileIO.log('head.save_pipette_values called')
        pipette_values = {}

        for axis in self.PIPETTES:
            pipette_values[axis] = {}
            for k, v in self.PIPETTES[axis].__dict__.items():
                pipette_values[axis][k] = v

            # should include:
            #  'top'
            #  'bottom'
            #  'blowout'
            #  'droptip'
            #  'volume'
            #  'theContainers'

        filetext = json.dumps(pipette_values,sort_keys=True,indent=4,separators=(',',': '))
        if debug == True: FileIO.log('filetext: ', filetext)
        
        filename = os.path.join(self.dir_par_par_path,'otone_data/pipette_calibrations.json')

        # save the pipette's values to a local file, to be loaded when the server restarts
        FileIO.writeFile(filename,filetext,lambda: FileIO.onError('\t\tError saving the file:\r\r'))      
Exemple #2
0
 def save_containers(self, containers_data):
     containers_text = json.dumps(containers_data,sort_keys=True,indent=4,separators=(',',': '))
     filename = os.path.join(self.dir_path,'otone_data/containers.json')
     FileIO.writeFile(filename,container_text,lambda: FileIO.onError('\t\tError saving the file:\r\r'))              
Exemple #3
0
 def save_containers(self, containers_data):
     logger.debug('deck.save_containers called')
     containers_text = json.dumps(containers_data,sort_keys=True,indent=4,separators=(',',': '))
     logger.debug('containers_text: {}'.format(containers_text))
     filename = os.path.join(self.dir_path,'otone_data/containers.json')
     FileIO.writeFile(filename,container_text,lambda: FileIO.onError('\t\tError saving the file:\r\r'))