def rawAISample(self, channel0PGAMUX = 8, channel1PGAMUX = 9, channel2PGAMUX = 10, channel3PGAMUX = 11, UpdateIO = False, LEDState = True, IO3toIO0States = 0, EchoValue = 0):
        """
        Name: U12.rawAISample(channel0PGAMUX = 8, channel1PGAMUX = 9,
                              channel2PGAMUX = 10, channel3PGAMUX = 11,
                              UpdateIO = False, LEDState = True,
                              IO3toIO0States = 0, EchoValue = 0)
        
        Args: channel0PGAMUX, A byte that contains channel0 information
              channel1PGAMUX, A byte that contains channel1 information
              channel2PGAMUX, A byte that contains channel2 information
              channel3PGAMUX, A byte that contains channel3 information
              IO3toIO0States, A byte that represents the states of IO0 to IO3
              UpdateIO, If true, set IO0 to IO 3 to match IO3toIO0States
              LEDState, Turns the status LED on or off.
              EchoValue, Sometimes, you want what you put in.
        
        Desc: Collects readings from 4 analog inputs. It can also toggle the
              status LED and update the state of the IOs. See Section 5.1 of
              the User's Guide.
              
              By default it will read AI0-3 (single-ended).
              
        Returns: A dictionary with the following keys:
            PGAOvervoltage, A bool representing if the U12 detected overvoltage
            IO3toIO0States, a BitField representing the state of IO0 to IO3
            Channel0-3, the analog voltage for the channel
            EchoValue, a repeat of the value passed in.
            
        Example:
        >>> import u12
        >>> d = u12.U12()
        >>> d.rawAISample()
        {
          'IO3toIO0States':
            <BitField object: [ IO3 = Low (0), IO2 = Low (0),
                                IO1 = Low (0), IO0 = Low (0) ] >,
          'Channel0': 1.46484375,
          'Channel1': 1.4501953125,
          'Channel2': 1.4599609375,
          'Channel3': 1.4306640625,
          'PGAOvervoltage': False,
          'EchoValue': 0
        }

        """
        command = [ 0 ] * 8
        
        # Bits 6-4: PGA for 1st Channel
        # Bits 3-0: MUX command for 1st Channel
        command[0] = int(channel0PGAMUX)
        
        tempNum = command[0] & 7 # 7 = 0b111
        channel0Number = tempNum if (command[0] & 0xf) > 7 else tempNum+8
        channel0Gain = (command[0] >> 4) & 7 # 7 = 0b111
        
        command[1] = int(channel1PGAMUX)
        
        tempNum = command[1] & 7 # 7 = 0b111
        channel1Number = tempNum if 7 > (command[1] & 0xf) else tempNum+8
        channel1Gain = (command[1] >> 4) & 7 # 7 = 0b111
        
        command[2] = int(channel2PGAMUX)
        
        tempNum = command[2] & 7 # 7 = 0b111
        channel2Number = tempNum if (command[2] & 0xf) > 7 else tempNum+8
        channel2Gain = (command[2] >> 4) & 7 # 7 = 0b111
        
        command[3] = int(channel3PGAMUX)
        
        tempNum = command[3] & 7 # 7 = 0b111
        channel3Number = tempNum if (command[3] & 0xf) > 7 else tempNum+8
        channel3Gain = (command[3] >> 4) & 7 # 7 = 0b111
        
        # Bit 1: Update IO
        # Bit 0: LED State
        bf = BitField()
        bf.bit1 = int(UpdateIO)
        bf.bit0 = int(LEDState)
        command[4] = int(bf)
        
        # Bit 7-4: 1100 (Command/Response)
        # Bit 3-0: Bits for IO3 through IO0 States
        bf.fromByte(0)
        bf.bit7 = 1
        bf.bit6 = 1
        
        bf.fromByte( int(bf) | int(IO3toIO0States) )
        command[5] = int(bf)
        
        command[7] = EchoValue
        
        self.write(command)
        results = self.read()
        
        bf = BitField()
        
        bf.fromByte(results[0])
        
        if bf.bit7 != 1 or bf.bit6 != 0:
            raise U12Exception("Expected a AIStream response, got %s instead." % results[0])
        
        returnDict = {}
        returnDict['EchoValue'] = results[1]
        returnDict['PGAOvervoltage'] = bool(bf.bit4)
        returnDict['IO3toIO0States'] = BitField(results[0], "IO", list(range(3, -1, -1)), "Low", "High")
        
        channel0 = (results[2] >> 4) & 0xf
        channel1 = (results[2] & 0xf)
        channel2 = (results[5] >> 4) & 0xf
        channel3 = (results[5] & 0xf)
        
        channel0 = (channel0 << 8) + results[3]
        returnDict['Channel0'] = self.bitsToVolts(channel0Number, channel0Gain, channel0)
        
        channel1 = (channel1 << 8) + results[4]
        returnDict['Channel1'] = self.bitsToVolts(channel1Number, channel1Gain, channel1)
        
        channel2 = (channel2 << 8) + results[6]
        returnDict['Channel2'] = self.bitsToVolts(channel2Number, channel2Gain, channel2)
        
        channel3 = (channel3 << 8) + results[7]
        returnDict['Channel3'] = self.bitsToVolts(channel3Number, channel3Gain, channel3)
        
        return returnDict
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/labjack/_internal/u12.py/U12.rawAISample/swapped operands of `>`