Learn R Programming

infraFDTD.assist (version 0.6)

MakeSnapshots: Convert Binary Snapshot Output to PNGs

Description

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

Usage

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).

Value

None, file output only.

Details

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

See Also

MakeSnapshotInfo

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab