## Fitting a tilted ring model to a warped galactic disk

Here we illustrate typical use of the Miriad tasks velmodel and velimage. To make the tilted ring model one must utilise also imgen and maths (see Sections 18.7 and 18.5). The warp is simulated by varying the inclination and position angles of successive annuli (usually suggested from various plots from `data.cube` such as closure of isovelocity contours along the major axis and twists in channel maps showing the minor axis). The velocity rotation profile in the plane of the disk may be suggested by inspection of position-velocity maps made with velplot. For the purpose of this exercise we will assume a flat rotation velocity profile in the plane of the disk of 150 km/s. So we make the 3-dimensional data cube for each tilted ring with velimage and add them together with maths.

 VELIMAGE in=aaa,vvv sigma=10 Velocity dispersion,mandatory if no 3rd image above nchan=64 Number of velocity channels in the output cube start=230 Velocity at channel 1 step=6.6 Velocity increment between channels out=model.cube The output cube options=relax Usually necessary in this type of scheme.

Obviously, prior to running velimage, we must have generated the input files `aaa` and `vvv` which contain our assumptions about the variation in intensity and velocity in our model.

`aaa` is the (x,y) intensity distribution of what will be `model.cube` integrated over the z-axis. In this example it is an elliptical annulus of uniform intensity made by subtracting an inner disk from an outer disk using maths, the disks having been made using imgen as follows :

 IMGEN out=aao Output dataset. object=disk Disk model. spar=0.01,0,-60,1000,500,30 Source parameters, 10 mJy intensity annulus, centred 60 arcsec south of the image centre, major axis=1000 arcsec,minor axis=500 arcsec major axis pa=30 degrees imsize=128,128 Image size. cell=30,30 Cell size in arcsec.

 IMGEN out=aai The outer dataset. object=disk Disk model. spar=0.01,0,-60,1000,500,30 Source parameters, 10 mJy intensity annulus, centred 60 arcsec south of the image centre, major axis=1000 arcsec,minor axis=500 arcsec major axis pa=30 degrees imsize=128,128 Image size. cell=30,30 Cell size in arcsec.

 IMGEN out=aai The inner disk. object=disk Disk model again. spar=0.01,0,-60,800,400,30 Similar parameters, but smaller radii. imsize=128,128 Same image size and cell=30,30 resolution.

 MATHS exp=(aao-aai) Generate a annulus. out=aaa Output dataset name.

`vvv` is a model for the velocities (z-axis) made using velmodel.

 VELMODEL in=data.cube Template input. pa=30 incline=65 radius=30 vrot=150 vsys=440 out=vvv

Note that the input (`data.cube` in the above) a template only but if you use your actual data cube you will finally end up with a model with much of the header information the same as the data, e.g. it will appear to be in the same position in the sky.

One makes a number of such `model.cubes` and adds them together with maths to obtain the final 3-dimensional tilted ring model.