MBspect - Measuring flux of a source in a cube

Created Mar 200 DCZ, JAH

Htmled June 2000

Mbspect is NOT installed on the Jodrell version of Miriad, therefore you must run it from the directory I downloaded it to (~multi/dan/mbspect). So :

 cd ~multi/dan/mbspect
 source /usr/local/miriad/bin/MIRRC
This sets up the environment for the WORKING version of miriad, rather than the default version which will not work with mbspect. Mbspect is a miriad command. It only works on miriad files (.mir), so to convert a fits cube to miriad, type

	fits in=whatever.fits out=whatever.mir op=xyin
If this doesn't work, try putting the whole path
	/usr/local/miriad/bin/sun4sol/fits in= etc etc
You can then enter miriad using :
	miriad 
To see the parameters for the mbspect command, type
	inp mbspect 
You can type inp at any time in miriad to see your current parameters. You now you need to enter the parameters for your source. Type
	in = /home/multi/cubename.mir 
Putting in the correct path to your miriad cube. Then type
	coord = 11:29:44,52:59:53 
i.e. the ra and dec of the centre of your source. You can get this from running kview and zooming in to the centre of the detection. Try to be as accurate as possible. Then set the display to a permanent xwindow :
	device = /xs 
If you now type
	go 
The entire spectrum should be displayed. You now need to select just your galaxy from the velocity range. First zoom in the display to around your galaxy, so choose a zmin and zmax, which will be about 1500km/s less and more than your galaxy; eg. assuming your galaxy is somewhere around 1500-2000 km/s, type
	xrange = 500,4000 
Then select the ACTUAL zmin and zmax of your galaxy profile by typing :
	profile = 1300,1420 
i.e the velocity limits of your galaxy. Now we can say that we want to integrate (spatially in RA,DEC) over the beam shape/size, assuming our galaxy is a point source. Type
	yaxis=point 
Now, as the baseline hardly ever is flat and at 0 level, we can fit a polynomial to our baseline, which will be subtracted in the flux calculation. Type
	order = -3 
Where 3 is the order of the polynomial to fit. you could try other numbers, but anything between about 2 and 4 usually does the trick. The - (minus sign) just tells the program that you want the displayed spectrum to have the fit subtracted. If you omit the minus sign, the polynomial fit will just be displayed on the spectrum instead. Either way, it will be subtracted from any flux measurements. We now just need to tell mbspect to measure the flux, type
	options=measure 
And we can then run mbspect again by typing
	go 
This should produce a bit of text, of which the 'Moment 0' value gives you the integrated flux of the source.


DCZ, JAH Mar 29 2000 Last modified: Wed Jun 14 17:33:37 BST 2000