[yt-users] yt with gadget

Desika Narayanan desika.narayanan at gmail.com
Fri Jun 16 17:08:30 PDT 2017


Hey  -

Robert Thompson (who wrote pygr, but I don't think is on the listserv)
pointed me to this:

https://bitbucket.org/rthompson/sphgr/src/51f97938ca50c09e0a757a18b59ead
15cf4c2060/analysis/tools/converters/?at=default

which is a routine to write gadget binaries (type 1 and 2) via python -- it
might be a useful tool to get started with.  I cc'd Robert in.

-d

On Fri, Jun 16, 2017 at 12:06 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> Hi Aaron,
>
> Unfortunately no.
>
> In the past when I had to do this, I made some ad-hoc scripts following
> the C and IDL examples included with the Gadget2 source distribution that
> show how to write Gadget binary files. If I was doing this today I'd
> probably use h5py to generate Gadget HDF5 snapshots, since HDF5 is a nicer
> format and h5py is pretty straightforward to work with.
>
> If someone wanted to work on adding support for this to yt, I think it
> would definitely be in scope for the project - we've always had long-term
> goals for setting up initial conditions and also have support for writing
> both in-memory patch AMR data and data loaded from another code in the Grid
> Data Format.
>
> The Gadget output format is relatively simple (in HDF5 or binary). I think
> it would be doable to start a new project from scratch outside of the yt
> project that ships a function accepting ndarrays for various fields and
> writes valid Gadget snapshots to disk. Basically the inverse of
> pygadgetreader:
>
> https://bitbucket.org/rthompson/pygadgetreader
>
> As far as I'm aware there isn't something like that available. If anyone
> on the mailing list knows of free open source code that allows one to
> generate Gadget snapshots from Python, I'd love to heard about it :)
>
> -Nathan
>
> On Fri, Jun 16, 2017 at 10:33 AM, Aaron <125892615 at qq.com> wrote:
>
>>
>> Hi everyone,
>> I’m pretty new to this package and primarily use it to load Gadget
>> snapshots, I’m wondering if it can in turn generate snapshots (used as
>> initial conditions) , given all the initial conditions.
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170616/52d1aedc/attachment.html>


More information about the yt-users mailing list