keflavich / imf

Simple tools to work with the Initial Mass Function
MIT License
44 stars 17 forks source link

kroupa IMF bug #2

Closed Szimcha closed 6 years ago

Szimcha commented 6 years ago

Dear Adam, the "kroupa" IMF seems the have a bug. When using inverse_imf or make_cluster only 120 Msun stars are produced. When using e.g. "salpeter" it seems to work fine. Thanks, Josefa

keflavich commented 6 years ago

Thanks. I believe I've fixed the bug in f70d189, but I'd like to implement some tests before I mark this as resolved. Try downloading the latest version and see if it does what you expect.

keflavich commented 6 years ago

I recommend using n=100000 instead of 1000 now, though, as I switched the spacing from log to linear

keflavich commented 6 years ago

In the latest version (e3feede) I have restored the log-spaced sampling, so nbins=1000 should be OK again

Szimcha commented 6 years ago

Hi Adam, thanks a lot for fixing the bug. Yes, it seems to work fine now when using the kroupa IMF. Josefa