MakeSnapshots: Convert Binary Snapshot Output to PNGs

Description Usage Arguments Details Value Author(s) See Also Examples

Description

With the help of MakeSnapshotInfo, converts binary snapshot output files from infraFDTD to PNG format.

Usage

1
2
3
4
MakeSnapshots(info, outputdir = "./anim", prefix = "snapshot", nums =
1:info$N, dt = 0.1, makesec1 = TRUE, makesec2 = TRUE, makesurf = TRUE,
res = 96, fn_topomap = "topomap.png", width = 480, height = NaN, asp =
1, pointsize = 12)

Arguments

info

Output of MakeSnapshotInfo().

outputdir

Directory where PNG files should be written.

prefix

Prefix to use in output file names (e.g., outputdir/prefix_sec1_001.png).

nums

Vector of snapshot numbers to convert (default is all of them).

dt

Snapshot interval in seconds

makesec1

Logical: should section 1 snapshots be converted?

makesec2

Logical: should section 2 snapshots be converted?

makesurf

Logical: should surface snapshots be converted?

res

Resolution of output PNG files (see ?png).

fn_topomap

File name for topo map output.

width

Width of output images (pixels)

height

Optional: if blank, MakeSnapshots() will find the correct height given the image dimensions and asp. If set, forces the height of output images.

asp

Aspect ratio of images (default 1).

pointsize

Pointsize in output images (default 12).

Details

Use a shell command like 'convert' (imagemagick, available in linux) to make a gif out of the stills.

Value

None, file output only.

Author(s)

Jake Anderson; code is heavily modified from Keehoon Kim's original.

See Also

MakeSnapshotInfo

Examples

1
2
3
4
## Don't Run: (requires snapshot files)
## info = MakeSnapshotInfo('./snapshots', dframe = 20, N = 400,
## xs = 100, ys = 100, zs = 500)
## MakeSnapshots(info, outputdir = './anim', prefix = 'snapshot', dt = 0.1)

infraFDTD.assist documentation built on May 2, 2019, 9:30 a.m.