Skip to content

Commit

Permalink
fix source_id change
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew551 committed Mar 18, 2024
1 parent bd363d5 commit 5204138
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion StarData.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, r=None, date=None, has_pm=None):
print('epoch', self.epoch)
self.has_pm = has_pm
self.mags = r['phot_g_mean_mag']
self.ids = r['source_id']
self.ids = r['SOURCE_ID']
self.pm = np.zeros((self.nstars(), 2))
self.parallax = np.ones(self.nstars())*1e-4
if has_pm:
Expand Down
6 changes: 3 additions & 3 deletions gaia_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def helper(ra, dec):
star_table[:, 2] = np.cos(star_table[:, 0]) * np.cos(star_table[:, 1])
star_table[:, 3] = np.sin(star_table[:, 0]) * np.cos(star_table[:, 1])
star_table[:, 4] = np.sin(star_table[:, 1])
star_catID = results['source_id']
star_catID = results['SOURCE_ID']
return StarData.StarData(results, 2016, False)

gaia_limit=13
Expand All @@ -108,11 +108,11 @@ def lookup_objects(self, range_ra, range_dec, star_max_magnitude=12, time=2024):
star_table[:, 4] = np.sin(star_table[:, 1])
star_table[:, 7] = results['pmra']
star_table[:, 8] = results['pmdec']
star_catID = results['source_id']
star_catID = results['SOURCE_ID']
return StarData.StarData(results, time, True)

def select_bright(T1, max_mag):
query = f"SELECT source_id, phot_g_mean_mag, COORD1(ESDC_EPOCH_PROP_POS(ra, dec, parallax, pmra, pmdec, radial_velocity, ref_epoch, {T1})),\
query = f"SELECT SOURCE_ID, phot_g_mean_mag, COORD1(ESDC_EPOCH_PROP_POS(ra, dec, parallax, pmra, pmdec, radial_velocity, ref_epoch, {T1})),\
COORD2(ESDC_EPOCH_PROP_POS(ra, dec, parallax, pmra, pmdec, radial_velocity, ref_epoch, {T1})) \
FROM gaiadr3.gaia_source \
WHERE phot_g_mean_mag BETWEEN -2 AND {max_mag}"
Expand Down

0 comments on commit 5204138

Please sign in to comment.