Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/gipsy/tsk/moments.dc1
Дата изменения: Fri Jul 21 11:21:47 2000
Дата индексирования: Fri Jan 16 18:16:11 2009
Кодировка:

Поисковые слова: п п п п р п р п р п р п р п р п р п р п

Program: MOMENTS

Purpose: Program to calculate moments and other properties
of a profile

Category: MANIPULATION, CALCULATION, PROFILES

File: moments.c

Author: M. Vogelaar

Keywords:

INSET= Give set (, subsets):
Maximum number of subsets is 2048.

BOX= Frame for input subsets. [entire subset]

OPTION= Give option(s) 0..7 [List options]

0: Sum of profile amplitudes (zeroth moment).
1: Intensity weighted mean of physical coordinates
along profile (first moment).
2: Dispersion in intensity weighted physical
coordinates along profile (second moment).
3: Physical coordinate of peak value in profile.
4: Peak value in profile.
5: Dispersion in intensities.
6: Number of subset contributions.
7: Intensity weighted Mode (only with WINDOW=0).

OUTSET= Output set (,subsets). Maximum number of subsets is
equal to the maximum number of different options.

RANGE= Give range of levels to work on. [All levels]
Input consists of two values. The first value may
be greater than the second. See the description
for the correct use of this keyword.
INF and -INF are accepted as input.

WINDOW= Give window for data selection: [0, i.e. no window]
See description.

WINMODE= Stat. in most sign. peak(0), or all peaks(1): [0]/1
See description.


Description: To calculate moments in profiles you first need to
specify the set and the subsets. The number of subsets
must be greater than 1 and less than 2048 and the sub-
sets are specified by giving the name of the axis in
the direction in which you want your profiles. Suppose
your set AURORA has the axes:
RA-NCP from -7 to 8
DEC-NCP from -7 to 8
FREQ-OHEL from 1 to 59

and you want to make an integrated line emission map;
SUM[I], (in mapunits.channel)

a velocity map;
= SUM[I.V]/SUM[I] (in CUNITs of V axis)

and a velocity dispersion map;
= SQRT[ - ]

of all channel maps, you specify:

INSET=AURORA FREQ

Choose option 0, 1 and 2 from the OPTION menu and give
a name for the output set. The program will create a new
set in which the FREQ axis disappeared and a new axis
(PARAM) is made with length 3. The first subset along
the PARAM axis contains the integrated subsets (in units
of the original data) and the second one contains the
velocity field (m/s) and the third the dispersion in m/s.
The velocity is an intensity weighted mean of the
converted velocities along your operation axis (the FREQ
axis in the example).
In general, the program will work for profiles in any
direction and instead of velocity you could think of any
kind of physical coordinate. The program inserts
automatically the correct units in the header of the
output set.

Use can be made of a cutoff in the data values. This
is achieved by specifying a range in amplitudes with
the keyword RANGE=

Examples of the use of the RANGE= keyword:

RANGE=0, 20
(If 0 is set to blank)

RANGE=3, -3
(Values greater than 3 and values less than -3 are
taken into account, others are set to blank)

At the RANGE= keyword, the values -INF and INF can
be input also. These values represent the minimum
and maximum values of the current system.

So, all values outside the range are set to blank and
calculations are done on all non blank values in a profile,
except when a window was selected i.e. at the WINDOW=
prompt a value greater than 0 was given.
If there are a certain number of adjacent subsets with
amplitudes within the given range, and this number of
subsets is greater than or equal to WINDOW, these sub-
sets are taken into account. If this number of subsets
is less than WINDOW, they are not taken into account.
If there are more peaks with width equal to or greater
than WINDOW, you have to select an operation mode. The de-
fault (WINMODE=0) selects the peak with the greatest flux
and its data contributes to the statistics. If however
WINMODE=1 all valid peaks contribute to the statistics.
In this mode, it is, for example, possible to exclude one
pixel wide noise peaks from the profile with:

MOMENTS WINDOW=2 WINMODE=1

The program updates minimum, maximum, number of blanks
and the units of the output at subset level and writes
a comment, (source of header information and date) at
set level.

Option 7 is implemented as an alternative method of
determining the (weighted) physical coordinate at
the maximum in the profile. It uses the calculation
of the 'mode'. For non-symmetrical profiles, the
method should result in better approximations than
the intensity weighted mean.

The intensity weighted mode is calculated using the relation:

skewness = (mean-MODE)/(dispersion)

where mean, dispersion and skewness are the first,
second and third weighted moments. The skewness is not part
of the output of moments, but it can be retrieved using the
above formula.




Example: moments
MOMENTS Version 1.0 (Oct 9 1992)
MOMENTS INSET=M8320 f
Set M8320 has 3 axes
RA-NCP from -50 to 40
DEC-NCP from -50 to 20
FREQ-OHEL from 1 to 59
MOMENTS BOX=-10 -10 10 10
BOX range for set M8320 :
RA-NCP from -10 to 10
DEC-NCP from -10 to 10
MOMENTS OPTION=1 3 4:6
MOMENTS OUTSET=M8320moments
Set M8320moments has 3 axes
RA-NCP from -50 to 40
DEC-NCP from -50 to 20
PARAM-MOMENTS from 0 to 4
MOMENTS RANGE=
MOMENTS WINDOW=
============================= MOMENTS ===========================
Profiles examined from set [M8320]
Results in output set [M8320moments]
-subset 0: Intensity weighted mean of physical coords.
-subset 1: Physical coordinate of peak value in profile.
-subset 2: Peak value in profile.
-subset 3: Dispersion in intensities.
-subset 4: Number of subset contributions.
Units of operation axis: KM/S
Units of data: W.U.
MOMENTS +++ FINISHED +++


Updates: Apr 22, 1991: VOG, Document created.
Oct 8, 1992: VOG, Store physical coordinate of peak
also (option 3).
Jan 20, 1993: VOG, Profile statistics in function, keyword
WINMODE= added.
Jul 1, 1994: VOG, 'Mode' option implemented.
Oct 25, 1995: VOG, Changed sigma in 3rd moment (skewness)
Feb 1, 2000: JPT, Increased number of subsets.
May 26, 2000: VOG, Added option flag for st_weights to be able
to get a stand alone dispersion set.