<jupyter_start><jupyter_text>Get coordinate objects for the two catalogs<jupyter_code>tycho2 = atbl.Table.read(tycho2_path)

ra = tycho2['RAmdeg'][tycho2['pflag'].astype(str) == ' ']
dec = tycho2['DEmdeg'][tycho2['pflag'].astype(str) == ' ']
tycho2_c = coord.SkyCoord(ra=ra*u.degree, dec=dec*u.degree)
exoplanets['ra'].min(), exoplanets['ra'].max()
exoplanets_c = coord.SkyCoord(ra=exoplanets['ra']*u.degree, dec=exoplanets['dec']*u.degree)
idx,sep,_ = exoplanets_c.match_to_catalog_sky(tycho2_c)
cut = sep < 2*u.arcsecond
match_exop = exoplanets[cut]
match_idx = idx[cut]
len(match_idx)
plt.figure(figsize=(8,6))
plt.hist(match_exop['st_optmag'], bins=15)
plt.xlabel('Optical magnitude?')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18915159944367177, 'fraction_numerical': 0.01808066759388039, 'mean_word_length': 9.434782608695652, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '223309', 'license': 'MIT', 'n_tokens_mistral': 321, 'n_tokens_neox': 307, 'n_words': 35, 'path': 'notebooks/Tycho2-Exoplanets.ipynb', 'repo_name': 'adrn/gaiadr1', 'size': '719'}