GOFAI / glasstone

Python library for modelling nuclear weapons effects
MIT License
83 stars 27 forks source link

Bug in overpressure.py? #3

Open tippetts opened 7 years ago

tippetts commented 7 years ago

Thanks for the interesting code.

Is this a bug in the calculation of _altitude_sd? https://github.com/GOFAI/glasstone/blob/ec08b40f9902703096ff8daf01e29ee458f3a115/glasstone/overpressure.py#L308

I'm thinking that should be return _altitude_sp(alt)**(-1.0/3)

GOFAI commented 7 years ago

I believe you're correct, so please submit a pull request and I'll merge it. To be honest I deemphasized this part of the library because I'm not entirely confident that the documentation in the BLAST.EXE helpfile is accurate enough to reimplement the DNA overpressure model. Trying to validate my implementation against BLAST.EXE in DOSBox I'm never sure whether discrepancies are due to my own mistakes, errors in the documentation, or flaws in the DOS program!

On Wed, Sep 20, 2017 at 10:20 PM, tippetts notifications@github.com wrote:

Thanks for the interesting code.

Is this a bug in the calculation of _altitude_sd? https://github.com/GOFAI/glasstone/blob/ec08b40f9902703096ff8daf01e29e e458f3a115/glasstone/overpressure.py#L308

I'm thinking that should be return _altitude_sp(alt)**(-1.0/3)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GOFAI/glasstone/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AOfE6U57xgdFTif8eRrtRJsgj4pdGlrOks5skfIggaJpZM4Pez1Z .

-- Мы рождены, чтоб сказку сделать былью!

sakurakhadag commented 7 years ago

Would you believe me if I said I had forgotten all about this? This was supposed to be used in a summer internship, so obviously out of mind. Thanks for letting me do a pull request!