Description
This subroutine calculates the width and average velocity of a galaxy spectrum.
The two halves of the double horned profile are treated separately. For each
half, the peak is determined (it is assumed that the two peaks are on either
side of the center of the user specified limits first and LAST). Then each on
each side of the profile a polynomial (by default 1st order) is fit to a user
specified portion of the profile. If the fit is poor, (i.e. (chisqr -
deg.of.freedom) > 3 times sqrt(2*deg.of.freedom)), the user is given the option
of fitting a 2nd degree polynomial and/or changing the levels between which to
fit. Finaly using the fitted polynomial, the fr points (where fr is a user
specified fraction of the peak flux) on either side of the profile is located.
The interpolaton is done by channel number and then the velocity corresponding
to the interpolated channel number is computed. The average velocity is taken
to be the mean of these two velocities and the width is taken to be the
difference
bewteen these two velocities. The uncertainity in the velocity measurment is
then calculated from the covariance matrix of the coefficients of the fitted
polynomial. Finally the area of the profile between the limits first and last
is computed as summation (x(i)*dv(i)), where dv(i) is the velocity difference
between channels i and i-1.
Example
- d.msr().areapf(rms=0.005,levs=[0.8,0.2,0.4],usecurs=T)
Upper and lower profile points of left peak coincide!
Poor fit to profile: the normalized chisqr are nan 14.2039694
Number of points used to fit left and right halves are 23
[type=areapf, lchans=[323.402033 322.402033 322] , rchans=[351 353 351] ,
badfit=T, vwidth=150.814539, vel=1094.01721, vrms=0.184532409, badpeak=F,
limits=[322.402033 356.419569] , fluxint=99.7206675]
Arguments
lv |
|
an SDRecord |
|
|
Allowed: |
SDRecord - Not enabled |
|
|
Default: |
F |
first |
|
first channel number in range to integrate |
|
|
Allowed: |
integer |
|
|
Default: |
F |
last |
|
last channel number in range to integrate |
|
|
Allowed: |
integer |
|
|
Default: |
F |
levs |
|
define levels relative to each peak flux |
|
|
Allowed: |
vector |
|
|
Default: |
[0.8,0.2,0.4] |
rms |
|
rms of the spectrum (non-line) |
|
|
Allowed: |
float |
|
|
Default: |
0.0 |
usecurs |
|
optionally set ranges with cursor |
|
|
Allowed: |
boolean |
|
|
Default: |
F |
norder |
|
order of the fit |
|
|
Allowed: |
integer |
|
|
Default: |
1 |