#NEWLINE# def random_iterator( self , samples_per_field = None ) : #NEWLINE# #INDENT# 'Yield an infinite sequence of random stamp parameters\n\n        The random sample is generated using Field.random_stamps\n\n        Parameters\n        ----------\n        samples_per_field : int (optional)\n            How many samples to generate before switching\n            longitues by >1 deg. Tuning this can improve\n            IO performance.\n\n        Yields\n        ------\n        An infinite sequence of (field_lon, lcen, bcen, rad)\n        ' #NEWLINE# while True : #NEWLINE# #INDENT# lon = self . _random_field ( ) #NEWLINE# nsample = samples_per_field #NEWLINE# if ( nsample is None ) : #NEWLINE# #INDENT# nsample = ( 30000 if running_on_cloud ( ) else 500 ) #NEWLINE# #UNINDENT# for f in get_field ( lon ) . random_stamps ( nsample ) : #NEWLINE# #INDENT# ( yield self )