plot_enst: Plot the enstrophy from the refined grid algorithm

View source: R/plot_enst.R

plot_enstR Documentation

Plot the enstrophy from the refined grid algorithm

Description

Return an image which compiles each of the layers from the refined adaptive mesh. Each layer of the mesh is collapsed from a 3D array into a 2D array and weighted by density, before then being expanded to the same size 2D array as that of the layer above it in the adaptive mesh.

As each layer is a factor of 3 greater than the previous ie) 3x3x3 -> 9x9x9 -> 27x27x27 .... each layer is expanded by this logic.

The 2D layers are summed together and smoothed in accordance with the smoothing values selected using a Gaussian filter/brush of the gblur f unction by the value of the smoothing parameter.

The final 'layered' image from superimposing each smoothed layer is then smoothed again by the gamma value before plotting the matrix with the colour palette given in the col.palette parameter.

Usage

plot_enst(
  max.layer = Global.nmax,
  smoothing = 1/3,
  alpha = 500,
  beta = 1.5,
  gamma = 0.175,
  scale = NULL,
  final = F,
  col.palette = NULL,
  bg.col = "black"
)

Arguments

max.layer

The highest layer within the list structure to include.

smoothing

The level of smoothing within the gblur function, the sigma values. Naturally a value of 1/3 is assigned.

The smoothing values scale with the size of the grid selected to account for the expansion of each grid.

alpha

A numerical value which is a scale factor in the brightness scale; given as

img = log10( alpha x img + beta ) x gamma

alpha gives the floor or base order of magnitude allowed.

beta

A numerical value which is a constant to add in the brightness scale; given as

img = log10( alpha x img + beta ) x gamma

assigns an extra value to the floor given

gamma

A numerical value which is a scale factor in the brightness scale; given as

img = log10( alpha x img + beta ) x gamma

The total scale factor for the brightness scale

scale

A boolean value. Determining if the frame of the image should be scaled. If TRUE the image plotted or shown is scaled in from the matrix of enstrophy, ie) less of the image is shown.

final

A boolean value, True if plot is of the final frame of a halo, ie) at z=0

col.palette

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

If NULL then cubehelix(1e3) is used.

bg.col

A string, the background colour for the plot of the enstrophy. Naturally set to black.


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