cdata = c.readlines() comname = cdata[30][12:] comdenom = cdata[31][13:-2] imagedir = cdata[24][18:-2] orbitdir = cdata[25][23:-2] timedir = cdata[28][26:-2] pysav = cdata[27][24:-2] horiztag = cdata[40][10:] obslocstr = cdata[34][19:] #choose observer locations [obsloc, imagedir] = get_obs_loc(obslocstr, imagedir) if "Stereo" in obsloc: [inst, imagedir] = get_stereo_instrument(imagedir) elif obsloc == "Soho": [inst, imagedir] = get_soho_instrument(imagedir) else: inst = '' #import the orbit data obsveceq = orb_vector(comdenom, obsloc, pysav, orbitdir, horiztag, opts = 'obs,eq') comveceq = orb_vector(comdenom, obsloc, pysav, orbitdir, horiztag, opts = 'eq') comveceq10 = orb_vector(comdenom, obsloc, pysav, orbitdir, horiztag, opts = 'eq,d10') comobs = orb_obs(comdenom, obsloc, pysav, orbitdir, horiztag) dir_list = sorted(os.listdir(imagedir)) fits_list = [s for s in dir_list if ".f" in s] fits_total = len(fits_list) #%%********************** #SECOND CELL - get radecs #************************ nucvals = np.zeros((300),dtype=float) jdeez = np.zeros((300),dtype=float)
#choose observer locations bool_locs = np.array([ (('EARTH' in obslocstr) or ('Earth' in obslocstr)), (('STEREO-A' in obslocstr) or ('Stereo-A' in obslocstr) or ('STEREO_A' in obslocstr) or ('Stereo_A' in obslocstr)), (('STEREO-B' in obslocstr) or ('Stereo-B' in obslocstr) or ('STEREO_B' in obslocstr) or ('Stereo_B' in obslocstr)), (('SOHO' in obslocstr) or ('Soho' in obslocstr)), (('ISS' in obslocstr) or ('iss' in obslocstr)) ]) name_locs = np.array(['Earth', 'Stereo_A', 'Stereo_B', 'Soho', 'ISS']) case_locs = np.size(np.nonzero(bool_locs)) if case_locs > 1: obsmsg = "Please select observer location" obschoices = name_locs[bool_locs].tolist() obsloc = easygui.buttonbox(obsmsg, choices=obschoices) imagedir = os.path.join(imagedir, obsloc) elif case_locs == 1: obsloc = name_locs[bool_locs][0] else: sys.exit("No Good Observer Location") obsveceq = orb_vector(comdenom, obsloc, pysav, orbitdir, horiztag, opts='obs,lt') comveceq = orb_vector(comdenom, obsloc, pysav, orbitdir, horiztag, opts='lt') comobs = orb_obs(comdenom, obsloc, pysav, orbitdir, horiztag, idlmode=True)