ISTITUTO - INAF · ISTITUTO c/0 KTffUTQ IN fitfGA «A. RIOHI» ... configuration with up to 8...

14
A SOFTWARE INTERFACE SETWEEN AIPS AND THE TV DEVICE AYDIN 5216 L. Feretti» M. Nanni IRA 82/1935 Rapporto Va* RAPPORTO VAX 11 /780 CONSIGLIO NAZIONALE DELLE RICERCHE ISTITUTO c/0 KTffUTQ IN fitfGA «A. RIOHI» Via Irtierlo, 46 .'40126 BOLOGNA (ttaly)

Transcript of ISTITUTO - INAF · ISTITUTO c/0 KTffUTQ IN fitfGA «A. RIOHI» ... configuration with up to 8...

A SOFTWARE INTERFACE SETWEEN AIPS

AND THE TV DEVICE AYDIN 5216

L. Feretti» M. Nanni

IRA 82/1935 Rapporto Va*

R A P P O R T O VAX 11 /780

CONSIGLIO NAZIONALE DELLE RICERCHE

ISTITUTOc/0 KTffUTQ IN fitfGA «A. RIOHI»

Via Irtierlo, 46 .'40126 BOLOGNA (ttaly)

Page 1

1.INTRODUCTION

The most useful iir.plementation of thè AIPS System (Fornai o nt

and Bridlei 1983) includes thè use of a peripheral TV device?

capatale of displaying images with multiple levels of color or

intensity. Some programs use thè TV in an interactive way* far

instance to select boxes with thè cursor or to change thè color

tableì some simply display images at intermed iate stages of

reduction.

The TV device used at NRAO is thè Internationa 1 Imaging

System <:iIS)i Models 70/E and 70/F. Additiona1lyi AIPS runs on

thè GOLJLD DeAnzai thanks to routines implemented by W.Jaffe. The

basic a re hi tee tu re of IIS includes 4 image channels (memory

planes)? 4 graphic channelsi a trackball. Each channel is

512x512 pixel in size and 8 bits wide? thè graphic channelsi

each of 1 bit i can be overitviposed to thè image channels. Each

channel can hold one 512x512 image or several smaller irnagesi

which can be displayed with up to 256 or 4096 colors

simultaneously, The data stored on thè channels can be handled

directly from thè TV device? for operations like zoom? scrolli

sum and subtraction of images. The trackball with 4 buttons is

used for controlling of thè programs or for interactive

operations. There are» moreoveri several other subunits in thè

IIS» which include an i nput funct ion nieniory » a histog ratti

generatori a feedback arithmetic logic uniti shift and min/max

registers. These subunits are used for esoteric operationsi but

Page 2

they should not bs required for other kinds of TV device (far

instancsi they are not included in DeAnsa).

We nave implemented on thè TV device avallatale at thè

Istituto di Radioastronomia ali thè main operations perforasti by

AIPS on thè IIS. It is pcssible to display an image* to change

color tablesi to overlap graphic planes to thè imagei to use

cursor for graphic management i to ZOOM and to scrolli it is

instead not possible to overlap more imagesi due to thè

limitations of our device.

2.THE AYDIN 5216

The TV device available at IRA is thè Aydin 5216, 'IMAGE'

versioni a display computer whose processing ability is built

around thè INTEL 8084 l&~bit microprocessor. It has i channel

1024x1024 pixel in size and 8 bits wide* a programmatale LUT» a

joystick* a keyboard. The Aydin can support a System

configuration with up to 8 planesi each of 1 biti and each

channel can be subdivided into halves and quarters» which are

rsferred to as partitions* or minor channels.

An "Aydin Standard Software" must be loaded fram thè host

computer to start up thè pictorial device: this is thè first

operation to do after switching it on, Graphic commands may then

be supplied through coded instructions by thè host computer» or ?

alternatively* through keyboard inputs. The keyboard support

Page 3

include* a set of progranmned function keysi which can execute

most of thè avallatale functians* it also has a program buffer in

which keyboard function comiriands can be stored.

The basic commands of thè device permit it to work in 2 ways!

1) pixel mode» in which data are addressed o ne pixel at a t iivie in

a number of selected planesì images can be displayed in this way

with up to 256 colarsi

2) graphic mode* in which graphics can be drawn on 8 independent

planes of 1 bit which can be overlapped in thè display.

The basic operations handled by thè TV internai processor are

perfortned only cn display partitions? this implies that each

operat ion (su m i mu Itiplicationi i nterpolat ion i zcoirì) requi res

