#NEWLINE# @ sampling_period . setter #NEWLINE# def sampling_period( self , period ) : #NEWLINE# #INDENT# '\n        Setter for :attr:`sampling_period`\n        ' #NEWLINE# if ( period is None ) : #NEWLINE# #INDENT# raise ValueError ( 'sampling_period cannot be None' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not hasattr ( period , 'units' ) ) : #NEWLINE# #INDENT# raise ValueError ( 'sampling_period must have units' ) #NEWLINE# #UNINDENT# #UNINDENT# self . sampling_rate = ( 1.0 / period )