! GO PLOTFLUX plots the integrated flux as a function of velocity in ! the polygon 'name'.pol ! the data is 'name'.'type' ! the channels are 'first' to 'last' ! clear plot on error return define header h 'name'.'type' read @ p_header.greg h polygon 'name'.pol say "Using polygon "'name'".pol" ! def integer i1 i2 n let n h%dim[3] def real beam_area v[n] flux[n] let beam_area pi*h%major*h%minor|4|log(2) let i1 first let i2 last if i1.eq.0 then let i1 1 endif if i2.eq.0 then let i2 h%dim[3] endif let flux h%blank[1] let v h%blank[1] sic out 'name'.flux for i i1 to i2 image 'name'.'type' /plane i mean let v[i] h%convert[2,3]+(i-h%convert[1,3])*h%convert[3,3] let flux[i] poly$sum|beam_area say 'v[i]' 'flux[i]' next sic out lim /var v flux set mar 4 0 .1 histo v flux points v flux box label "Velocity (km/s)" /x label "Integrated Flux (Jy)" /y let air 0.1*nint(10.*poly$area|sec^2) /new double draw text 0 -.3 "Flux in \\i"'name'".pol\\i ("'air'" `\u2)" 2 /box 8