Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/gipsy/tsk/editset.dc1
Дата изменения: Tue Jun 4 16:51:44 1996
Дата индексирования: Fri Jan 16 18:15:46 2009
Кодировка:

Поисковые слова: tail

Program: EDITSET

Purpose: Program to edit data in a set.

Category: MANIPULATION

File: editset.c

Author: M. Vogelaar

Keywords:

INSET= Give set (, subsets) to edit:

Maximum number of subsets is 2048.
You will be asked in a loop to enter a box for which
you want to edit your data. The loop is aborted with
carriage return at the ANOTHER= keyword.


BOX= Frame for input subsets. [entire subset]

Select a box in which all data must be changed.
If you want to change only one pixel, then enter this
position as a box with sizes 1 in both directions. If
you want to perform the same actions on all data in
BOX= then enter a valid expression at EXPRESSION=.
If you want to edit the pixels manually or want to use
the Hermes database and file functions ('descr', 'table',
'image' & 'file') then switch to 'manual mode' at the
EXPRESSION= keyword.


EXPRESSION= Give expression: [Manual mode]

Enter an expression to change data in the given
box. The parameters are the axis names like RA and DEC
and the parameter 'DATA', which stands for the old.
The syntax of the expressions is described below.
An example is: EXPRESSION=DATA*ABS(RA) which will
multiply all values in BOX= with the absolute value
of the grid in RA.
If carriage return is pressed at EXPRESSION=, then Manual
Mode is selected and the keyword NEWVAL= is prompted for
all pixels in BOX=.


NEWVAL= New value at: (x1,..,xn) [old value]

No expression was entered at EXPRESSION= and you are
prompted with NEWVAL= and the position & value of the
current pixel starting at the lower left position in BOX=.
It is possible to change the value of just one pixel or
to change the values of a series of pixels at once
(with a maximum of 250). This keyword recognizes the
Hermes database and file functions.
Example: NEWVAL=image(AURORA FREQ 0,-5 0 5 0)
which will replace all values in BOX= by values found
in subset AURORA FREQ 0 in the box -5 0 5 0.


ANOTHER= Do you want another box? Y/[N]

You can repeat the actions described above, for
different boxes. Therefore a loop over the BOX= keyword
is made. This loop is aborted by ANOTHER=N




Description: The program EDITSET is an image editor. It can replace
pixel values by user given values, or by new values
generated by a mathematical expression.
Example: for a RA-DEC-FREQ set, this expression can contain
the parameters: RA, DEC, FREQ and DATA.
RA is the RA grid position of the current pixel, DEC
the DEC position etc. and DATA is the value of the
current pixel.
The first pixel to be changed is the first pixel in BOX=
along the first axis in the subset (RA). The order
of evaluation is: increase grid position along RA
for all RA axes along DEC.
If x and y are arbitrary parameters, the expression
may contain:

1) functions; syntax ff(..); where ff is one of the
following available functions:
abs(x) absolute value of x
sqrt(x) square root of x
sin(x) sine of x
asin(x) inverse sine of x
cos(x) cosine of x
acos(x) inverse cosine of x
tan(x) tangent of x
atan(x) inverse tan of x
atan2(x,y) inverse tan (mod 2pi) x = sin, y = cos
exp(x) exponential of x
ln(x) natural log of x
log(x) log (base 10) of x
sinh(x) hyperbolic sine of x
cosh(x) hyperbolic cosine of x
tanh(x) hyperbolic tangent of x
rad(x) convert x to radians
deg(x) convert x to degrees
erf(x) error function of x
erfc(x) 1-error function
max(x,y) maximum of x and y
min(x,y) minimum of x and y
sinc(x) sin(x)/x (sinc function)
sign(x) sign of x (-1,0,1)
mod(x,y) gives remainder of x/y
int(x) truncates to integer
nint(x) nearest integer
ranu(x,y) generates uniform noise between x and y
rang(x,y) generates gaussian noise with mean x
and dispersion y
ranp(x) generates poisson noise with mean x
ifeq(x,y,a,b) returns a if x == y, else b
ifne(x,y,a,b) returns a if x != y, else b
ifgt(x,y,a,b) returns a if x > y, else b
ifge(x,y,a,b) returns a if x >= y, else b
iflt(x,y,a,b) returns a if x < y, else b
ifle(x,y,a,b) returns a if x <= y, else b
ifblank(x,a,b) returns a if x == BLANK, else b
2) constants; syntax cc; where cc is one of the following
available constants:
PI 3.14159....
C speed of light (SI)
H Planck (SI)
K Boltzmann (SI)
G gravitation (SI)
S Stefan-Boltzman (SI)
M mass of sun (SI)
P parsec (SI)
BLANK Universal undefined value
Note: the Hubble constant is not included.
3) operators; syntax op; where op is one of the following
available operators:
+ addition
- subtraction
* multiplication
/ division
** power



Example: Multiply pixels in selected box by the absolute
value of its RA grid position:

EXPRESSION=DATA*ABS(RA)

Updates: Mar 12, 1991: VOG, Document created.
Feb 24, 1993, VOG, Changed default for BOX=