modified.surfsmovie.enst: Generates a movie of density weighted enstrophy.

View source: R/modified.surfsmovie.enst.R

modified.surfsmovie.enstR Documentation

Generates a movie of density weighted enstrophy.

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 enstrophy within a halo, the enstrophy is dervived from the curl within particles identified to be within the halo at redshift z=0.

The aspect ratio of the mp4 file movie is based on the adaptive mesh which is square, therefore the mp4 file has an aspect ratio of 1

Usage

modified.surfsmovie.enst(
  track,
  mesh.width = GLobal.L,
  mp4file,
  fps = 60,
  calc.noise = F,
  H0 = 70,
  OmegaM = 0.3,
  OmegaL = 0.7,
  velocity.conversion = 0.00102269032 * (H0/100),
  keep.frames = TRUE,
  rotation = 1,
  scale = F,
  dt = 0.05,
  f = c(1.17e+08, 6.29e+08),
  png.size = c(300, 300),
  specify.frame = NULL,
  col = NULL,
  show.R200 = F,
  dynam.plot = F,
  bright.scale = c(500, 1.5, 0.175),
  ...
)

Arguments

track

A list containing the halo information from a given hdf5 file from surfsuite, essentially the halo's hdf5 file read in with read.halo

mesh.width

A value of the width of the adaptive mesh used to calculate enstrophy.Naturally set to the Global.L value.

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

calc.noise

A boolean value determining if numerical noise should be calculated in determining the curl of the velocity field. It is naturally set to FALSE to reduce computational time when generating movies as the noise level is not used when generating movies.

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.

scale

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

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 (1.17e8, 6.29e8), Baryon, Dark Matter

png.size

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

specify.frame

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

col

An optional value. The colour palette that will be used to plot the enstrophy.

show.R200

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

!!!! A WORK IN PROGESS !!!! This parameter is not 100% finished and not working in at a suitable level yet!

dynam.plot

A boolean value to determine if the plots size and smoothing should be adjusted for the levels of the adaptive mesh occupied. Naturally set to False

If True it is enabled; Reduces computational time but reduces the quality of the image. The resolution and smoothness of the images produced are of lowered as the layers of the mesh when compiled will only expand to fit the highest occupied layer and smooth the img at that level.

If False it is disabled; When compiling the layers of the mesh they will all be expanded to the Global.nmax and smoothed at that level.

!!!!NOT FULLY TESTED YET !!!!! It is in a stage of working, however has not be tested as extensively.

bright.scale

a vector containing 3 numeric values, that alter the brightness scale used in creating the png images bright.scale = c(alpha, beta, gamma)

where the brightness scale is given as img = log10(alpha x img + beta) x gamma

Examples


halo = read.halo(hdf5.file = '/Users/..../test_halo')
modified.surfsmovie.enst(halo, mp4file = 'test_surfs_movie.mp4', mesh.width = 3*R200.calc())


A movie where if in full it would be 10s at 60 fps, therefore 600 frames.
However to have the movie only be on the final second of this whole movie:
modified.surfsmovie.enst(halo, mp4file = 'test_surfs_movie.mp4', specify.frame = seq(499, 600))


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