It is taylored for working with the development version of P-Gadget3, specifically OpenGadget3 developed by Klaus Dolag and contributers. Development is focused on IO for Binary Format 2. A lot of the routines are based on IDL scripts by Klaus Dolag (not public).
If you use
GadgetIO.jl in your publications please cite Böss & Valenzuela.
Please see the Documentation for details.
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:
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.