xx IOJpeg

IOJpeg

Gabrielle Allen, Thomas Radke

Date

Abstract

Output method using the jpeg format

1 Use

Thorn IOJpeg provides 2D images from grid functions in jpeg format, these images are currently intended to be used for two purposes:

Monitoring from Web Server Jpeg images can be directly visualised in the viewport provided by thorn CactusConnect/HTTPDExtra. For the images to be advertised to the Web Server the parameter

     iojpeg::mode = ``remove'' must be used.

Constructing Movies A series of jpeg movies can easily be used to construct a time series movie (e.g. using the Unix utilities convert or xanim). In this case the parameter iojpeg::mode =

     ``standard'' must be used.

Note that the parameter iojpeg::mode determines whether a jpeg image is ccreated and kept for individual timesteps, or whether only the image from the current data is kept. Only in the second case is the jpeg file advertised (otherwise there are potentially thousands of files advertised to e.g. the HTTPD thorn). Also note that using the standard mode and creating jpegs every iteration can quite quickly lead to inode problems on a machine.

The steerable parameter IOJpeg::refinementxfactor determines whether the resulting JPEG images (of same size as the underlying grid) should be refined by a certain factor. If refinement is enabled (IOJpeg::refinementxfactor 1) an interpolation will be done to enlarge the images to the requested size. For this case, a thorn providing local interpolation operators must be activated (eg. thorn

CactusBase/LocalInterp).

We are planning to develop this thorn more to provide more features (eg a range of 2D images from a 3D dataset, add possibility to save images for a movie and advertise current image).

2 Parameters

11 array2dxdxxi 10 Scope: private01 REAL

11 Description: Spacing

11 Range 10 01 Default: 0.0
11 0.0:*  10

11

11 array2dxdxxj  10 Scope: private01  REAL

11 Description: Spacing

11 Range 10 01 Default: 0.0
11 0.0:*  10

11

11 array2dxdyxi  10 Scope: private01  REAL

11 Description: Spacing

11 Range 10 01 Default: 0.0
11 0.0:*  10

11

11 array2dxdyxj  10 Scope: private01  REAL

11 Description: Spacing

11 Range 10 01 Default: 0.0
11 0.0:*  10

11

11 array2dxdzxi  10 Scope: private01  REAL

11 Description: Spacing

11 Range 10 01 Default: 0.0
11 0.0:*  10

11 array2dxdzxj  10 Scope: private01  REAL

11 Description: Spacing

11 Range 10 01 Default: 0.0
11 0.0:*  10

11

11 array2dxnpointsxi  10 Scope: private01  INT

11 Description: Number of grid points for the 2D grid arrays in the i direction

11  Range  10              01  Default: 10

11 0:*  10

11

11 array2dxnpointsxj  10 Scope: private01  INT

11 Description: Number of grid points for the 2D grid arrays in the j direction

11  Range  10              01  Default: 10

11 0:*  10

11

11 array2dxx0  10 Scope: private01  REAL

11 Description: Origin

11  Range  10              01  Default: 0.0

11 *:*  10

11

11 array2dxy0  10 Scope: private01  REAL

11 Description: Origin

11  Range  10              01  Default: 0.0

11 *:*  10

11

11 array2dxz0  10 Scope: private01  REAL

11 Description: Origin

11  Range  10              01  Default: 0.0

11 *:*  10

11

11 colormap  10 Scope: private01  KEYWORD

11 Description: How to set the colormap

11 Range 10 01 Default: custom
11 auto  10 Set automatically using min/max of grid variables
11 auto-old  10 Set automatically using min/max of grid variables, using the old reduction interface which is still used by Carpet
11 custom  10 Set min/max manually

11

11 colormapxbias  10 Scope: private01  REAL

11 Description: Bias automatic colormap generation towards red (low) or blue (high)

11 Range 10 01 Default: 0.5
11 -1:1  10 Could be unrestricted

11

11 colormapxfactor  10 Scope: private01  INT

11 Description: How to scale float values to rgb color

11 Range 10 01 Default: 32
11 2:256  10 Positive scaling

11

11 colormapxmax  10 Scope: private01  REAL

11 Description: maximum value to be mapped to colors

11 Range 10 01 Default: +1.0
11 *:*  10 Only for custom colormap scale

11 colormapxmin  10 Scope: private01  REAL

11 Description: minimum value to be mapped to colors

11 Range 10 01 Default: -1.0
11 *:*  10 Only for custom colormap scale

11

11 colormapxquality  10 Scope: private01  INT

11 Description: JPEG quality of level

11 Range 10 01 Default: 75
11 0:100  10 Percentage of full quality

11

11 gridpoints  10 Scope: private01  KEYWORD

11 Description: How to access grid points

11 Range 10 01 Default: hyperslab
11 hyperslab  10 use locations of grid points
11 interpolate  10 interpolate to arbitrary points

11

