#NEWLINE# def set_gain( self , gain_db ) : #NEWLINE# #INDENT# "Set gain of tuner.  Can be the string 'AUTO' for automatic gain\n\t\tor a numeric value in decibels for fixed gain.\n\t\t" #NEWLINE# if ( gain_db == 'AUTO' ) : #NEWLINE# #INDENT# self . sdr . set_manual_gain_enabled ( False ) #NEWLINE# self . auto_gain = True #NEWLINE# self . _clear_intensity ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . sdr . set_gain ( float ( gain_db ) ) #NEWLINE# self . auto_gain = False #NEWLINE# self . _clear_intensity ( ) #NEWLINE# #UNINDENT# except IOError : #NEWLINE# #INDENT# pass