#NEWLINE# def _checkScans( scans ) : #NEWLINE# #INDENT# ' simple checker for scans input ' #NEWLINE# if ( nscans is None ) : #NEWLINE# #INDENT# raise NameError ( 'Provide a string or list of scans to load' ) #NEWLINE# #UNINDENT# if ( type ( scans ) == str ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# nscans = _str2rng ( scans ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# raise NameError ( "scans string '{0}' not understood by str2rng" . format ( scans ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( type ( scans ) == list ) : #NEWLINE# #INDENT# nscans = scans #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise NameError ( 'Provide a string or list of scans to load' ) #NEWLINE# #UNINDENT# #UNINDENT# return nscans