11 interpolatorxcoordinates10 Scope: private01  STRING

11 Description: Coordinate system

11 Range 10 01 Default: cart3d
11 .*  10 must be a registered coordinate system

11

11 interpolatorxname  10 Scope: private01  STRING

11 Description: Name of the interpolator

11 Range 10 01 Default: Lagrange polynomial interpolation
11 .*  10 must be a registered interpolator

11

11 interpolatorxoptions 10 Scope: private01  STRING

11 Description: Options for the interpolator

11 Range 10 01 Default: order=2
11 .*  10 must be a valid option specification

11

11 mode  10 Scope: private01  KEYWORD

11 Description: Output mode to use

11 Range 10 01 Default: standard
11 remove  10 Remove files from old timesteps
11 standard  10 Generate a file for each outxevery timesteps

11

11 multiplyxbyxradius  10 Scope: private01  BOOLEAN

11 Description: Multiply valus by r

11                      10              01  Default: no

11

11 out2dxxyplanexz  10 Scope: private01  REAL

11 Description: z-coord for 2D planes in xy

11 Range 10 01 Default: -424242
11 *:*  10 A value between [zmin, zmax]
11 -424242:  10 Default to IO::outxxyplanexz

11

11 out2dxxyplanexzi  10 Scope: private01  INT

11 Description: z-index (from 0) for 2D planes in xy

11 Range 10 01 Default: -1
11 0:*  10 An index between [0, nz)
11 -1:  10 Choose the default from IO::outxxyplanexzi

11 out2dxxzplanexy  10 Scope: private01  REAL

11 Description: y-coord for 2D planes in xz

11 Range 10 01 Default: -424242
11 *:*  10 A value between [ymin, ymax]
11 -424242:  10 Default to IO::outxxzplanexy

11

11 out2dxxzplanexyi  10 Scope: private01  INT

11 Description: y-index (from 0) for 2D planes in xz

11 Range 10 01 Default: -1
11 0:*  10 An index between [0, ny)
11 -1:  10 Choose the default from IO::outxxzplanexyi

11

11 out2dxyzplanexx  10 Scope: private01  REAL

11 Description: x-coord for 2D planes in yz

11 Range 10 01 Default: -424242
11 *:*  10 A value between [xmin, xmax]
11 -424242:  10 Default to IO::outxyzplanexx

11

11 out2dxyzplanexxi  10 Scope: private01  INT

11 Description: x-index (from 0) for 2D planes in yz

11 Range 10 01 Default: -1
11 0:*  10 An index between [0, nx)
11 -1:  10 Choose the default from IO::outxyzplanexxi

11

11 outxdir  10 Scope: private01  STRING

11 Description: Output directory for IOJpeg files, overrides IO::outxdir

11 Range 10 01 Default: (none)
11 .+  10 A valid directory name
11 ˆ$  10 An empty string to choose the default from IO::outxdir

11

11 outxevery  10 Scope: private01  INT

11 Description: How often to do IOJpeg output, overrides IO::outxevery

11 Range 10 01 Default: -1
11 1:*  10 Every so many iterations
11 0:  10 Disable IOJpeg output
11 -1:  10 Choose the default from IO::outxevery

11

11 outxvars  10 Scope: private01  STRING

11 Description: Variables to output by IOJpeg

11 Range 10 01 Default: (none)
11 .+  10 Space-separated list of fully qualified variable/group names
11 ˆ$  10 An empty string to output nothing

11

11 refinementxfactor  10 Scope: private01  INT

11 Description: Refine each 2D slice by a certain factor (using interpolation) ?

11 Range 10 01 Default: 1
11 1:*  10 A factor greater 0

11

11 ioxoutxdir  10 Scope: shared from IO01STRING

11

11 ioxoutxevery  10 Scope: shared from IO01INT

11

11 outxxyplanexz  10 Scope: shared from IO01REAL

11 outxxyplanexzi  10 Scope: shared from IO01INT

11

11 outxxzplanexy  10 Scope: shared from IO01REAL

11

11 outxxzplanexyi  10 Scope: shared from IO01INT

11

11 outxyzplanexx  10 Scope: shared from IO01REAL

11

11 outxyzplanexxi  10 Scope: shared from IO01INT

11

11 strictxioxparameterxcheck 10 Scope: shared from IO01BOOLEAN

11

11 verbose  10 Scope: shared from IO01KEYWORD

11

3 Interfaces

General Implements: iojpeg

Inherits: io

4 Schedule This section lists all the variables which are assigned storage by thorn CactusIO/IOJpeg. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage NONE

Scheduled Functions

CCTKxSTARTUP x iojpegxstartup x startup routine x

11 x 11 After:  11 ioutilxstartup
11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxBASEGRID x iojpegxchooseoutput x choose 2d output planes x

11 x 11 After:  11 spatialcoordinates
11 x 11 Language: 11 c
11 x 11 Type:  11 function