map
The current version is optimized for galaxy cubes, where everything is velocity based, and searching for low density gas in the outer regions. Another application is high-Z frequency based, and stack based on certain spectral lines and look for a signal.
# make lookup tables nemoinp 0:140:5 > map1.radt tabmath map1.radt map1.dent "exp(-%1/20)" all tabmath map1.radt map1.velt "%1/sqrt(40+%1*%1)" all # plot the density (red in pgplot) and velocity (green in pgplot) vs. radius paste map1.radt map1.dent map1.velt | tabplot - 1 2,3 color=2,3 line=2,1 # velocity and density ccdvel out=map1.vel radii=@map1.radt vrot=@map1.velt pa=45 inc=60 size=256 vsys=10 ccdvel out=map1.den radii=@map1.radt vrot=@map1.dent pa=45 inc=60 size=256 amp=t # cube with and without noise velcube invel=map1.vel inden=map1.den out=map1.cube sigdefault=0.1 zrange=8:12 nz=200 velcube invel=map1.vel inden=map1.den out=- sigdefault=0.1 zrange=8:12 nz=200 |\ ccdmath - map1n.cube ’%1+rang(0,0.001)’ # shifted cubes (adding noise back where it was lost due to the shift) ccdzshift map1.cube map1.vel map2.cube ccdzshift map1n.cube map1.vel - |\ ccdmath - map2n.cube ’ifeq(%1,0,%1+rang(0,0.001),%1)’ ccdellint map2.cube 0:200:2 pa=45 inc=60 vsys=10 center=128,128 out=map2.rv ccdellint map2n.cube 0:200:2 pa=45 inc=60 vsys=10 center=128,128 out=map2n.rv ccdellint map2n.cube 0:200:2 pa=45 inc=60 vsys=10 center=128,128 out=map2m.rv norm=f ccdmom map2n.rv - axis=2 mom=0 | ccdprint - x= newline=t label=x |\ tabmath - - ’%1,log(%2)’ all | tabplot - 1 2 color=2 point=2,0.1 line=1,1 xcoord=140 ccdmom map2n.rv - axis=2 mom=1 | ccdprint - x= newline=t label=x |\ tabplot - 1 2 color=2 point=2,0.1 line=1,1 ymin=9 ymax=11 xcoord=140 ccdmom map2n.rv - axis=2 mom=2 | ccdprint - x= newline=t label=x |\ tabplot - 1 2 color=2 point=2,0.1 line=1,1 ymin=0 ymax=2 xcoord=140 # this mom=2 plot has lots of NaN’s at radiiA more realistic example would be to use observational data. Lets say we have a cube, and a velocity field. First recifying the cube, then averaging all emission along the RA (x) and DEC (y) axis, we get a single spectrum along z, plotted using tabplot(1NEMO) :
ccdmom ngc6503.ccd ngc6503vel.ccd mom=1 rngmsk=t clip=0.002 ccdzshift ngc6503.ccd ngc6503vel.ccd ngc6503_0.ccd ccdmom ngc6503_0.ccd - axis=1 |\ ccdmom - - axis=2 |\ ccdprint - x= y= z= |\ tabplot - 0 1 line=1,1 ycoord=0 point=2,0.05 nds9 ngc6503_0.ccd
fits in=ngc6503.fits out=ngc6503.mir op=xyin velsw in=ngc6503.mir axis=VRAD fits in=ngc6503.mir out=ngc6503vrad.fits op=xyout fitsccd ngc6503vrad.fits - | ccdhead - Z-range: 261.861 -196.743 MinMax: -0.00315721 0.0169835 and one in CASA, which delivers in m/s importfits(’ngc6503.fits’,’ngc6503.im’) exportfits(’ngc6503.im’,’ngc6503vrad.fits’,velocity=True) fitsccd ngc6503vrad.fits - | ccdhead - Z-range: 261861 -196743 MinMax: -0.00315721 0.0169835
https://github.com/jbjolly/LineStacker
30-Nov-20 V0.1 drafted w/ example PJT 14-apr-21 V0.2 expanded examples PJT