Two gridding methods exist:

*
retracing:* the GIPSY method retraces each pixel in the
sky plane to its (smallest) radius in the (warped) galactic disk: its
ring parameters (velocity, position angle, and inclination) are then (linearly)

*gridding:*
the NEMO method places particles in rings, as prescribed by the input values,
and computes a properly intensity weighted (number of particles in this
case) mean velocity per pixel. This may however results in a ’meaningless’
mean velocity in areas where rings are projected on top of each other. *Note:*
This mode, originally the only one, merely served as a shortcut between
the various N-body creators, followed by subsequent gridding with *snapgrid*.
It may not work anymore, since it is not well maintained.

The center coordinates and systemic velocity are currently fixed for all rings.

Using keywords
**mexp=** and **phexp=** a circular orbit can have its expansion velocity modulated:

instead of a constant vexp (i.e. mexp=0), where phi is measured from the major axis in the plane of the disk (check!). This only works for the retracing method though. Although the rotation speed has a similar modulation implemented, it is not a good idea to use that. Instead, it will probably be better to re-define this asvexp*cos(mexp*(phi-phiexp))

though this would suggest the local velocity ellipsoid to be isotropic (cf. Binney & Tremaine ....)vrot+vexp*sin(mexp*(phi-phiexp))

**out**=*image_out*- Output velocity field map, will be in
*image(5NEMO)*format. No default. **radii**=*r1,r2,...*- Radii (arcsec). Note they must be sorted by increasing
radius. The default is taken from the
*rotcur_table*table below, or from this keyword. **vrot**=*v1,v2,...*- Array of rotation velocities, one for each radius,
If less than the number of radii is given, the trailing ones are filled
with the last supplied value. The default values from the
*rotcur_table*table below can be also be overridden with this keyword. **vexp**=*v1,v2,...*- Array of expansion velocities, one for each radius. If less than the number of radii is given, the trailing ones are filled with the last supplied value. Default: 0
**inc**=*i1,i2,...*- Array of inclinations (degrees), one for each radius. The default
values from the
*rotcur_table*table below can be also be overridden with this keyword. **pa**=*p1,p2,...*- Array of position angles (degrees), one for each
radius. The default values from the
*rotcur_table*table below can be also be overridden with this keyword. **phrot**=*p1,p2,p3,...*- Array of rotation phase angles (degrees), one for each radius. Don’t use this right now. Default: 0
**phexp**=*p1,p2,p3,...*- Array of expansion phase angles (degrees), one for each radius, for the modulation of the expansion velocities.
**mrot**=*m*- Fourier mode for the rotation speed modulation. Currently not a good idea to use this, since we would modulate the whole rotation, not a tiny bit on top of rotation. Use mexp=,phexp=. Default: 0
**mexp**=*m*- Fourier mode for the expansion speed modulation. Default: 0
**size**=*nx,ny*- Size of map, up to two numbers. If one
number supplied, the map will be square. Note that in NEMO (0-based) coordinates,
the center of rotation will be at
*((nx-1)/2,(ny-1)/2)*. [Default:**128**]. **cell**=*dx,dy*- Cell size, up to two numbers. If one number supplied, the cells will be
square. [Default:
**1**]. **center**=*x0,y0*- Rotation center (grids with lower left
corner being 0,0). Default: center of map if
*rotcur_table*is not used, else the*center_ring*entry from the*rotcur_table*. **blc**=*xmin,ymin*- Lower left corner of the grid. Default: 0,0.
**vsys**=*vsys*- Systemic velocity. Default:
**0**if*rotcur_table*is not used, else the*center_ring*entry from the*rotcur_table*. **rotcurfit=***rotcur_table*- All ring parameters can also be read from this table,
that is normally output by
*rotcur(1NEMO)*’s**tab=**keyword. That table needs to be commented with*tabcomment(1NEMO)*. **fixring=***center_ring*- Ring number
(1..Nring), from the
*rotcur_table*, of which the center (**vsys, center**) is used. If**0**is used, they must have been given by the appropriate keywords. If a large number is given, the last table entry is used. **noise=***v_sigma*- Dispersion of the gaussian noise added to the map. Default: 0
**amp=***t|f*- If
set to true (or 1) it will create an amplitude (surface brightness) map,
instead of a velocity field. In this case, the rotation speed is taken as
the amplitude of the density map. See also
*ccdgen(1NEMO)*. **seed=**- Initial seed
for random number generator. See
*xrandom(3NEMO)*for defaults. Default: 0 **in=***ccd-file*- Template (2d) image to provide the WCS for a cube. (deprecated)
**intpol=linear|constant**- Interpolation method used for rings in retrace method.
For
**linear**each computed galactic radius has linearly interpolated values for the rotation curve, inclincation, position angle etc., whereas for**constant**the starting value of ring is used. Default:**linear**. **headline=***comments*- Random verbiage added to the output image [Default: none].

1% rotcur in=map1 radii=100:10:-5 vrot=100 pa=20 inc=45 vsys=1200 \ center=100,110 fixed=center,vsys,inc tab=map1.tmp units=arcsec 2% tabcomment map1.rotcur - | sort -n > map1.rotcur 3% ccdvel out=map1.model rotcurfit=map1.rotcur 4% ccdmath in=map1,map1.model out=map1.diff \ fie="ifeq(%1,0.0,0.0,ifeq(%2,0.0,0.0,%1-%2))"

One can also use ccdvel to create a surface brightness. Creating a functional
form for the density can be done using *tabmath(1NEMO)*
. E.g. the following
example creates an exponential surface density profile:

5% set rad=‘nemoinp 0:100:5‘ 6% set den=‘nemoinp 0:100:5 | tabmath - - "exp(-%1/20)" all‘ 7% ccdvel out=map1.den radii="$rad" vrot="$den" pa=30 inc=60 amp=t or 8% nemoinp 0:100:5 > map1.radt 9% nemoinp 0:100:5 | tabmath - - "exp(-%1/20)" all > map1.dent 10% ccdvel out=map1.den radii=@map1.radt vrot=@map1.dent pa=30 inc=60 amp=t Now one can create a velocity field in a simular way,

11% nemoinp 0:100:5 | tabmath - - "%1/sqrt(40+%1*%1)" all > map1.velt

12% ccdvel out=map1.vel radii=@map1.radt vrot=@map1.velt pa=30 inc=60

and with simulated beamsmearing create a beam smeared velocity field: 13% ccdsmooth map1.den map1.dens 4 13% ccdmath map1.den,map1.vel - "%1*%2" | ccdsmooth - map1.dvels 4 14% ccdmath map1.den,map1.dvels map1.vels "%2/%1"Note however that this method of beamsmearing is only approximate, and ignores the internal velocity dispersion, which can be very important in areas of large velocity gradients.

The *gridding* method is currently not available.
The retracing (GIPSY) method will be used.

Different versions of rotcur
exist (NEMO, Gipsy) that use different columns, so the **rotcurfit=** tables
should be used with caution.

20-may-91original programPJT 31-jul-92V1.3 new rotcurfit=; rings are now radiiPJT 3-aug-92(b) fixed mapsize bug; override center=PJT 12-aug-92(d) added headline=PJT oct-99doc additionsPJT apr-01V1.5b added in=, but deprecated itPJT 1-may-01V1.6 added amp= for CARMA simulationsPJT/LGM 3-may-01V1.7 added vexp=PJT 29-jun-02V1.8 added blc= keyword (Joshua Simon)PJT 6-feb-03V2.0 modulated orbits (mexp,phexp,mrot,phrot)PJT 11-sep-03V2.1 added intpol=PJT