# CLI Examples

### Velocity Dispersion

• To compute the directional projection statistics for all stars in a snapshot named snapshot_file_name
 $gsnap snapshot_file_name • To compute directional velocity dispersion statistics on an arbitrary combination of particle types: $ gsnap -t ###### snapshot_file_name

where the ###### is a six-character type specification string. Place a ’1′ in the specification string to specify that you want to include. The meaning of each of the 6 entries are:

0: gas / SPH particles
1: dark matter particles
2: disk particles
3: bulge particles
4: new star particles
5: black hole particles

For example, to specify all stellar particles, we would use,

$gsnap -t 001110 snapshot_file_name and to specify dark matter only, we would use $ gsnap -t 010000 snapshot_file_name

• To compute the velocity dispersion of stars younger than T time units…

 $gsnap -a T file_name where T > 0 • To compute the velocity dispersion of stars older than T time units… $ gsnap -a T file_name where T < 0

• To compute the velocity dispersion of stars between the ages of T_1 and T_2 time units…

 $gsnap --age_bin T_1 T_2 file_name  • To center velocity dispersion measurements on the first black hole listed in the snapshot file, rather than focusing on the center of mass of the system: $ gsnap -n file_name

Since the black hole is typically in the nucleus of a galaxy, this is a nucleus-centered velocity dispersion.

### Viewing

• To view the snapshot along the z axis,

 $gsnap --view -t ###### snapshot_file_name This creates an image file named snapshot_file_name.png. For example, to view all star particles in the simulation snapshot named snapshot_505 from the z-direction, we would use: $ gsnap --view p -t 001110 snapshot_505

and the output file would be snapshot_505.png.

• To preview the snapshot interactively (without saving the image to disk), use the --iview flag:

 $gsnap --view i -t ###### snapshot_file_name Using this window, you can interactively rotate and zoom the snapshot visualization and change the scaling of the pixel brightness by changing the gamma value. • To create an image of the gas component using a volume rendering / ray casting scheme, $ gsnap --view gas file_name

The output will be an image named file_name.png

• To create a volume rendering of the of the stellar component with no dust attenuation,
 $gsnap --view flux file_name The output will be an image named file_name.png • To create a volume rendering of the of the stellar component with dust attenuation, $ gsnap --view flux -t 101110 file_name

The output will be an image named file_name.png

Note: For all viewing options, you should probably use a parameter file because the default values are not likely what you will want to use.

### Interpolation

• To interpolate between the snapshots file_1 and file_2 to create N intermediate snapshots named inter.1, inter.2, inter.3,…, inter.N

 $gsnap -i --frames N --beg file_1 --end file_2 --out inter • To create interpolated images rather than interpolated snapshots: $ gsnap -Ig --frames N --beg file_1 --end file_2 --out inter

This will create volume renderings of the gas component named inter.1.png, inter.2.png, inter.3.png,…,inter.N.png

\$ gsnap -It 101110 --view flux --frames N --beg file_1 --end file_2 --out inter

This will create volume renderings of the stellar component with dust extinction. As above, the images will be named inter.1.png, inter.2.png, inter.3.png,…,inter.N.png