Table of Contents
hdfwedge - Regrid a polar HDF4 SDS wedge to cartesian image
in=SDS-file out=CCD-file [parameter=value]
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
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.
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
The following parameters are recognized in any
order if the keyword is also given:
Here is ....
- Input file (HDF SD). No default.
- Output file, in image(5NEMO)
- Select which
SDS from the file (1=first). See also zvar= below. [Default: 1].
- Number of pixels in X. [Default: 256]
- Number of pixels in Y
- Range in X [Default: -16:16].
- Range in Y [Default: -16:16].
- 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 =
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.
- Attempt to fill the
plane by making the data periodic. ** currently only periodic=t works **
- 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 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
hdfwedge hdf010aa den010.ccd select=4 nx=256 ny=256 xrange=-8:8 yrange=-8:8
The current version is under development, and a few things should
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.
Maps made with an odd numbered of PHI zones
have a minor discontinuity along -X axis.
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