Learn R Programming

infraFDTD.assist (version 0.6)

MakeSnapshotInfo: First Step in Snapshot Conversion

Description

Helps convert binary snapshot output from infraFDTD into images. This function collects information from the snapshots to facilitate the conversion. It does NOT perform the conversion itself (see MakeSnapshots for that).

Usage

MakeSnapshotInfo(inputdir = "./snapshots", dframe = 20, N = 400, xs, ys,
zs, makesec1 = TRUE, makesec2 = TRUE, makesurf = TRUE)

Arguments

inputdir

Directory containing snapshot files.

dframe

Snapshot interval in samples (difference between snapshot file numbers).

N

Number of snapshots.

xs

X source coordinates (m); can be a vector if multiple sources.

ys

Y source coordinates (m); can be a vector if multiple sources.

zs

Z source coordinates (m); can be a vector if multiple sources.

makesec1

Logical: should section 1 snapshots be processed?

makesec2

Logical: should section 2 snapshots be processed?

makesurf

Logical: should surface snapshots be processed?

Value

A list of data to be passed to MakeSnapshots.

Details

inputdir must include all snapshot files as well as coord_sec1.txt, coord_sec2.txt, and coord_sur.txt.

MakeSnapshotInfo is fairly time-consuming, so it's separated from MakeSnapshots so that MakeSnapshots can be run repeatedly to test different graphical settings without having to re-calculate this information every time.

See Also

MakeSnapshots

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