def SAS_NG(self):
    if self.filename:
      self.Te = self.configGet("float", "input", "ElasticThickness")
      self.latlon = self.configGet("string", "numerical2D", "latlon", optional=True)
      self.PlanetaryRadius = self.configGet("float", "numerical2D", "PlanetaryRadius", optional=True)
      if self.dimension == 2:
        from scipy.special import kei
    if self.dimension == 1:
      try:
        self.x
        self.q
      except:
        if self.q0.shape[1] == 2:
          self.x = self.q0[:,0]
          self.q = self.q0[:,1]
        else:
          sys.exit("For 1D (ungridded) SAS_NG configuration file, need [x,w] array. Your dimensions are: "+str(self.q0.shape))
    else:
      try:
        self.x
        self.u
        self.q
      except:
        if self.q0.shape[1] == 3:
          self.x = self.q0[:,0]
          self.y = self.q0[:,1]
          self.q = self.q0[:,2]
        else:
          sys.exit("For 2D (ungridded) SAS_NG configuration file, need [x,y,w] array. Your dimensions are: "+str(self.q0.shape))
    self.x = self.x
    if self.dimension == 2:
      self.y = self.y
    del self.q0
    try:
      self.xw
    except:
      try:
        self.xw = self.configGet('string', "input", "xw", optional=True)
        if self.xw == '':
          self.xw = None
      except:
        self.xw = None
    if type(self.xw) == str:
      self.xw = self.loadFile(self.xw)
    if self.dimension == 2:
      try:
        self.yw
      except:
        try:
          self.yw = self.configGet('string', "input", "yw", optional=True )
          if self.yw == '':
            self.yw = None
        except:
          self.yw = None
      if (self.xw is not None and self.yw is None) \
        or (self.xw is None and self.yw is not None):
        sys.exit("SAS_NG output at specified points requires both xw and yw to be defined")
      if type(self.yw) == str:
        self.yw = self.loadFile(self.yw)
      elif self.yw is None:
        self.yw = self.y.copy()
    if self.xw is None:
      self.xw = self.x.copy()