Using this window you can get simple constantly updated statistics on regions of the current spectrum, or fuller statistics for the whole spectrum, or collections of regions.

Constantly updated statistics for regions are:

- Mean
- Standard deviation
- Minimum
- Maximum
- Integrated flux
- TSYS

The integrated flux is a numerical estimate and does not require even coordinate spacing. It
can be removed from this list by deselecting the **Options->Show flux integral** item. This
can be used to quickly estimate the flux in a line, providing your spectra are background
subtracted.

The TSYS value is a system temperature estimate and requires data from the JCMT, or you
can set the necessary parameters by enabling the **Options->Set TSYS parameters** item,
which reveals a set of controls not seen by default. Note that the effective exposure time
is:

$${t}_{eff}={t}_{on}\ast {t}_{off}/\left({t}_{on}+{t}_{off}\right)$$

where ${t}_{on}$ and ${t}_{off}$ are the integration times spent on and off the source. The backend degradation factor is instrument specific.

When you use the buttons along the bottom of the window these statistics are extended to also include:

- Median
- Mode
- Sum
- Number of data points

Note that the Mode is determined as $3\ast Median-2\ast Mean$, not from a distribution, so will not be correct for highly skewed distributions.

If you select the **Options->Show extra stats** menu item you can also see:

- Sum of squares
- RMS (square root of the mean square)
- Variance
- Standard error
- $25\%$ and $75\%$ quantiles
- Skew
- Kurtosis

and if you select **Error stats->y**ou can get basic statistics on the values that are being used as the
spectrum errors (or variances).

To get statistics for the whole of the current spectrum just press the **Whole stats** button. If you want
statistics for parts of the spectrum you will need to define the coordinate ranges you want to use (see
the next part), and then press the **Selected stats** button to get statistics for the selected regions
combined together (if none are selected then all regions are used), or **All stats** to get statistics for all
the regions combined together.

**Coordinate ranges**

This part of the window is used to define the regions of the spectra that you want to
see statistics for. Once defined you will see simple, continuously updated, statistics.
You can also get fuller statistics using the **Selected stats** and **All stats** buttons.

To add a region press the **Add** button and then drag out a region in the display area
of the plot window. This should result in the creation of a green rectangular figure.

You can interact with the figure, moving it side-to-side and resizing it. To do this
point at the figure and press the left mouse button. This ‘selects’ the figure and adds
`grips`

to its exterior. Note that it also becomes the selected row in the **Coordinate
ranges:** table. To move the figure just drag it and to resize it drag a grip (the little
black squares). The associated coordinate range in the table updates with these
changes.

To add a second range just press **Add** and repeat. The ranges can be overlapped or
not.

To fine tune the ranges you can edit the values in the ranges table, just point at
the coordinate you want to change and double click the left mouse button. This
should enable the text editing cursor. Just make the modifications you want and
press `<Return>`

to make the changes permanent. (Note: if your spectra have sky
coordinates shown for the X axis, then you should use the same format for your
edits).

To read a set of ranges from a disk file choose the **File->Read ranges** menu item.
The format of the input file is simple. It should have at least two fields separated
by whitespace or commas. Comments are indicated by lines starting with a hash (#)
and are ignored. You can also save the ranges and simple statistics to disk file using
(**File->Save ranges**). It is also possible to append the contents of the **Full stats log:**
region to the file `SPLATStats.log`

by pressing the **Save to log file** button.

**Accelerator keys**

**Control-s**Show full stats for all the selected ranges.**Control-l**Show full stats for all the ranges.**Control-h**Show full stats for the whole spectrum,**Control-d**Add a coordinate range (interactive or non-interactive).**Control-e**Delete the selected coordinate ranges.**Control-w**Close the window.**F1**Display help on SPLAT-VO.**Shift-F1**Display help on window.