def get_ambient_temperature(self, n=5):
        '''
        Populates the self.ambient_temp property

        Calculation is taken from Rs232_Comms_v100.pdf section "Converting values
        sent by the device to meaningful units" item 5.
        '''
        if self.logger:
            self.logger.info('Getting ambient temperature')
        values = []
        for i in range(0, n):
            try:
                value = float(self.query('!T')[0]) / 100.
            except:
                pass
            else:
                if self.logger:
                    self.logger.debug('  Ambient Temperature Query = {:.1f}'.format(value))
                values.append(value)
        if len(values) >= 1 - n:
            self.ambient_temp = np.median(values) * u.Celsius
            if self.logger:
                self.logger.info('  Ambient Temperature = {:.1f}'.format(self.ambient_temp))
        else:
            self.ambient_temp = None
            if self.logger:
                self.logger.info('  Failed to Read Ambient Temperature')
        return self.ambient_temp
dataset/ETHPy150Open panoptes/POCS/scripts/read_weather.py/AAGCloudSensor.get_ambient_temperature/swapped operands of `-`