modified.surfsmovie: Generates a movie from a given halo hdf5 file from surfsuite.

View source: R/modified.surfsmovie.R

modified.surfsmovieR Documentation

Generates a movie from a given halo hdf5 file from surfsuite.

Description

This is a modified version of the surfsmovie function available in the Simstar package. https://github.com/obreschkow/simstar

creates an .mp4 file from the provided halo list given showing the evolution of particles identified to be in the halo at z=0

Usage

modified.surfsmovie(
  track,
  select.species = NULL,
  radius = NULL,
  aspect = 1,
  mp4file,
  fps = 60,
  H0 = 70,
  OmegaM = 0.3,
  OmegaL = 0.7,
  velocity.conversion = 0.00102269032 * (H0/100),
  keep.frames = T,
  rotation = 1,
  show.time = T,
  text.size = 1,
  scale = T,
  dt = 0.05,
  f = c(1.17e+08, 6.29e+08),
  png.size = NULL,
  show.R200 = F,
  specify.frame = NULL,
  ...
)

Arguments

track

A list containing the halo information from a given hdf5 file from surfsuite

select.species

An optional value to identify if a species within the halo should be isolated for the movie. If NULL then all species will be included, otherwise a numerical value to represent which species to be isolated is used.

1 = Baryon 2 = Dark Matter

radius

An optional value of the radius given in the simulation units of movie to be shown, if NULL then 1.5 times the virial radius will be used.

aspect

An optional value for the aspect ratio of the .mp4 file produced, naturally aspect ratio is 1 (a square).

mp4file

The file name of the .mp4 file which will be produced.

Include the .mp4 suffix

fps

An optional value for the frames per second of the movie produced, naturally the fps is 60

H0

H0 Hubble constant of the simulation in units of km/s/Mpc

OmegaM

OmegaM matter density of the universe at z=0

OmegaL

dark energy density of the universe at z=0

velocity.conversion

conversion factor from velocity units in the simulation to length units/Gyr (at z=0). The default corresponds to the standard of Gadget-2.

keep.frames

Boolean value determining whether the frames used to save the movie are to be stored within the temporary foler used to create the movie.

rotation

either an integer (1-6) or a 3-vector, specifying a rotation of the 3D particle positions. In case of an integer: 1=(x,y)-plane, 2=(y,z)-plane, 3=(x,y)-plane, 4=(qmax,qmin)-plane, 5=(qmax,qmid)-plane, 6=(qmid,qmin)-plane, where qmax/qmid/qmin are the eigenvectors of the particle-quadrupole, associated with the maximum/middle/minimum eigenvalues, respectively. If a vector, its direction specifies the rotation axis and its norm the rotation angle in radians in the positive geometric sense.

show.time

A boolean specifying whether the look-back time is displayed

text.size

A scaling factor for the text size used for the look-back time

scale

A boolean value, which determines if the frames shown in the movie are co-moving or physical. If scale is True then the frames shows an image of radius / scalefactor else if False then the frames show an image of radius. Naturally it is True.

dt

A value in Gyrs determining the size of the timestep between each frame, how much the look-back time advances per frame. Naturally set to 0.02Gyrs

f

A vector containing the mass fraction of particles within the simulation in simulation units (solar_Mass / h). Naturally set to the mass fraction in the SURFS simulation L210N1024NR (6.29e8, 1.17e8), DM, Bar

png.size

An optional value that determines the size of the png files produced and therefore the size of the mp4 files resolution.

show.R200

A boolean value which if true will overlay a ring showing R200 at Z=0

specify.frame

An optional value, a vector specifiying which frames are to be used in creating the movie

Examples

halo = read.halo(hdf5.file = '/Users/..../test_halo')
rad = R200.calc()
modified.surfsmovie(halo, mp4file = 'test_surfs_movie.mp4', radius = rad, scale = T)


Will-McD/ENSTvisualise documentation built on June 24, 2022, 5:13 p.m.