parameters: (**kwargs)
return_statement: return nre, par_names, Blm
docstring: Parses input arguments for stev2norm() and norm2stev().
docstring_summary: Parses input arguments for stev2norm() and norm2stev().
docstring_tokens: Parses input arguments for stev2norm () and norm2stev () .
function: def _parse_args(**kwargs):
      """ Parses input arguments for stev2norm() and norm2stev().
      """
      # Some definitions
      Blms = ['B20', 'B21', 'B22', 'B40', 'B41', 'B42', 'B43', 'B44', 'B60', 'B61', 'B62', 'B63', 'B64', 'B65', 'B66']
      # Some Error checking
      if 'Ion' not in kwargs.keys() and 'IonNum' not in kwargs.keys():
          raise NameError('You must specify the ion using either the ''Ion'', ''IonNum'' keywords')
      if 'Ion' in kwargs.keys():
          nre = ionname2Nre(kwargs['Ion'])
      else:
          nre = kwargs['IonNum']
      # Now parses the list of input crystal field parameters
      par_names = []
      Blm = {}
      for pname in Blms:
          if pname in kwargs.keys():
              par_names.append(pname)
              Blm[pname] = kwargs[pname]
      if not par_names:
          if 'B' in kwargs.keys():
              for ind, pname in enumerate(Blms):
                  par_names.append(pname)
                  Blm[pname] = kwargs['B'][ind]
          else:
              raise NameError('You must specify at least one input Blm parameter')
      return nre, par_names, Blm
function_tokens: def _parse_args ( * * kwargs ) : # Some definitions Blms = [ 'B20' , 'B21' , 'B22' , 'B40' , 'B41' , 'B42' , 'B43' , 'B44' , 'B60' , 'B61' , 'B62' , 'B63' , 'B64' , 'B65' , 'B66' ] # Some Error checking if 'Ion' not in kwargs . keys ( ) and 'IonNum' not in kwargs . keys ( ) : raise NameError ( 'You must specify the ion using either the ' 'Ion' ', ' 'IonNum' ' keywords' ) if 'Ion' in kwargs . keys ( ) : nre = ionname2Nre ( kwargs [ 'Ion' ] ) else : nre = kwargs [ 'IonNum' ] # Now parses the list of input crystal field parameters par_names = [ ] Blm = { } for pname in Blms : if pname in kwargs . keys ( ) : par_names . append ( pname ) Blm [ pname ] = kwargs [ pname ] if not par_names : if 'B' in kwargs . keys ( ) : for ind , pname in enumerate ( Blms ) : par_names . append ( pname ) Blm [ pname ] = kwargs [ 'B' ] [ ind ] else : raise NameError ( 'You must specify at least one input Blm parameter' ) return nre , par_names , Blm