[mesa-users] mesa.py

David Kaplan kaplan at gravity.phys.uwm.edu
Fri Dec 17 15:19:40 EST 2010

Hi.  I had actually written some similar code, although it's a bit simpler.  

If you look at:

there are two scripts.  The first, 
converts MESA star.log and lognnn.data files to FITS binary tables. It's pretty simple, and I haven't verified all behavior, but I find it handy.

Usage would be:
plock[dk_wd]% parse_log.py LOGS/log1.data
Converted LOGS/log1.data to LOGS/log1.fits

You can then open these in python, matlab, IDL, etc and have the column definitions follow.

The second:
allows for command-line modification of inlist files.  I find this handy for keeping track of exactly how the files change, and to allow changing things from a script.  For example:
update_inlist.py -u h1_boundary_mass_limit -m h1_boundary_mass_limit 0.140 inlist_newwd

uncomments the parameter "h1_boundary_mass_limit", and then sets its value to 0.140.  

update_inlist.py -u save_model_number -m save_model_number 225 -m save_model_filename \'he_0.15_stripped.mod\' inlist_newwd

makes mesa/star first save a model and then:

update_inlist.py -c save_model_number -u load_saved_model -m saved_model_name \'he_0.15_stripped.mod\' inlist_newwd

makes it load in that model.

This is a bit more complicated, and I'm sure some failures can be found, but let me know what you find.

It might be worth having a SVN area for user-contributed software.

David Kaplan

David Kaplan kaplan at gravity.phys.uwm.edu
Asst. Professor
Dept. of Physics, UW-Milwaukee
Room 480
o: +1-414-229-4971  f: +1-414-229-5589

On Dec 17, 2010, at 1:50 PM, Falk Herwig wrote:

> We are making available a python tool to access the mesa star.log and  
> lognnn.data output files in the LOGS directory at
> http://forum.astro.keele.ac.uk:8080/nugrid/releases-and-software-downloads/python-tools/nugrid_pylib.tar/view
> This modules are in beta stage at present but they are useful to us  
> and so maybe useful to you. These modules are not presently part of  
> the official mesa release and therefore do not satisfy the rigourous  
> code standards that you are used to from the official mesa codes. If  
> you are able to make improvements, or add new plot type methods that  
> could be useful to others please send them (but please send only well  
> tested and debugged code!), and we may add these improvements or fixes  
> to our svn version of these modules and make them available to  
> everybody on this web page.
> Have fun ...
> --
> Falk Herwig
> Dept of Physics & Astronomy, U of Victoria
> fherwig at uvic.ca, tel: +1 (250) 721-7743
> --------------------------------------------------
> I support http://www.rainforestsos.org
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users

More information about the Mesa-users mailing list