jobovy / gaia_tools

Tools for working with the @ESAGaia data and related data sets
MIT License
60 stars 19 forks source link

platform independent download path #30

Closed henrysky closed 4 years ago

henrysky commented 4 years ago

This PR fixes issue #29 by introducing platform independent download path

jobovy commented 4 years ago

Cool, thanks! Another option would be to use pathlib and then ask for the path as a POSIXpath? Not sure whether there is any advantage though!

I'm not going to be able to test this on Windows, so I'll have to depend on you to make sure this works on Windows...

henrysky commented 4 years ago

At least

import gaia_tools.load as gload
tgas_cat= gload.tgas()
rc_cat= gload.apogeerc()

runs fine without error on my machine and I have never used pathlib so I dunno if there is any advantage...

jobovy commented 4 years ago

Thanks! And this was running with new downloads of the data? (just checking!).

Yes, I haven't used pathlib either, I just found something that said it was the new, better alternative to os.path...

henrysky commented 4 years ago

Yes new downloads, I have deleted local tgas data long time ago. And I see gaia_tools downloads APOGEE RC in gaia folder instead of using existing apogee rc in apogee folder, is this a expected behavior?

jobovy commented 4 years ago

Great!

If you have apogee installed and its environment variables set up, gaia_tools is supposed to fall back onto the apogee data folders...

I'll merge once I have a minute to test on Mac.