evnames = [] seed(12483) colors = (cubehelix.cubehelix1_16.hex_colors[2:13] + cubehelix.cubehelix2_16.hex_colors[2:13] + cubehelix.cubehelix3_16.hex_colors[2:13] + cubehelix.jim_special_16.hex_colors[2:13] + cubehelix.purple_16.hex_colors[2:13] + cubehelix.purple_16.hex_colors[2:13] + cubehelix.purple_16.hex_colors[2:13] + cubehelix.purple_16.hex_colors[2:13] + cubehelix.perceptual_rainbow_16.hex_colors) shuffle(colors) repofolders = get_rep_folders(moduledir) files = repo_file_list(moduledir, repofolders, normal=True, bones=False) with open( 'astrocats/' + moduledir + '/input/non-' + modulename + '-types.json', 'r') as f: nontypes = json.loads(f.read(), object_pairs_hook=OrderedDict) nontypes = [x.upper() for x in nontypes] for fcnt, eventfile in enumerate( tq(sorted(files, key=lambda s: s.lower()), "Collecting positions")): # if fcnt > 5000: # break filetext = get_event_text(eventfile) thisevent = json.loads(filetext, object_pairs_hook=OrderedDict)
path = 'astrocats/' + moduledir + '/output/cache/bibauthors.json' if os.path.isfile(path): with open(path, 'r') as f: bibauthordict = json.load(f, object_pairs_hook=OrderedDict) else: bibauthordict = OrderedDict() aapath = 'astrocats/' + moduledir + '/output/cache/biballauthors.json' if os.path.isfile(aapath): with open(aapath, 'r') as f: biballauthordict = json.load(f, object_pairs_hook=OrderedDict) else: biballauthordict = OrderedDict() files = repo_file_list(moduledir, repofolders, bones=False) path = 'ads.key' if os.path.isfile(path): with open(path, 'r') as f: ads.config.token = f.read().splitlines()[0] else: raise IOError( "Cannot find ads.key, please generate one at " "https://ui.adsabs.harvard.edu/#user/settings/token and place it in " "this file.") for fcnt, eventfile in enumerate(tq(sorted(files, key=lambda s: s.lower()))): # if fcnt > 4000: # break fileeventname = os.path.splitext(os.path.basename(eventfile))[0].replace(