.ec _
.ll 76
.ad b
.in 4
.\"====================================================================
.ti -4
1 Language
.ti +10
EXPERIMENTAL_\ Language Summary

These commands are experimental and their name, calling sequence, and
behavior are subject to changes without advise.

.nf
DIFF             List the differences between 2 observation headers
FILTER           Apply a filter on the R spectrum
MEDIAN           Compute the median and MAD of the R spectrum
RMS              Compute the RMS of the index
SUBTRACT         Compute T-R
UNBLANK          Remove blanks in a Class TABLE
VARIABLE         Create sic variables mapping the observation(s)
UV__ZERO          Create a zero spacing UV table
WAVELET          Decompose the R spectrum into wavelets
.fi
.\"====================================================================
.ti -4
1 DIFF
.ti +4
EXPERIMENTAL_\DIFF [Num1 Num2]

List the differences between 2 observation headers (the data is not
diff'ed). Without argument, the command compares the R and T
buffers. If 2 observation numbers are given, the corresponding entries
(latest version) from the current input file are compared.

As of today, the command compares the following sections:
.ti +2
- General (observation number and version ignored),
.ti +2
- Position,
.ti +2
- Spectroscopy,
.ti +2
- Calibration,
.ti +2
- Switching.
.br
The values are compared to all their precision. No tolerance is used.
.\"====================================================================
.ti -4
1 FILTER
.ti +4
EXPERIMENTAL_\FILTER [/STORE]

Compute the Mean Absolute Deviation of the R spectrum, and store the
result in R%HEAD%BAS%SIGFI if the option /STORE is present.
.\"====================================================================
.ti -4
1 MEDIAN
.ti +4
EXPERIMENTAL_\MEDIAN [Width] [Sampling]

Compute the Median and the Median Absolute Deviation along the R
spectrum and save them in the 2 associated arrays named BASELINE and
RMS (available in R%ASSOC%BASELINE% and R%ASSOC%RMS% respectively).

These quantities are computed in windows of the given Width (MHz,
default 20). Windows are set every Sampling space (MHz, default
width/2). Intermediate values are then interpolated, so that the final
Associated Arrays are of size Nchan. Using a sampling of 1 channel is
possible but at larger computation cost.

For the first and last half windows (boundary conditions), flat values
are used (no extrapolation).

If the input channel in RY is blanked, the resulting channels in
BASELINE and RMS are also blanked. Blank channels do not contribute to
the surrounding windows.
.\"====================================================================
.ti -4
1 RMS
.ti +4
EXPERIMENTAL_\RMS [/RESAMPLE [NX Xref Xval Xinc Unit]] [/NOCHECK
[SOURCE|POSITION|LINE|SPECTROSCOPY|CALIBRATION]] [/WEIGHT
TIME|SIGMA|EQUAL|ASSOCIATED]

Produce the RMS spectrum of the index.
.\"====================================================================
.ti -4
1 SUBTRACT
.ti +4
EXPERIMENTAL_\SUBTRACT

Compute the difference T-R. Consistency of the input spectroscopic
axes is checked. Output header is NOT IMPLEMENTED: T header is reused.
.\"====================================================================
.ti -4
1 UNBLANK
.ti +4
EXPERIMENTAL_\UNBLANK in.tab out.tab [/MODE REJECT]
.ti +4
EXPERIMENTAL_\UNBLANK in.tab [out.tab] /MODE NOISE|INTERPOLATE|VALUE [Value]

Patch the blank values from a Class table (i.e. produced by the
command ANA_\TABLE). This is useful for later use in XY__MAP which
does not ignore blanks for efficiency purpose.

4 modes are offered:
.in +4
.ti -4
- REJECT (default):
.br
Create a new table from the input one, rejecting spectra which have
one or more blank channels. As the table size will differ in the end,
this action can not be performed in place.
.ti -4
- VALUE [Value]:
.br
Create a new table, or update in place if no output table name is
provided, patching the blank channels with a custom value (default 0).
.ti -4
- NOISE:
.br
Create a new table, or update in place if no output table name is
provided, patching the blank channels with random noise. The noise
level is computed from the weight column found in the table itself
(one weight per spectrum).
.ti -4
- INTERPOLATE:
.br
Create a new table, or update in place if no output table name is
provided, patching the blank channels with interpolated values between
the previous and next valid channels. At the spectrum boundaries, the
values are extrapolated from the two nearest valid channels.
.in -4

The command supports Velocity-Position (.tab) or Position-Velocity
(.bat) tables, except for the REJECT mode. Note that the table(s) must
fit in memory.
.\"====================================================================
.ti -4
1 UV__ZERO
.ti +4
EXPERIMENTAL_\UV__ZERO Name [/LIKE GDFFile] [/VERBOSE]

Create a Zero Spacing UV Table from the R spectrum, using channels in
the current SET MODE X range.

The channel weights are set according to the current SET WEIGHT
tuning. If weight is EQUAL, the value 1 is used.

/LIKE option can be used to produce a UV table using the same
frequency/velocity axis as another reference GDF file (can be a cube
or a UV table).
.\"====================================================================
.ti -4
1 VARIABLE
.ti +4
EXPERIMENTAL_\VARIABLE Section1 [Section2 ...] [/MODE READ|WRITE|OFF]
[/INDEX]

VARIABLE /INDEX will read (from file) and save (in memory) in Sic
arrays the named sections of all entries in the current index. The Sic
arrays will be available in the structure IDX%HEAD%, under each named
section. Any further call to FIND and DROP (i.e. commands which modify
the current index) will destroy the Sic arrays. For efficiency
purpose, they are not recreated implicitly, the command VARIABLE
/INDEX must be called again instead.

VARIABLE USER /INDEX will load the user section for all entries, if
the associated hooks to the command are declared in Class. The Sic
arrays will be available in the structure IDX%USER%<owner>%<title>%

The option /MODE indicates to create read-only (READ) or read-write
(WRITE) variables. The keyword OFF will delete the variables of the
named sections and free their associated memory. WRITE is not allowed
on /INDEX arrays.
.\"====================================================================
.ti -4
1 WAVELET
.ti +4
EXPERIMENTAL_\WAVELET [/BASE [N]] [/PLOT [Ipen]]

Compute the wavelets of the R spectrum, and store all the orders in
the Sic array named WAVELET.

If the option /BASE N is present, the N-th order is subtracted from
the R spectrum (default N is 5). This baseline can be plotted with the
option /PLOT (default pen is 1).
.\"====================================================================
.ti -4
1 ENDOFHELP
