timothydmorton / isochrones

Pythonic stellar model grid access; easy MCMC fitting of stellar properties
http://isochrones.readthedocs.org
MIT License
121 stars 62 forks source link

add keywords *distance* to Isochrone.isochrone and fix a bug #5

Closed syrte closed 9 years ago

syrte commented 9 years ago
  1. Fix a bug in Isochrone.call** props is returned before distance module and extinction correction when keywords return_df=False, and so the returned results are not the same when specifying return_df** or not.
  2. Add keywords distance to Isochrone.isochrone It would be handy to have keywords distance in method isochrone too, eg. for stellar clusters.
  3. keywords distance doesn't work for bol band (in both function above) Note that data/extinction.txt doesn't contain bol, the keywords distance won't work properly when bol present in self.bands. That might be a problem. I don't know what's the proper solution as I'm not familar with observation things. Maybe we can add a assertion to make sure bol and distance won't present at the same time.

PS It seems I should put these things (bug fix and new keywords) in two pull requests. Sorry for possible inconvenience.

timothydmorton commented 9 years ago
  1. Thanks for fixing the return_df bug--- that was an old bug b/c I never use that as anything but True anymore.
  2. As far as distance goes, I think I'd rather keep distance and AV at the call end, and to keep the stored mags as absolute. I've added this recently into __call__ (maybe you forked an earlier version?), but not yet into the evtrack or isochrone methods, which might be a good thing to do. edit: Sorry- I think I misunderstood you! Yes, adding distance into the Isochrone.isochrone method is a good idea.
  3. Good point about bol-- again, I never use this, so don't think about it. This will need to be corrected---my inclination would be to just skip bol when calculating extinction, since that's never a directly observed quantity anyway.
timothydmorton commented 9 years ago

OK, looked it over; looks good to me-- thanks again!

syrte commented 9 years ago

You have a very nice project, my plasure to do something for it. Thank you for a package so convenient!