Measuring Profile Characteristics of HI spectra in IDL

Gomathi Thai, with the help of Tapasi Ghosh, has rewritten the old analyz (and uni-pops) routines for measuring the profile characteristics of HI data into IDL.

If you any questions/suggestions, please send them to Gomathi (gomathi@naic.edu).


For running these programs, copy all the three *.pro files from http://www.naic.edu/~astro/data/idl/HI into your local idl directory.


These routines assume that you have already obtained (ON-OFF)/OFF spectrum in Jys (using corposonoff with /scljy options, for eample) for your galaxy, using IDL programs such as those given by Phil Perrilat (available here), and described by Ellen Howell's document on reducing Arecibo data in IDL (found here),

(a)Example:

IDL> is=corposonoff(lun,b,scan=nnnnnnnn,/han,/scljy)

Here, b will contain the spectrum in Jy. (If you have several on-off cylecs to average, use coracuum etc.)

(b) Now we call the "measuring" program. It has four parts. First is to average the two polarizations, then apply smoothing (or not), fit and subtract a baseline, and finally calculate the velocity, velocity width, area under the curve using the five options that the MSR program in ANALYZ is currently using. The final spectrum and its velocity axis are returned.

IDL> spectr=msrgal(b)   (where, spectr[*,0] contains the spectrum and
                        spectr[*,1] has the corresponding velocity)  
give the subcorrelator number which has the galaxy  | Pol average
: 4
 Do u want to smooth the data y/ny:
Enter no. of channels for smoothing  --Please give a odd no:
: 11

-------- CALLING BLUSER FOR BASLEINE FITTING (Ref. Ellen's Cookbook)---

Compiled module: BLUSER.    
KEY  ARGS     FUNCTION      
m          .. define mask
f    n     .. fit polynomial of order n
h    h1 h2 .. change horizontal scale for plot to h1,h2
v    v1 v2 .. change vertical  scale for plot to v1,v2
c          .. print coefficients
p          .. plot data - fit

m  -------- SELECT A RANGE FOR BASELINE FITTING ------------

use cursor to specify baseline to use
% Compiled module: BLMASK.
% Compiled module: CURSORSUBSET.
buttons: left mark, right quit
  1--P1?--      1398.12
dbg:          29
  1--P2?--      1408.45
  2--P1?--      1411.47
dbg:         576
  2--P2?--      1419.04
  3--P1?--      1419.00
      29.0000      452.000
      575.000      885.000

------------ NOW FIT A POLYNOMIAL ------------------------- 
KEY  ARGS     FUNCTION
m          .. define mask
f    n     .. fit polynomial of order n
h    h1 h2 .. change horizontal scale for plot to h1,h2
v    v1 v2 .. change vertical  scale for plot to v1,v2
c          .. print coefficients
p          .. plot data - fit
q          .. quit

f 2
f 2 len           3 itemp           1 args:2
% Compiled module: WPOLYFIT.
size of a           3
% Compiled module: DETERM.
  -3.2892332    0.0047177443  -1.6897572e-06 => THESE ARE THE COEFFS. 

---------------------------------------------------------------------
-------- NOW DEFINE THE HI-LINE USING THE CURSOR -----------------


2 cursor clicks to get the range for measuring the line
x1,x2=       488.961      540.207
Area, Width, Velocity =      9.74161      213.390      2223.43
Area, Width, Velocity =      9.74161      231.954      2224.00
Area, Width, Velocity =      9.74161      210.060      2223.35
Area, Width, Velocity =      9.74161      229.057      2223.58

pick up the correct positions for the two peaks  (User clicks twice)

Area, Width, Velocity =      9.76701      242.998      2229.54

:1


For more information, contact Gomathi Thai (gomathi@naic.edu)

File last modified Saturday, 29-May-2004 15:22:52 AST