These "makeplot" routines can be used to create moments (both in FITS files, and as plots) from datacubes. They have been tested with ALMA/CARMA data, but should work on data from many radio/(sub-)millimetre telescopes.
This package includes everything that is required, apart from the IDL astrolib (https://idlastro.gsfc.nasa.gov/) and the Coyote Graphics Library (http://www.idlcoyote.com/documents/cg_programs.php).
It includes a commented example (makeExamplePlots.pro), which works with the observed datacube for NGC4710 (also included- from Alatalo et al., 2013; http://adsabs.harvard.edu/abs/2013MNRAS.432.1796A). This should show you how to use the code, and adapt it to work with your own datacube(s).
If you find any bugs, or wish to be kept up to date when new versions of this software are released, please email me at DavisT -at- cardiff.ac.uk
Many thanks,
Dr Timothy A. Davis
Cardiff, UK