[mesa-users] Mesa with Python

Adam Jermyn adamjermyn at gmail.com
Mon Sep 28 10:57:14 EDT 2015


It definitely is open. I'm currently just thinking about how best to
do this to avoid having to keep up with MESA changes (i.e. how to
minimise the dependence on MESA's internals). Depending on how well
f2py works, and whether or not writing simplified drivers works, it
might make more sense to bypass MESA and work (as Josiah suggests)
directly with the underlying tables, rather than trying to wrap the
entire MESA EOS module as one piece.
-Adam


On Mon, Sep 28, 2015 at 3:02 PM, Adam Jacobs <adam.jacobs at stonybrook.edu> wrote:
> Just want to chime in that I'm interested in a usable python interface as
> well. If such a project is open I'd be happy to contribute pull requests,
> especially for interfacing with MESA's reaction rate/burning modules. I've
> used these independently in research and think a python interface would make
> them more widely usable in the community.
>
> The project would definitely require active, sustained development to keep
> up with MESA changes.
>
> On Sep 28, 2015 7:14 AM, "Adam Jermyn" <adamjermyn at gmail.com> wrote:
>>
>> Hi Rob,
>>
>> Thanks for the information. I have used f2py before, but not for
>> larger codes like MESA. I'll give it a try.
>>
>> All the best,
>> -Adam
>>
>>
>> On Sat, Sep 26, 2015 at 12:26 AM, Robert Farmer <rjfarmer at asu.edu> wrote:
>> > Hi
>> >
>> > All the mesa modules are isolated from each other, and should only call
>> > routines available from the files in the public/ sub-folder of other
>> > modules. Most (but not all) of the binding occurs via the routines
>> > inside
>> > the star module. It is be possible to call say the eos/ routines
>> > independently of the main code. See Kevin's example from the last summer
>> > school:
>> > https://mesa2015-external-code.readthedocs.org/en/latest/index.html
>> >
>> > So if you wanted to access the eos from python you only need the eos
>> > (plus
>> > its dependencies)
>> >
>> > Have you tried looking at f2py if you want a python interface? Its
>> > relatively easy to use and you don't need to worry about changing the
>> > source
>> > code, though getting the build to link everything properly might take
>> > some
>> > work.
>> >
>> > Rob
>> >
>> > On Fri, Sep 25, 2015 at 11:23 AM, Adam Jermyn <adamjermyn at gmail.com>
>> > wrote:
>> >>
>> >> Hi Bill,
>> >>
>> >> How is this handled in terms of making sure that different modules
>> >> within MESA can talk to each other? Does that interface change
>> >> substantially over time? For EOS in particular, it seems that there's
>> >> a pretty well-defined set of inputs and outputs, so that one might be
>> >> more amenable to an API treatment than others...
>> >>
>> >> Thanks!
>> >> -Adam
>> >>
>> >>
>> >> On Fri, Sep 25, 2015 at 3:40 PM, Bill Paxton <paxton at kitp.ucsb.edu>
>> >> wrote:
>> >> > Hi Adam,
>> >> >
>> >> > Yes, a Python interface would be great.  Kent Budge created one:
>> >> >
>> >> > http://mesapp.sourceforge.net/
>> >> >
>> >> > But I don't know when it was last updated -- it takes a substantial
>> >> > effort to keep the Python and C++ interfaces up to date with the
>> >> > rapidly
>> >> > changing MESA versions.
>> >> >
>> >> > Cheers,
>> >> > Bill
>> >> > On Sep 25, 2015, at 6:20 AM, Adam Jermyn wrote:
>> >> >
>> >> >> Dear Dr. Paxton,
>> >> >>
>> >> >> I've been working with MESA, and it occurred to me that it would be
>> >> >> extremely useful to be able to call many of the modules in MESA from
>> >> >> other codes (particularly in high-level languages like Python). For
>> >> >> instance, the EOS module in MESA provides the greatest coverage of
>> >> >> any
>> >> >> EOS available, but as far as I can tell there is no MESA equivalent
>> >> >> to
>> >> >> the OPAL EOS tables. Are there any plans for providing standalone
>> >> >> EOS
>> >> >> tables (or providing interfaces to other languages)?
>> >> >>
>> >> >> Thanks,
>> >> >> -Adam
>> >> >>
>> >> >>
>> >> >> ---
>> >> >> Adam Jermyn
>> >> >> University of Cambridge, IoA
>> >> >> Caltech Class of 2015
>> >> >
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> _______________________________________________
>> >> mesa-users mailing list
>> >> mesa-users at lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/mesa-users
>> >
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> 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