diff --git a/download_data.py b/download_data.py index 2158026..1e24434 100755 --- a/download_data.py +++ b/download_data.py @@ -301,7 +301,9 @@ def download_sao_xmatch() -> None: cross_matches = [ ('vizier:I/131A/sao', 'vizier:I/311/hip2', 'sao_hip_xmatch.csv'), - ('vizier:I/131A/sao', 'vizier:I/259/tyc2', 'sao_tyc2_xmatch.csv') + ('vizier:I/131A/sao', 'vizier:I/259/tyc2', 'sao_tyc2_xmatch.csv'), + ('vizier:I/131A/sao', 'vizier:I/259/suppl_1', 'sao_tyc2_suppl1_xmatch.csv'), + ('vizier:I/131A/sao', 'vizier:I/259/suppl_2', 'sao_tyc2_suppl2_xmatch.csv'), ] for cat1, cat2, filename in cross_matches: diff --git a/parse_tyc.py b/parse_tyc.py index b77b8cb..c12fe02 100644 --- a/parse_tyc.py +++ b/parse_tyc.py @@ -203,9 +203,14 @@ def load_tyc_teff() -> Table: def load_sao() -> Table: """Load the SAO-TYC2 cross match.""" print('Loading SAO-TYC2 cross match') - data = io_ascii.read(os.path.join('xmatch', 'sao_tyc2_xmatch.csv'), - include_names=['SAO', 'TYC1', 'TYC2', 'TYC3', 'angDist', 'delFlag'], - format='csv') + xmatch_files = ['sao_tyc2_xmatch.csv', + 'sao_tyc2_suppl1_xmatch.csv', + 'sao_tyc2_suppl2_xmatch.csv'] + data = vstack([io_ascii.read(os.path.join('xmatch', f), + include_names=['SAO', 'TYC1', 'TYC2', 'TYC3', 'angDist', 'delFlag'], + format='csv', + converters={'delFlag': [io_ascii.convert_numpy(np.str)]}) + for f in xmatch_files], join_type='exact') data = data[data['delFlag'].mask] data.remove_column('delFlag')