FRAME_EXTRACTOR

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
INPUT FORMATS
OUTPUT FILES
EXAMPLES
AUTHOR
SEE ALSO

NAME

frame_extractor - interpolate individual timesteps from an AMR dataset

SYNOPSIS

frame_extractor [-cv] [-b N] [ -e N] [ -s N] -t filename -o pattern -f fieldname datafiles ...

DESCRIPTION

Frame_extractor is a command-line program which takes a time-refined Adaptive Mesh Refinement (AMR) dataset, and outputs a set of single timestep AMR datasets, at time values specified by the user. These single-timestep datasets can then be used by an AMR volume renderer. The algorithm used to perform the temporal interpolation will hopefully be presented in a paper at some later date.

OPTIONS

-c
Ensure that the output datasets are in a cell-centered format, performing any conversions if necessary. The default behaviour is to output with the same centering as the original dataset.
-v
Ensure that the output datasets are in a vertex-centered format, performing any conversions if necessary. Vertex-centered datasets are the preferred form for many visualization tasks, including volume rendering. The default behaviour is to output with the same centering as the original dataset.
-t <filename>
Specify a time file to use. The file should be a text file containing floating point time values, one value per line. Time values should be specified in the AMR dataset's native time units. Frame_extractor will output a single-timestep AMR dataset for each line in this input.
The time values must lie within the time range covered by the input dataset. Otherwise, an error will occur when frame_extractor reaches the first frame not contained in the input dataset, and processing will abort.
-b <N>
Specify a beginning frame as an integer. Frame_extractor will start processing frames starting with the N+1st entry in the time file.
Default: 0
-e <N>
Specify an end frame as an integer. Frame_extractor will process frames up to and including the Nth entry in the time file.
Default: Number of entries in the time file
-s <N>
Specify a stride as an integer. Frame_extractor will only process every Nth entry in the time file.
Default: 1
-o <pattern>
Specify a file pattern for the output files. The pattern should be a printf-style format string taking a single integer argument, such as "frame_%04d". Frame_extractor will use this pattern as a prefix to output files.
-f <fieldname>
Specify a particular scalar field within the dataset to interpolate. Multiple fields may be specified by providing multiple -f options. If no -f options are specified on the command line, all fields in the dataset will be interpolated.

INPUT FORMATS

Frame_extractor takes AMR input in either the enzo_movie format, or in MetaAMR format. If multiple datasets are specified, they are merged. This facility is intended to be used for when an AMR simulation has been restarted, which usually results in some overlap between the runs. It is not meant to handle merging unrelated simulations.
For enzo_movie inputs, one specifies a simulation by passing the movie header file, typically named movieHeader.dat. As frame_extractor needs a bit more information than some enzo versions provide, this file may need to be edited by hand; see the manual page for enzo_movie(5) for details on this.
For AMR datasets in the MetaAMR data format, you only need to specify the .xml file on the command line. The scalar field data location should be contained within the .xml file itself. If, for some reason, the data locations specified in the .xml file are incorrect, it usually suffices to place the .xml file in the same directory as the scalar data files.

OUTPUT FILES

Frame_extractor outputs two or more files for every frame processed. One file will have the suffix .xml, and is a MetaAMR format file describing the grid structure. Also, for each scalar field processed, a file with the suffix .<fieldname>.brick is produced, which is a binary file containing the scalar field data stored as a collection of data bricks. For more information on both the metadata format and the binary brick format, see the MetaAMR(5) man page for details.

EXAMPLES

For the following examples, suppose we have the file:
timefile.txt:
0.0
1.0
1.5
1.75
1.875
1.9375
And suppose the simulation was in enzo_movie format, located in /data/amr/sim1.
Then the following command line:
> frame_extractor -v -t timefile.txt \
-o frame_%04d -f BaryonDensity \
/data/amr/sim1/movieHeader.dat
would produce the following files:
frame_0000.xml
frame_0000.BaryonDensity.brick
frame_0001.xml
frame_0001.BaryonDensity.brick
...
frame_0007.xml
frame_0007.BaryonDensity.brick
Note the use of the -v flag. This is very important if the output is to be used for most forms of visualization.
As simulations may need to be restarted, the simulation may be split up into more than one part. If this were the case, and the restarted simulation data was located in /data/amr/sim1restart, the command line would look like this:
> frame_extractor -v -t timefile.txt \
-o frame_%04d -f BaryonDensity \
/data/amr/sim1/movieHeader.dat \
/data/amr/sim1restart/movieHeader.txt
As the temporal interpolation is a lengthy and memory-consuming process, one might wish to run it on several machines. The -b and -s options help here. Assuming /data/amr is mounted on both machines:
(on machine "yin")
yin> frame_extractor -v -s 2 -b 0 \
-t timefile.txt -o frame_%04d \
/data/amr/sim1/movieHeader.dat
(on machine "yang")
yang> frame_extractor -v -s 2 -b 1 \
-t timefile.txt -o frame_%04d \
/data/amr/sim1/movieHeader.dat
This will compute the even frames on yin, and the odd frames on yang.

AUTHOR

Matthew Hall <mahall at ncsa dot uiuc dot edu>

SEE ALSO

enzo_movie(5), MetaAMR(5)