shbhuk / barycorrpy

Python version of Barycorr
GNU General Public License v3.0
37 stars 6 forks source link

np.average, find_hip, astroquery #21

Closed mzechmeister closed 6 years ago

mzechmeister commented 6 years ago

Some more suggestions:

  1. Use np.average for the weighted means.
  2. Move find_hip to utils where get_stellar_data is located. Or even consider to make it part of get_stellar_data, e.g. get_stellar_data(name='', hip_id=None).
  3. Make astroquery import optional with a try. It adds more dependencies which are not necessarily needed for get_BC_vel. I have not installed it, since have created my own request tool (https://github.com/mzechmeister/serval/blob/master/src/targ.py)
shbhuk commented 6 years ago

Fixed 2. in 1e276b6d46009c4fe7f04ccb645d4ec9e83c4fd2

shbhuk commented 6 years ago

Fixed 3. in cde9c1a7a9aadb082fec6a0ee65e90ee2a885092

shbhuk commented 6 years ago

For 1. I think I shall leave it this way, is more explicit and easier to understand if anyone looks at the source code.