View source: R/generate.particle.id.table.4.R
generate.particle.id.table.4 | R Documentation |
Returns a data.table of each of the particles of the selected species in the cluster. The data table contains each particles location and velocity in SI units relative to the center of Mass (each particles velocity and location in converted to SI units from L210N1024NR simulation units).
The particles as assigned an ID by their index in the table. The table has dimensions = (6, number of particles of selected species)
generate.particle.id.table.4( x, v, select.species = 1, species = track$particle$species, p.mass = c(1.17e+08, 6.29e+08) )
x |
A matrix, array type object containing particle positions Mpc/h |
v |
A matrix, array type object containing particle velocities km/s |
select.species |
An intiger value of either 1 or 2. 1 = baryonic particles (gas) 2 = dark matter particles Naturally set to 1. This is used to calculate the enstrophy, which is dependant on gas particles, therefore species 1. |
species |
An array type object containing the species number for every particle within the halo being observed. |
p.mass |
A vector object containing the mass values for each of the species within the simulation in simulaiton units Solar Mass / h, in the order of the species indexes. For L210N1024NR where there are only baryon (1) and dark matter (2) therefore p.mass is naturally set to (1.17e8, 6.29e8). This is used for calculating the center of mass of each snapshot or frame, so that each particle can be centered on the c.o.m. |
To make a data.table of only the baryons within a halo, x = interpolate.positions.2(track, snapshots, t.plot[frame])[[1]] v = interpolate.positions.2(track, snapshots, t.plot[frame])[[2]] generate.particle.id.table.4(x, v, select.species = 1, species=track$particle$species, p.mass = c(1.17e8, 6.29e8))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.