tvwenger / kd

Utilities to calculate kinematic distances
GNU General Public License v3.0
15 stars 3 forks source link

setup.py missing? #1

Closed AstroJLo closed 5 years ago

AstroJLo commented 5 years ago

Hi @tvwenger - thanks for taking the time to upload your KD code to Github. I'm keen to use it ASAP, but i can't seem to seem to install it; as a setup.py file isn't included. Is there any chance you could upload one?

tvwenger commented 5 years ago

@AstroJLo Done! I tested it in a virtual environment, but let me know how it works for you.

AstroJLo commented 5 years ago

Hi Trey,

Thank you very much for your prompt response. I can now confirm that i have the code correctly running on my mac :)

One quick question: when i run the monte-carlo kinematic distance estimate, i don't get the same output as that mentioned in the code (see attached pic). Can i just confirm that is simply due to the stochastic nature of the Monte Carlo code?

Looking forward to hearing from you.

Best regards,

########################## John Alexander Pena Lopez PhD student in Astrophysics UNSW Sydney CSIRO Astronomy and Space Science ##########################


From: Trey W notifications@github.com Sent: Sunday, 12 May 2019 1:02:25 PM To: tvwenger/kd Cc: John Lopez; Mention Subject: Re: [tvwenger/kd] setup.py missing? (#1)

@AstroJLohttps://github.com/AstroJLo Done! I tested it in a virtual environment, but let me know how it works for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/tvwenger/kd/issues/1#issuecomment-491560300, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIUVVV3NCLQZHSUSEI2RFIDPU6CEDANCNFSM4HMJMZ3Q.

tvwenger commented 5 years ago

@AstroJLo Yes, that is just the nature of Monte Carlo randomness. You'll notice that the results you get are within the uncertainties of what I got. If you increase the number of samples to about 10,000, you'll get the same results each time.

You can ensure that the exact results are reproduceable by setting the random seed in numpy before doing anything:

import numpy as np
np.random.seed(1234) # random seed number can be anything