Are there any publicly available codes to sample from an initial mass function (common ones... Kroupa, Chabrier, Salpeter) to construct a cluster, then use stellar models to generate an integrated spectrum? I imagine such codes must be quite common, as they're relatively easy to write, but require access to stellar model databases or very simple stellar models.

  • $\begingroup$ SLUG (sites.google.com/site/runslug) does a lot of what I want, but only incorporated into full-scale Galaxy simulation. It's probably possibly to make it generate just one cluster. $\endgroup$ – keflavich Nov 26 '11 at 23:59
  • $\begingroup$ The astrophysics source code library (asterisk.apod.com/viewforum.php?f=35) is another place to look. I did a quick search for "initial mass function", and SLUG came up, but nothing that seemed much more specifically suited to your purpose. $\endgroup$ – jdmcbr Mar 3 '12 at 17:44

The one population synthesis code I've used is GALAXEV, which can be found here. It allows you to choose either the Chabrier or Salpeter IMF, as well as select a star formation history from a few simple models, and it outputs the integrated spectrum. The stellar models and evolutionary tracks are all included in the code and supporting files.

I will caution, however, that this code, despite its popularity, is written in near-defunct Fortran. It took me several days to get it working, between figuring out its ancient I/O format, running preliminary scripts to convert between ASCII and binary files (yes the authors believe reading in a few kilobytes of ASCII data somehow takes a significant amount of time), and finding a compiler from the post-vacuum tube era that actually accepted the source. Yet one more example of astronomy being several decades behind when it comes to computers...

  • $\begingroup$ Well, sounds like a great candidate to get wrapped in python... astronomy's not ALL behind, but there are plenty of astronomers who are. $\endgroup$ – keflavich Feb 11 '13 at 2:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.