Table of Contents


pvcorr - PV map or XYV cube cross correlation search for spectral lines


pvcorr [parameter=value]


Using a template area/volume in a PV map or XYV cube, this template is shifted in the velocity (V) direction and a cross correlation is computed as function of V. Normally a strong known line will be selected as template, with a known rest frequency, from which the other lines can then be identified. See also tabpeak(1NEMO) to find the peaks in the output from this program. Some renormalizations are then needed, which in the presence of doppler shifts comes with some elaborate math. An example of this is given below for the low redshift galaxy N253 in the case of some ALMA observations.


The following parameters are recognized in any order if the keyword is also given:
Input image file - must be an PV map, with V along the Y-axis, or a XYV cube, with V along the Z-axis. No default.
Clip value, above which to search for valid profiles in the template area defined between rows/planes v0 and v1 (inclusive).
First row to search for the template, based on the clip= level. If none given, the program will find the largest peak in the map/cube and decide on a reasonable template. Rows are 1-based. [-1]
Last row to search for template. [-1]
Scale the velocity pixel size by this number to get more presentable numbers in the output. Astronomical data sometimes appear in Hz or m/s. For 2D maps this should be the Y coordinate, for 3D cubes the Z coordinate. [Default: 1]
Experimental way to normalize the data to attempt to get more predictable values for the correlation coefficients. Default not used.
Cross correlation mode. 1=true cross correllation (default) where the template map values are multiplied by the map values, i.e. intensity weighted. 0=template map equally weighted, this gives emphasize to the noisy lines to be searched for. 2=use the intensity weighted mean velocity within the template to re-sample the map and sum their emission along this curved line. Default: 1
MIRIAD style region definition of the template area. ** Not implemented yet ** but expect something like region=polygon(10,10,40,15,40,25,10,20), all in pixel coordinates.
Optional output filename. If used, for PV maps, the output is 4 columns of X coordinate, V0,V1 and Vmean, all in 0-based pixel coordinates. For XYV maps (not implemented yet) there will be 3 planes: V0, V1 and Vmean resp. Default: not used.


First an uncalibrated (in velocity) is produced, this needs to be inspected where the strongest template line is located. The velocity axis can then be recomputed such that the template line as the correct value, and all the others fall in place:
pvcorr in=pv1 clip=0.01 v0=0 v1=30 vscale=1e-9 out=pv1.trace >
tabplot pv1.trace 1 2,3,4 color=2,3,4 line=1,1
# y0min=6 y1max=20
# inspect where the tabpeak cutoff should be, 0.01 seems ok to get all and
a bit more
tabpeak clip=0.01 > pv1.peak
# the reference line was fitted at -0.000066 (strongest line in pv1.peak)
but has freq 100.07640 GHz
tabmath pv1.peak - %1+0.000066+100.07640,%2 all format=%f
100.076400 1.668270 [h3cn]
100.199489 0.018321 
100.457913 0.015710 
100.536535 0.075491 ? nh2cn
100.626081 0.173972 ch3oh
100.708805 0.021336 
101.009627 0.019676 
101.028764 0.026361 
101.140399 0.044207 ch3sh
101.169243 0.053001 ?
101.343654 0.018929 
101.476141 0.139334 h2cs_1
101.526876 0.018724 
101.779270 0.017957 
tabmath - %1+0.000066+100.07640,%2 all format=%f | tabplot - ymin=-0.1
ymax=0.2 point=2,0.1 line=1,1 color=2 ycoord=0,0.01


The current template is defined via the parameters (clip,y0,y1) and is far from ideal, hence the out= to inspect which area/volume was computed. Ideally a properly smoothed version of a PV diagram will contain a better definition of the template. Another option is to find the peak in the map, assuming this is related to a strong well known line, then walk down the spectrum until clip is reached. This would alleviate one from having to supply a (y0,y1) pair.

Instead of the derived template shape, one could also define the offset by using a first moment. Or a gaussian fit. This would require resampling the spectrum for the cross correlation and is more expensive, but possibly more accurate.

Can also use the template to define a v_mean, and resample this curvy line through PV and add up all the emission, creating a spectrum. Not quite cross correllation, but since the code is all local... This is mode=2.

Finally, not all lines have a similar distribution in PV, this will diffuse or can even destroy the cross correlation.

Output cross correlations still have dubious units

See Also

tabpeak(1NEMO) , pvtrace(1NEMO) , image(5NEMO)




Peter Teuben

Update History

29-May-2013    V0.1 Created    PJT
30-may-2013    V0.4 Exended to 3D cubes    PJT
31-may-2013    V0.5 mode=0,2 implemented    PJT

Table of Contents