The following is a list of events supported by aipsview. They have all been tested and all work. For more information on glish, consult the Glish Tutorial or for even more information on glish check the Glish Reference Manual.
% glish
Glish version 2.5.2
- a := client("aipsview")
- whenever a->imageID do id := $value
- id := -1
- a->displayFile("data/H13CN.fits")
% glish
Glish version 2.5.2
- a := client("aipsview)
- whenever a->imageID do id := $value
- id := -1
- a->displayFile("data/HCN.fits")
- a->replaceFile(id, "data/H13CN.fits")
% glish
Glish version 2.5.2
- a := client("aipsview")
- whenever a->imageID do id := $value
- arr := array(1:254, 256, 256)
- a->displayArray(arr)
% glish
Glish version 2.5.2
- a := client("aipsview");
- arr := array(1:129, 128, 64, 5);
- pcmatrix := array(0, 3, 3);
- pcmatrix[1,1] := 1;
- pcmatrix[2,2] := 1;
- pcmatrix[3,3] := 1;
- image := [=];
- image.data := arr;
- header := [=];
- header.imageShape := arr::shape;
- header.axisNames := ['SIN Right Ascension', 'SIN Declination', 'STOKES'];
- header.referenceValues := [20.567, 34.5607, 1];
- header.referencePixels := [34, 34, 1];
- header.deltas := [0.002, 0.002, 1.0];
- header.pcmatrix := pcmatrix;
- header.projectionParameters := [0,0,0,0,0,0,0,0,0,0];
- header.longpole := 180.0;
- header.name := 'test3D';
- header.dataUnits := 'JY/BEAM';
- image.header := header;
- av->displayImage(image);
% glish
Glish version 2.5.2
- a := client("aipsview")
- whenever a->imageID do id := $value
- arr := array(1:254, 256, 256)
- a->displayArray(arr)
- a->releaseImage(id)
{
imageID (int) id of queried image
vertices (array of pairs of floats) vertices defining the region
}
For now, only two vertices are given representing the corners of an orthogonal 2-rectangle in 3-space.
{
imageID (int) id of queried image
pixelLocation (int array) location of last pick on this image
worldLocation (float array) linear approximation to world pos of last pick
value (float) data value at last pick
}
Both queryImageRegion and queryImageLocation commands will queue a request if no previous selection exists.
{
count (int) number of images loaded
ids (int array) list of ID's
names (string array) list of names
}
The example below creates an 2D image with 4D coordinates. First an image template is created, and the scrolling buffer is initialized to match the image template and keep 20 images around. Then every two seconds a new image is sent to the scrolling buffer dataset. The first twenty images sent to the display without scrolling the buffer. After twenty images have been sent, the data scrolls as a new image is pushed on top and an old one falls out the bottom.
% glish
Glish version 2.5.2
- a := client("aipsview");
- image := [=];
- image.data := array(1:65,64,64,1,1);
- ndim := 4;
- pcmatrix := array(0, ndim, ndim);
- for (n in 1:ndim) pcmatrix[n,n] := 1;
- image.header := [=];
- image.header.imageShape := image.data::shape;
- image.header.axisNames := ['NCP Right Ascension', 'NCP Declination',
'time', 'STOKES'];
- image.header.referenceValues := [20.567, 34.5607, 1000, 1];
- image.header.referencePixels := [34, 34, 1, 1];
- image.header.deltas := [0.0027, 0.0027, 10, 1];
- image.header.pcmatrix := pcmatrix;
- # NCP parm1 is latitude of observing interferometer
- image.header.projectionParameters := [-30.0,0,0,0,0,0,0,0,0,0];
- image.header.longpole := 180.0;
- image.header.name := 'ScrollingBufferTest';
- image.header.dataUnits := 'JY/BEAM';
- image.header.globalDataMin := 0;
- image.header.globalDataMax := 300;
- # initialize with this dataset
- av->scrollBufBegin(image, 20);
- await av->imageID;
- id := $value;
- print '----- SCROLLING BUFFER INITIALIZED (id is :', id, ')------\n';
- shell("sleep 5");
- for (n in 1:100)
- {
- image.header.dataMin := n*2+1;
- image.header.dataMax := n*2+65;
- image.header.referenceValues[3] +:= 10;
- image.data +:= 2;
- av->scrollBufAddImage(id, image);
- shell("sleep 2");
- }