Guide
The terminal
The terminal at the bottom of the window is where AstroVista Lite keeps its record and where you can type. Every button that changes data types a command there and runs it, so you can learn the commands by watching, repeat them, and save a whole session as a file that runs again.
A command line
verb [buffer] [words] [KEY=value ...] # a comment
- The verb comes first:
rd,stats,elliprof… It is not case-sensitive:STATS 1works. - Words follow, separated by spaces: buffer numbers, file names, numbers and
flags such as
RMSTAR,ERASEorMEAN(flags are not case-sensitive). - Keywords are written
KEY=valuewith no spaces around the=, in any order, anywhere after the verb. Their names are not case-sensitive (x0=567isX0=567). - Quotes keep spaces inside one word:
rd 1 "my galaxy.fits",WHERE='MAG_AUTO < 22 and FWHM_IMAGE < 3',ch 1 OBJECT='UGC 12517'. - # starts a comment, to the end of the line (unless it is inside quotes).
- One command per line. A semicolon does not separate commands.
- tag="name" at the end of any line that makes a buffer names that buffer:
[2] = [1] - median([1]) tag="no sky".
Buffers, coordinates and units
- Buffers are numbered: a command takes the number (
stats 1), a formula writes[1]orB1. - ELLIPROF's coordinates are used for X0, Y0, the mask shapes and
gauss: x and y run continuously, the first pixel spanning 0 to 1, so its centre is at 0.5. - Columns and rows counted from 0 are used by
print,max,minandabx: column c is the pixel between x = c and c + 1. - The status bar shows both, and the FITS pixel counted from 1, and the sky position when the image has a WCS. Source catalogues use SExtractor's convention (X_IMAGE of the first pixel's centre is 1).
- Angles are in degrees, counter-clockwise; sizes and radii in pixels.
Formulas
A line of the form [M] = expression (or BM = expression) is
image arithmetic, worked out pixel by pixel into buffer M:
[3] = [1] - [2]
[4] = ([1] - 3246) * 2.5
[5] = median([1], [2], [3]) tag=stack
Help ▸ Documentation ▸ Image arithmetic explains every operator and function;
help calc lists them.
Variables
set xc=567 yc=562
elliprof 1 X0=xc Y0=yc R0=9 R1=347 NR=23
typ
set keeps numbers by name (names are not case-sensitive). A variable, or
an expression of variables such as R1=2*re, can stand for any keyword's value,
for a number in a command (ac 1 sky) and in a formula. mn,
max and min set variables too (mean, median, sigma; max, maxc,
maxr; min, minc, minr).
Programs on your computer
A line that is not an AstroVista Lite command runs as in a shell, when its first word
is a program on the PATH: ls -l, grep, head
file.txt, python script.py. A line starting with ! always
goes to the shell, even when its first word is also a command name:
! sort catalogue.csv | head. The programs run in the terminal's folder
(cd, pwd), take no keyboard input, and are stopped by Ctrl+C or
after 10 minutes; up to 2000 lines of their output are shown. ll stands for
ls -lrt and la for ls -A.
A listing from ls is in colour: folders blue, FITS files green, pictures
purple, text files yellow, programs red. A click on a folder goes into it and lists it; a
click on a FITS file opens it.
The keyboard
| Enter | run the line |
| ↑ ↓ | the lines typed before (the history) |
| Tab | complete what is being typed: commands, programs (after two letters),
mask actions and layer names, keywords such as X0= or
DETECT_THRESH=, buffer numbers after TOMODEL= and the like,
mask names after MASK=, and file and folder names; when several fit, a list
opens |
| Ctrl+C | stop the program running; when nothing runs, drop the commands waiting and clear the line (with text selected, ⌘C or Ctrl+C copies it) |
| Ctrl+` | go to the terminal |
| Ctrl+Alt+= / Ctrl+Alt+− | larger or smaller text (View ▸ Terminal font size) |
A click anywhere in the terminal puts the cursor on the command line. The Terminal button in the status bar folds the terminal away; the command line then stays in the bar at the bottom.
How commands run
- Commands run one after another, in the order typed or clicked. Reading files, fits and the source finder show a busy cursor while they work.
- When a command fails, its error is shown in red and the commands waiting after it are dropped, since they may depend on it.
run fileruns a file of commands and stops at the first error, naming the file and the line. File names in the file are relative to the file's own folder, so a file can be shared with its data.- File ▸ Save the commands writes every command of the session (the lines starting with
›) to a file that
run, File ▸ Run a command file orastrovista --run fileruns again.
A session, written as commands
rd 1 u12517j.fits
mask load u12517j u12517j.dmask 1
sources 1
mask new sources 1
mask sources sources SCALE=1.5
set xc=567 yc=562
elliprof 1 X0=xc Y0=yc R0=9 R1=347 NR=23 SKY=3246 RMSTAR MASK=u12517j,sources TOMODEL=3 TORESID=4
[5] = div([1] - [3], [3], 0) tag="residual / model"
stats 5 MASK=u12517j,sources
wd 4 residual.fits
Where the commands come from
The names and the style of many commands (rd, wd,
tv, ac, abx, shift,
smooth, clip, mask, elliprof…) are those
of MONSTA, John Tonry's image analysis and plotting system, which joined
Vista (originally by Richard Stover and Tod Lauer, with image display by John Tonry)
and Mongo (by John Tonry). Astronomers who know them will feel at home. The
commands of AstroVista Lite are new code with options of their own, listed in the
Command reference, so MONSTA scripts do not run unchanged. ELLIPROF itself, the
isophote fitting, is John Tonry's, used through the elliprof package.
Every command, with its keywords and an example: the Command reference.