code: def read_sources(sdmname):
      
  
      sdm = getsdm(sdmname)
      sourcedict = {}
  
      for row in sdm['Field']:
          src = str(row.fieldName)
          sourcenum = int(row.sourceId)
          direction = str(row.referenceDir)
          (ra,dec) = [float(val) for val in direction.split(' ')[3:]]  # skip first two values in string
  
          sourcedict[sourcenum] = {}
          sourcedict[sourcenum]['source'] = src
          sourcedict[sourcenum]['ra'] = ra
          sourcedict[sourcenum]['dec'] = dec
  
      return sourcedict
docs: Use sdmpy to get all sources and ra,dec per scan as dict