both an input and an output display partition. This impliest in

particulan that it is not possible to obta in a scroi 1 i ng zoom.

Colar values are ba^ed on an S-bit word? where thè least 3

bits drive thè Red raster gun (with intensity levels from O to

7) i thè next 3 bits drive Green raster guni and thè high 2 bits

drive thè Blue gun C intensity O to 3). A switch an thè TV se ree n

enables black/white display of an image. In this case a scale of

only 8 gray levels is avallatale* since thè contribution to

different intensity levels is provided by each inemory piane of 1

bit.

No histogram generator is avallatale? therefore thè histogram

equalization of an image through specialized hardware is not

possi tale.

A comparison Letween tha originai AIPS TV device and thè

Page 4

Aydin shows that thè Aydin can display a bigger image (1024x1024

instead of 512x512 pixels)* but it has only 1 image channel and

no indepandent graphic planes. Since AIPS TV rautines ivianage

images of maximum 512x512 pixels* it follows that 3/4 of thè

total Aydin avallatale memory CI Mb> is in practice useless.

Unfortunately» it is not possible to redefine this memory amount

to produce 4 overlapping channels of 512x512? instead of 1

channel 1024x1024. We do not exclude thè possibility of

modifying* in thè future i thè AIPS rautines to handle a 1024

image.

Other differences concern thè interface between thè host

computer and thè TV device and affect thè speed of image loading

and of aperations controlled by thè joystick : thè Aydin is

slower but thè difference is not dramatic. The presence of only

1 memory channel of 8 bits in thè Aydin is thè real limit in our

emulation of IISi since at least an image memory plus some

graphic planes are needed for thè most important TV operations of

AIPS. Therefore» we have reduced to 6 thè number of bits of thè

image channel and we have devoted thè 2 remaining planes cf 1 bit

to overlay graphic planes. In this way an image can be loadsd

and displayed with 64 colors. It is not possible to load many

images and to display them simuItaneously in overlapped channels?

consequently it is not possible to do operations like blink»

superposition of imagesi etc. It is instead possible to overlap

two graphic planes (labels* contaursi Windows) ta thè image.

Interactive operaticns are handled an thè IIS by means of a

Page 5

trackball with 4 buttons. On thè Ayd i n we have a completa

alphanumeric keyboard? our software interface uses only thè

numerica! keypad as buttons. Unfortunately thè inquiry from thè

host computer of thè button pushed is a compie* process of

enable/disable of thè Aydir keybaa rd ? this interrupts slow down

thè joystick based operations.

3.THE AIPS-AYDIN SOFTWARE INTERFACE

Specia 1 1ibraries of subrout i nes j subdivided by model of TV

device » are conta i ned in AIPS subd i rectories for tha management

of thè TV CCotton et al.i 1984). These subroutines are called Y

routines» because ali of them have natte beginning with thè letter

Y, Morseveri special 2 routines a re used for thè basic I/O

operatians of opem close» initialize» read/write.

The software interface between AIPS and thè Aydin 5216 TV

device consists of new Y and Z rcut i nes ? which are in thè

subdirectory CAIPS.reldate.APL.YSUB.AYD3. The compile procedures

write thè object code into thè 1ink editor 1ibrary in thè

CAIPS.reldate.APL] area.

We present in thè following a short description of thè

implemented subroutines» grouped according to thè generai

operation handled.

1 ~ ICÌtiaìi^at i.gn rguti.nes!

YINIT initial*zes thè TV device» clears thè TV memoriesi

Page 6

resets thè TV I/O parametersi

YTVOPN perfortìis a System "QPEN" on thè TV device» by calling

thè appropriate Z routine i

YTVCIN initializes thè common which describes thè

characterist ics of thè interactive display devices and thè

comman which has thè current status parameters of thè TV! in

thè present case we have putì in particulari

NGRAY=i (number of iùìage planes)

NGRAPH=2 Cnumber of graphics planes)

MAXINT=63 (max number of intensity levels)

MX200M=2 Cmax zoom power)

ZAYDPW loads thè Aydin Stantìa rd Software and sets thè screen

to a resolution of 512x512 pixel?

ZAYDQP opens thè logicai files.

2 ~~ QJLgse ro.y.tine?̂

YZERO clears d g ray or graphics memory by thè fastest possible

method »

YTVCLS closes thè TV device by ca11ing thè appropriate Z

rout i ne i

ZAYDCL closes thè TV device.

3 - Qhannel seìectign routines:

