Documentation Build Status License
Build status codecov.io The MIT License

GadgetIO.jl

This package is a subproject of GadJet.jl and provides some basic IO functionality to work with the Smoothed-Particle Hydrodynamics code Gadget by Volker Springel.

It is taylored for working with the development version of P-Gadget3, specifically OpenGadget3 developed by Klaus Dolag. Development is focused on IO for Binary Format 2.

Please see the Documentation for details.

Quickstart

Reading Data

If you want to read a simulation snapshot into memory with GadJet.jl, it's as easy as this:

data = read_snap(filename)

This will return a dictionary with the header information in data["Header"] and the blocks sorted by particle type.

As an example, this is how you would access the positions of the gas particles:

data["Parttype0"]["POS"]

If you only want to read a specific block for a single particle type (e.g. positions of gas particles) you can use the function with a specified blockname and particle type like so:

pos = read_snap(filename, "POS", 0)

This will return an array of the datatype of your simulation, usually Float32.