code: def get_source_pars(src):
      
  
      fnmap = src.getSrcFuncs()
  
      keys = fnmap.keys()
  
      if 'Position' in keys:
          ppars = get_function_pars(src.getSrcFuncs()[str('Position')])
      elif 'SpatialDist' in keys:
          ppars = get_function_pars(src.getSrcFuncs()[str('SpatialDist')])
      else:
          raise Exception('Failed to extract spatial parameters.')
  
      fn = src.getSrcFuncs()[str('Spectrum')]
      spars = get_function_pars(fn)
  
      for i, p in enumerate(ppars):
          ppars[i]['is_norm'] = False
  
      for i, p in enumerate(spars):
  
          if fn.normPar().getName() == p['name']:
              spars[i]['is_norm'] = True
          else:
              spars[i]['is_norm'] = False
  
      return spars, ppars
docs: Extract the parameters associated with a pyLikelihood Source object.