YSLECT enables and disables gray and graphics planasi

YGRAPH enables and disables graphics overlay planes by

altering thè graphics color LUT.

4 - LUT ma.n£S§!!!§£.£ rQytÌf]§5!

YLNCLR computes a piecewise linear LUT and writes it to thè

Page 7

A/din*

YQFM reads/writes thè individuai channel LUTs for Black and

White enhancsment i

YLUT reads/writes f u 1 1 e ha n nel LUTs to Aydin far pseudo-co lar

enhancement »

YGGRAM reads/writes thè Aydin graphics color assignment LUT.

Wri.te routi.ness

YCHRW writes characters into thè image or graphics piane»

YCNECT writes a line segment on thè i ma gè or graphics piane?

YGYHDR enables thè device to accept image data?

YIMGIQ reads/writes a line of image data from/to a gray scale

or a graphics piane.

YCUCQR reads thè cursor position and returns its coordinates

in unit of i ina gè pixels»

YCURSE enables/disables thè cursor»

YCRCTL reads/writes thè button values and thè cursor position

in units of screen pixels.

7 ~ Se ro !_!_ and zoom IQu t i_nes •

YSCROL perfo rms non dest ruct i ve scroi 1 of thè image and/or

graphics piane?

YZOOM performs a zoom of thè image displayed on thè screen? up

to an image 4 times as large.

The operations described above are realized by calling

appropriate routines? which either are Aydin provided routines or

have been written by us for slightly more compi icated commands.

Page 8

Ali these subroutines are conta i ned in thè di rectory CDGRNEW3 and

its subdirectoriesi and thè object rtiadules ars in thè library

CDGRNEWJAYDLIB.QLB* which is linkad with thè other AIPS

1 ibra ries.

As pointed out in thè previous sectioru thè joystick based

operations are rather slow» due thè interrupts ssnt by thè host

computer to thè Aydini when thè pushed button must be queried,

We note also that no answer is returned to thè host if no button

is pushed? i.e. thè answer BU7TON=0 is rot. ir.terpreted as "no

button pushed". The slowness of thè host-Aydin interaction

implies that thè TV de vice is una b le to perforili ali thè

operations requested by thè host i sanie connìiands are not executed

and thè synchronism between thè host and thè TV is lost > g ivi ng

rise to an uncontrolled situation of errors and wrong answers»

resulting in thè TV device crash. To selve this problemi we have

modified a few high level routines» which are quite generai and

TV independent? in order to allow an asynchronous motion of thè

cursor in ali thè cases» except when thè cursor modifies thè

LUTs. The nìodi f icat ion consists of a cali to thè new subroutine

DLINEW Cinstead of DLINTR)i which inhibits thè hast to send

command to Aydin while cursor is moving. Contrai is returned to

thè host as soon as a button is pressed. The routines affected

are AU6» AU6B» GRBOXSt GRLUTS» TVFIDL. The routine DLINEW is in

thè subdirectory with thè Y+Z routines.

Page 9

a.INSTALLAIION GF AIPS WITH THE USE OF AYDIN

The implementation of thè Aydin under AIPS is best done when

AIPS is installati. The AIPS installation consista of two steps:

thè first one C3ILOAD) loads ali thè routines from tape to diski

thè second one C3IBUILD) compile* and links thè tasks.

The Aydin routines are inserted between these two steps. To

easily perforiti ali thè needed operations^ we have written in a

tape thè three following backup save sets:

AYDBOO.BCK = installation procedures

AYDSUB.BCK s AIPS Y-*-Z routines

AYDLIB.BCK ' Aydin subroutines

After thè step 3ILQAD, thè tape with thè previous files must be

inounted with thè commands

$MOUNT/FOR MT: TAPE TAPE

and then thè first of thè save sets must he loaded and a command

file must be copied in thè directory CAIPS3i as follows

SBACK MT:AYDBOO.BCK CAIPS.INST3

*COPY CAIPS.IN3T3AYDINSTL.COM CAIPS3AYDINSTL-COM

At this pointi it is sufficient to run

S3AYDINSTL

This command performs thè following operations:

1 - Assign logicai TVDIR to thè subdirectory

CAIPS.reldate.APL.YSUB.AYD3

2 - Load thè other save sets from tape to diski if necessary

3 - Edit CAIPS3 command files to substitute IIS with AYD

Page 10

4 - Edit some high lovel routines to substitute thè cali

to DLINTR with DLINEW

5 - Edit coi'iìiìiand files to include thè Aydin library in thè link

