From 168e12461847015efd7371e8275cf0d374dc9145 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Thu, 19 Nov 2015 13:09:55 +0000 Subject: [PATCH] Added example of snapshots with Python scripting beside #snapshot command syntax. --- docs/source/input.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/source/input.rst b/docs/source/input.rst index 0ba53366..d48e953a 100644 --- a/docs/source/input.rst +++ b/docs/source/input.rst @@ -241,6 +241,16 @@ or For example to save a snapshot of the electromagnetic fields in the model at a simulated time of 3 nanoseconds use: ``#snapshot: 0 0 0 1 1 1 0.1 0.1 0.1 3e-9 snap1`` +.. tip:: + You can take advantage of Python scripting to easily create a series of snapshots. For example, to create 30 snapshots starting at time 0.1ns until 3ns in intervals of 0.1ns, use the following code snippet in your input file. Replace `x1 y1 z1 x2 y2 z2 dx dy dz` accordingly. + + .. code-block:: none + + #python: + for i in range(1, 31): + print('#snapshot: x1 y1 z1 x2 y2 z2 dx dy dz {} snapshot{}'.format((i/10)*1e-9, i)) + #end_python: + .. _materials: