Exemple #1
0
 def get_obj_name(self):
     obj_name = (' ').join(self.head['OBJNAME'].split())
     ss_name = ss.get_name(no.split_str(obj_name))
     if ss_name != None:
         return ss_name
     else:
         return obj_name
Exemple #2
0
def get_files_dic(path='/home/seth/Desktop/Entire_BeSS/'):
    files = [path + x for x in os.listdir(path) if '.fits' in x]
    dic = {}
    for f in files:
        try:
            fits = pyfits.open(f)
            name = fits[0].header['OBJNAME']
            sim_name = ss.get_name(name)
            fits.close()
            dic[f] = [f, sim_name]
        except:
            pass
    return dic