Cfiles to be edited are listeti in CAIPS.IN3T1LIST.LNK)

6 - Edit CAIPS.reldateJ cominand files to substitute IIS with AYD

7 - Edit utility files to include Aydin library in thè link

Cfiles to be edited are listed in CAIPS.INST3LIST.UTL)

If no error messagè is giveni thè step SIBUILD can be dane and

thè standard instailation procedure can be continued.

The procedure described above has been debugged with thè

15JULS5 version of AIPS. Far subsequent versionsi thè file

AYDINSTL.COM may need to be changed if iviod i f icat ions of thè high

level routines edited by step 4 or of thè command files have

occurred, We hope that thè middle level routines that use thè

IIS are not subject to change.

5.USER MANUAL

The use of AIPS verbs and tasks with Aydin is not

substant ial ly different froivi that with other TV devices» except

that tasks which need more than one image channel are not

implementedi due to thè 1 imitations of thè Aydin. We 1ist in

table 1 thè available verbs and tasks CV»T)i in alphabetical

arder? thèir use is extensively expla i ned by thè AIPS help

files.

Page il

The re are some minor incoveniences in thè use of some of

theMi which are ind icated in thè "Note" column. We indicata with

"b/w" thè commands that use a black/white tables they n«ed thè

use of thè manual switch on thè TV monitor Csee Sec. 2). Some

commands do not give any error uiessage» but do not perform any

visitale operation: they are indicated with "no". Finallyi some

operations which invoive thè motion of thè cursor work in a

different way frem thè originai CI IS) imp1ementationi si noe an

asyncronous communication of thè cursor position has been

introduced (see Sec. 3)3 they are indicated with "a.e.". In

these routines* thè user moves thè cursor to thè desi red position

andi after» hits thè convenient button to perform thè desi red

operation Csee table 2).

It is recominended that thè TV user waits a few secands after

moving thè cursor before any other operation. In thè case of a

messi pressing "BUFFER" on thè Aydin keyboa rd Cthè second frem

left of thè second row) may correct thè situation.

The use of commands which return thè cursor position may be

problematici after zooming and/or scrol1ing an imaga. While IMXY

seems to give a correct resulti others may be not O.K.

Some tasks use thè TV to display data at intermediate stages

af reduction? thè most used are APCLN and MX. In these tasks a

message says:

"HIT BUTTGN D WITHIN 15 SECONDS TO STOP CLEANING NOW

HIT BUTTON AiB C TO CONTINUE SOQNER".

As mentioned abovei a button must always be pressed to return thè

Page 12

control to thè host computer» therefore in thè previous tasks

buttons Ai B or C must be gressed tg continue thè reduction: if

no buttare is pressed thè reduct ion daes nat continue

automat ical ly i since thè host waits for a button answer. Por thè

same reasoni there is not thè time limit of 15 seconds to stop

thè program.

TABLE 1 Verbs and Tasks

\e

ÌBLANK1CURBLINKÌCURVALUEiGRCLEARIGROFFJGRONJ IMERASE: IMPOS! IMWEDGEi IMXYÌOFFPSEUDO10FFSCROLÌOFFTRANS10FFZOOMIREBQXISETXWIN! TVALLÌTVBQXITVCLEARÌTVFIDDLE

V/T

TVVVVVVVVVVVVVVVVVVV

Note

noa. e.

nono

fa/w

a .e.

Natne

TVINITTVLABELTVLODTVLUTTVMLUTTVNAMETVOFFTVONTVPLTVPOSTVPSEUDOTVRESETTVSCROLTVSLICETVSTATTVWEDGETVWINDOWTVXYTVZOOMTVWLABEL

V/T

VVVVVVVVTVVVVVVVVVVV

Note

b/wb/w

nono

a .e.

a. e. !i

Page 13

TABLE 2 Button Convsrsion

115 It rack bali ì

A ìB ìC 1D 1

'Reset' 1

Aydinkeypad

1248

'BUFFER'

ACKNQWLEDGEMENTS

We wish to thank thè Radiosterrenwacht Dwingeiaa and thè

Kapteyn Laboratorium of Groningen Far giving us thè appartunity

of studying thè perfarmances of TV devices.

REFEKENCES

Gettoni W.D. et al: 1984? Going AIPS- Charlottesvi1 le

Fomalont» E.B.i Bridlei A.H.: 19831 The AIPS Cookbook» National

Radio Ast ronoiny Observatory » Cha rlottesvi Ile