snapwrite: Write in Gadget snapshots

Description Usage Arguments Value Author(s) See Also Examples

Description

This function allows the user to write standard format Gadget binaries. It can write the particle information and header information, which are provided as separate R objects.

Usage

1

Arguments

part

A data.frame containing the main particle level information. Columns required are:

ID particle ID
x x position in units of Mpc
y y position in units of Mpc
z z position in units of Mpc
vx x velocity in units of km/s
vy y velocity in units of km/s
vz z velocity in units of km/s
Mass particle mass in units of Msun
head

A list containing various header information as list elements. These are:

Npart Vector of length 6 containing the number of particles in this snapshot file, where: gas [1] / collisionless particles [2:6]
Massarr Vector of length 6 containing the particle masses for the respective particle types in Npart
Time Time of snapshot in units of km/s and kpc so 1 unit is ~10 Gyrs
z Redshift of snapshot
FlagSfr Star formation turned on/off
Nall Vector of length 6 containing the number of particles in all snapshot files, where: gas [1] / collisionless particles [2:6]
FlagFeedback Feedback turned on/off
FlagCooling Cooling turned on/off
NumFiles Number of files per snapshot- usually 1
BoxSize Size of simulation box edge length in units of kpc
OmegaM Omega matter of the simulation
OmegaL Omega lambda of the simulation
h Hubble constant divided by 100 used in the simulation
FlagAge Stellar ages on/off
FlagMetals Stellar metallacities on/off
NallHW Tell Gadget to use large integers for the respective particle types in Npart - not usually necessary
flag_entr_ics Entropy for gas on/off
file

The full path to the Gadget snapshot to be created.

Value

No value returned, called for the side-effect of writing out a binary Gadget file.

Author(s)

Aaron Robotham, Chris Power

See Also

snapread,genhalo,addhead,genparam,cosdist,virialfuncs

Examples

1
2
3
4
## Not run: 
temp=snapwrite(snap$part,snap$head,'somepath/snapshot_XXX')

## End(Not run)

asgr/simpack documentation built on May 12, 2019, 4:40 a.m.