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:

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::refinement_factor 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::refinement_factor > 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




array2d_dx_i
Scope: private  REAL



Description: Spacing



Range   Default: 0.0
0.0:*






array2d_dx_j
Scope: private  REAL



Description: Spacing



Range   Default: 0.0
0.0:*






array2d_dy_i
Scope: private  REAL



Description: Spacing



Range   Default: 0.0
0.0:*






array2d_dy_j
Scope: private  REAL



Description: Spacing



Range   Default: 0.0
0.0:*






array2d_dz_i
Scope: private  REAL



Description: Spacing



Range   Default: 0.0
0.0:*






array2d_dz_j
Scope: private  REAL



Description: Spacing



Range   Default: 0.0
0.0:*






array2d_npoints_i
Scope: private  INT



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



Range   Default: 10
0:*






array2d_npoints_j
Scope: private  INT



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



Range   Default: 10
0:*






array2d_x0
Scope: private  REAL



Description: Origin



Range   Default: 0.0
*:*






array2d_y0
Scope: private  REAL



Description: Origin



Range   Default: 0.0
*:*






array2d_z0
Scope: private  REAL



Description: Origin



Range   Default: 0.0
*:*






colormap
Scope: private  KEYWORD



Description: How to set the colormap



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






colormap_bias
Scope: private  REAL



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



Range   Default: 0.5
-1:1
Could be unrestricted






colormap_factor
Scope: private  INT



Description: How to scale float values to rgb color



Range   Default: 32
2:256
Positive scaling






colormap_max
Scope: private  REAL



Description: maximum value to be mapped to colors



Range   Default: +1.0
*:*
Only for custom colormap scale






colormap_min
Scope: private  REAL



Description: minimum value to be mapped to colors



Range   Default: -1.0
*:*
Only for custom colormap scale






colormap_quality
Scope: private  INT



Description: JPEG quality of level



Range   Default: 75
0:100
Percentage of full quality






gridpoints
Scope: private  KEYWORD



Description: How to access grid points



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






interpolator_coordinates
Scope: private  STRING



Description: Coordinate system



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






interpolator_name
Scope: private  STRING



Description: Name of the interpolator



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






interpolator_options
Scope: private  STRING



Description: Options for the interpolator



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






mode
Scope: private  KEYWORD



Description: Output mode to use



Range   Default: standard
remove
Remove files from old timesteps
standard
Generate a file for each out_every timesteps






multiply_by_radius
Scope: private  BOOLEAN



Description: Multiply valus by r



  Default: no






out2d_xyplane_z
Scope: private  REAL



Description: z-coord for 2D planes in xy



Range   Default: -424242
*:*
A value between [zmin, zmax]
-424242:
Default to IO::out_xyplane_z






out2d_xyplane_zi
Scope: private  INT



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



Range   Default: -1
0:*
An index between [0, nz)
-1:
Choose the default from IO::out_xyplane_zi






out2d_xzplane_y
Scope: private  REAL



Description: y-coord for 2D planes in xz



Range   Default: -424242
*:*
A value between [ymin, ymax]
-424242:
Default to IO::out_xzplane_y






out2d_xzplane_yi
Scope: private  INT



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



Range   Default: -1
0:*
An index between [0, ny)
-1:
Choose the default from IO::out_xzplane_yi






out2d_yzplane_x
Scope: private  REAL



Description: x-coord for 2D planes in yz



Range   Default: -424242
*:*
A value between [xmin, xmax]
-424242:
Default to IO::out_yzplane_x






out2d_yzplane_xi
Scope: private  INT



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



Range   Default: -1
0:*
An index between [0, nx)
-1:
Choose the default from IO::out_yzplane_xi






out_dir
Scope: private  STRING



Description: Output directory for IOJpeg files, overrides IO::out_dir



Range   Default: (none)
.+
A valid directory name
An empty string to choose the default from IO::out_dir






out_every
Scope: private  INT



Description: How often to do IOJpeg output, overrides IO::out_every



Range   Default: -1
1:*
Every so many iterations
0:
Disable IOJpeg output
-1:
Choose the default from IO::out_every






out_vars
Scope: private  STRING



Description: Variables to output by IOJpeg



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






refinement_factor
Scope: private  INT



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



Range   Default: 1
1:*
A factor greater 0






io_out_dir
Scope: shared from IO STRING






io_out_every
Scope: shared from IO INT






out_xyplane_z
Scope: shared from IO REAL






out_xyplane_zi
Scope: shared from IO INT






out_xzplane_y
Scope: shared from IO REAL






out_xzplane_yi
Scope: shared from IO INT






out_yzplane_x
Scope: shared from IO REAL






out_yzplane_xi
Scope: shared from IO INT






strict_io_parameter_check
Scope: shared from IO BOOLEAN






verbose
Scope: shared from IO KEYWORD



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

CCTK_STARTUP

  iojpeg_startup

  startup routine

 

 After: ioutil_startup
 Language:c
 Type: function

CCTK_BASEGRID

  iojpeg_chooseoutput

  choose 2d output planes

 

 After: spatialcoordinates
 Language:c
 Type: function