addhead {snapshot} | R Documentation |
Add header information to particle data
Description
Function to add required header information to a Gadget read particle dataframe. This has sensible defaults for a small galaxy merger style simulation
Usage
addhead(part, Npart = 2, Massarr = 0, Time = 0, z = 0, FlagSfr = 0,
FlagFeedback = 0, FlagCooling = 0, BoxSize = 0, OmegaM = 0, OmegaL = 0,
h = 1, FlagAge = 0, FlagMetals = 0, NallHW = 0, flag_entr_ics = 0)
Arguments
part |
Strictly speaking 'part' is passed through the function, but to make this a useful object 'part' should be a data.frame containing the main particle level information. Columns required are:
| |||||||||||||||||
Npart |
The index on the Npart vector that should contain the particle number, where: gas [1] / collisionless particles [2:6]. The actual value is calculated based on the part data.frame provided with 'part', Nall is also calculated based on this number and not given as an option since the same index as Npart must be used | |||||||||||||||||
Massarr |
The mass of the particles in the particle index provided to 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 | |||||||||||||||||
FlagFeedback |
Feedback turned on/off | |||||||||||||||||
FlagCooling |
Cooling turned on/off | |||||||||||||||||
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 in the particle index provided to Npart- not usually necessary | |||||||||||||||||
flag_entr_ics |
Entropy for gas on/off |
Details
Nall is calculated based on Npart, and therfore it cannot be specified via an input argument. This increases the likelihood that a legal Gadget header will be produced.
Value
part |
Strictly speaking 'part' is passed through the function, but to make this a useful object 'part' should be a data.frame containing the main particle level information. Assuming 'part' has been given a sensible input, columns provided are:
| ||||||||||||||||||||||||||||||||||||||||||
head |
A list containing various header information as list elements. These are:
|
Author(s)
Aaron Robotham
See Also
Examples
## Not run:
tempadd=addhead(temp$part)
## End(Not run)