HTML automatically generated with rman
Table of Contents

Name

hdfwedge - Regrid a polar HDF4 SDS wedge to cartesian image

Synopsis

hdfwedge in=SDS-file out=CCD-file [parameter=value]

Description

hdfwedge regrids HDF (SDS) files that are assumed to be in polar (rad-phi) coordinates, but can contain any size wedge (ideally an integer fraction of 2.PI). It was cloned off hdfgrid(1NEMO) in December 2004, so a number of their comments on the assumptions on the input format also apply to this program. See also CAVEATS below for some important notes.

The first two dimension must be radius and angle, there can be an optional 3rd dimension, but it must be 1 slice in Z only.

The (2D) four-point interpolation that is used in regridding is based on the one in cmhog/movie.src, but includes correct interpolations for points that are created if periodic=t is used. The program is not well designed to detect errors in the amount of periodicity (e.g. creating a wedge from -1 to 1 radian, and setting periodic=t will probably result in awkward looking images.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=hdf_sds
Input file (HDF SD). No default.
out=image
Output file, in image(5NEMO) format.
select=frame_no
Select which SDS from the file (1=first). See also zvar= below. [Default: 1].
nx=X_pixels
Number of pixels in X. [Default: 256]
ny=Y_pixels
Number of pixels in Y [Default: 256].
xrange=xmin:xmax
Range in X [Default: -16:16].
yrange=ymin:ymax
Range in Y [Default: -16:16].
zvar=grid_var
Gridding variable. Normally left alone, unless certain allowed mathematical expressions on the direct griddable variables (as defined by select=) need to be overriden. Allowed are vr (select=1), vt (select=2), den (select=3), vx, vy, vm and vp. Note that vm and vp are special cases of a linear combination of vx, vy vm = (vx-vy)/sqrt(2) and vp = (vx+vy)/sqrt(2) , just to get an idea of the velocity field under a "middle" position angle. ** currently not implemented yet ** Default: not used, select= is used.
periodic=t|fP
Attempt to fill the plane by making the data periodic. ** currently only periodic=t works ** [Default: t].
z=z-value
Select a z-slice (0=first) from the RPZ cube if NZ > 1. By default the first (or only for 2D data) slice is used.
order={z,p,r}
Order of HDF axes. Note again that the order of axes in HDF is defined in C order (eg. as seen in tsd(1NEMO) ), where the first printed axis is the slowest varying axis (usually the Z axis in an R-P-Z cube. But we still would call this cube with order=zpr

Examples

Here is ....
  hdfwedge hdf010aa den010.ccd select=4 nx=256 ny=256 xrange=-8:8 yrange=-8:8

Caveats

The current version is under development, and a few things should be noted:

zvar= and periodic= do not work yet.

The algorithm tries to find how many multiples of the wedge are needed to fill 2.pi, and adds a shadow zone at either end to simplify dealing with coordinates close the -X axis. Wedges that are close to, but not exactly, whole fractionals of 2.pi can result in a shadow zone that is offset by 2. The program will detect this and attempt to repair this roundoff error (or a dataset with questionable choices of the boundary). This will occur for odd sized PHI axis, but is now fixed as a special case.

Bugs

Maps made with an odd numbered of PHI zones have a minor discontinuity along -X axis.

Files

src/image/hdf/cmhog    hdfwedge.c

See Also

hdfgrid(1NEMO) , tsd(1NEMO) , sdsfits(1NEMO)
visit: http://www.llnl.gov/visit/

Author

Peter Teuben

Update History


17-dec-04    V0.1 created    PJT
20-dec-04    V0.2 repair files with 2-step shadow zones    PJT
23-dec-04    V0.3 fixed for odd sized Nphi files    PJT
26-oct-06    V0.5 use z= to handle 3D cubes    PJT


Table of Contents