April 29, 1998

 

N:\TV6\TV6_INTRO.DOC

TV6: A Short Introduction

By

Eric Eikenberry, Sol Gruner, and Mark Tate

Table of Contents

General Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Imaging Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Rfile Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Tape Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

PC Labcard Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Serial Communication Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

TIGA Card Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

General Information

Keyword: ADDING MODULES

ADDING MODULES: Adding Modules to TV6

Modules can easily be added to TV6 using the following protocol.

1. Don't debug routines in the working directory on a beamline computer- create a temporary directory and copy all the source code there.

2. Command words are added by inserting a new CASE statement in TV6.C within the main switch/case loop- NOTE: the make file will extract all

CASE statements from this loop to generate the proper typedef enum statements.

Routines exist to access images, rfiles and to interpret command lines,

passing variables and image names to your routines. Please initialize

all pointers to NULL- thhis will make debugging easier.

3. Add the name of the c code module you are adding in tv6.mak (there

are 2 places) Run b.bat to run the make file.

4. Add function prototypes to tv6sys.pro

5. Command line access to certain variables can be added in externs.c

6. Update help.tv6

7. Coordinate with Mark the distribution of debugged code to all of the

computers.

Keyword: CALIBRANTS

CALIBRANTS: The following calibrants are available:

Ag Stearate -- d-spacing of 48.68 Ang.

Mica (from NIST) -- d-spacing of 9.98104 Ang.

P-bromobenzoic acid --

d-spacing of line Relative Intensity

14.52 100

7.26 6

5.64 1

5.17 25

4.68 100

3.93 2

3.80 25

3.70 60

3.63 10

3.32 10

3.27 60

3.12 40

3.06 10

For more information, see X-ray calibration materials box and

PH#5, pg. 16-18

Keyword: Commands

Commands: Words which are recognized by TV6 at the beginning of a command line or

following a semicolon, come in several flavors:

-- Commands (eg., DISP). These are commands routed to via TV6.

-- Keywords (eg., DEFINE) are commands internal to ICF, the command line

interpreter.

-- Glossary macros are words which are macros for strings defined via the

DEFINE keyword. See DEFINE.

-- User parameters (eg., DEBUG) are names of variables which are permanently

defined. These differ from temporary variables in that they do not

disappear when the command line is run out.

The Commands, Keywords and User parameters available to the system may be

listed via the MENU keyword. Glossary macros may be listed via the SHOW

keyword. Command words which route to a subdirectory, by convention, have a

"d_" prefix, eg., d_TIGA.

System Commands

Keyword: AUTO

AUTO: Keyword to place commands in the autoexecute queue. E.g.,

auto for (i=0;i<10;i++) {move im[i]=ime} records 10 exposures.

This allows the user to perform other operations while taking

exposures. It also ensures that no command in the queue is

executed until the previous one is run.

Keyword: Clear_ICF

Clear_ICF: Keyword to clear ALL ICF 'define' definitions.

Be sure you want this.

Keyword: CLKRD

Clkrd: Reads the clock. This clock is set by clkset, wait, etc.

Keyword: CLKSET

Clkset t: Sets the clock for t seconds. Note: this is the same clock

that is used to time wait commands, etc.

Keyword: Command

See Commands

Keyword: Cursors

Cursors: -- TV6 provides 2 cursors on the image display to aid image analysis

left mouse button -- controls big cursor

middle button -- controls cursor state

right button -- controls small cursor

If cursors are enabled (such as within DENS or BOX), the middle button toggles

through 3 states-- NORMAL, PIXEL_STEP, ASLEEP

NORMAL -- big(/small) cursor follows mouse movement when

left(/right) is depressed.

PIXEL_STEP -- a third arrow pointer is placed on the screen

and a single click of the left(/right) button

moves the big(/small)cursor a single pixel

toward the arrow pointer.

ASLEEP -- cursors removed from display.

Keyword: CursorsOff

CursorsOff: Freeze and erase the cursors.

Keyword: CursorsOn

CursorsOn: Turn on the cursors.

Keyword: DefaultBpp

DefaultBpp: -- default bits per pixel for images -- settable parameter

for RawImageIn. See also DefaultWide, DefaultHigh, Header_length.

Keyword: DefaultHigh

DefaultHigh: --default image height -- settable parameter used

for RawImageIn. See also DefaultBpp, DefaultWide, Header_length.

Keyword: DefaultWide

DefaultWide: -- default image width -- settable parameter used

for RawImageIn. See also DefaultBpp, DefaultHigh, Header_length.

Keyword: DEFINE

DEFINE: glnum, name="instruction1; instruction2;....."

Defines user symbol name and puts it in glossary glnum. glnum must

be an integer. If no glossary is specified, the current default

(most recently used glossary) is used.

E.g. define 55, tpict="zpict; move imt=im3" defines tpict in glossary 55.

Also see the SAVE, EDIT and TYPE commands.

Keyword: DeleteAllObjs

DeleteAllObjs: Delete all deletable objects (i.e. images, rfiles) in memory.

Objects which are not Memory resident are not erased -- only the memory

resident object descriptors of the objects are deleted.

Keyword: DeleteObj

DeleteObj IM: Delete object descriptor associated with IM from memory. This

does not delete the file IM if IM is not a Memory file (e.g., Disk and Vmem

objects are not erased from disk or Display memory).

Keyword: Dir

DIR [IMAGE/RFILE] filespec : give file listing of disk directory

examples:

DIR "*.*" --- all files in current directory.

DIR "c:\temp\c*.c" --- all files matching c*.c in \temp directory.

DIR IMAGE "*.tif" --- all files with .tif extension in the default

image directory (see ImagePath command).

DIR IMAGE --- all files in default image directory.

DIR RFILE --- all files in rfile directory (RfilePath)

NOTES: " " are necessary if filespec has wildcard in it.

Keyword: DO

DO...WHILE: Keywords to set up a loop in which the conditional is tested after

the loop is executed. E.g.,

i=0; do {move im[i]=imt[i];i++} while (i<10) recovers 10 tape images.

Keyword: DOS

DOS; Runs a secondary copy of dos, allowing the user to execute any

dos command, provided that they do not require much memory. Note that the

interrupt for picture acquisition is blocked while in dos. Type

EXIT to return to TV6. It is wise to return to the TV6 directory before

returning to TV6. (If not ^C will hang the program)

This command is especially useful for editing of files via the

Norton Editor ("ed [Filename]") or for inspecting files via "list [filename]".

Keyword: EDIT

EDIT: Keyword to edit a previously defined string. E.g.,

edit zpict opens 'zpict' for editing; prompt will be '#', not '*'.

See also DEFINE, SAVE, and TYPE.

Keyword: EditObj

EditObj IM Field: Edit the object descriptor for image IM. The current value

of Field will be displayed, and can be edited. Be extremely careful editing

the object descriptor. Changing the values of pointers is NOT recommended.

Field must be one of the following:

StructureName: should be "object_descriptor"

Handle: file handle

Path: full path from file name

Text: text name of file

TimeStamp: absolute time in seconds at last use

Identifier: integer identifier (i.e. '34' for imt34)

Value: for Type Numeral (as in "Move im0=1.0")

Type: object type (Memory, VmemVRAM, VmemDRAM, Disk, Tape,

ReadOnly, WriteOnly, Accumulator, Numeral,

Unspecified)

Status: object status (UnknownStatus, Closed, OpenRead,

OpenWrite, Ready)

Kind: object kind (Unknown, Image, or Rfile)

Role: object role (UnknownRole, Source, or Destination)

DeleteStatus: deletion status of object (Deletable or Nondeletable)

DataType: data type (IntegerData, FloatData, ComplexData,

DistortionData, IntensityData, UnknownData)

SignedData: 0 for unsigned, -1 for signed data

Header: pointer to header

UpLinkPointer: pointer to next in linked list

DownLinkPointer:pointer to UpLinkPointer of previous member of

linked list

Bitadr: bitadr of Vmem image

Data: pointer to actual data

Bpp: bits per pixel

Sbpp: significant bits per pixel

Wide: width in pixels

Pitch: pitch in pixels/line

High: height in pixels

Sx: subset x offset

Sy: subset y offset

Swide: subset width in pixels

Shigh: subset height in pixels

Buffer: r/w transfer buffer pointer

NextByte: next byte to read in transfer buffer

NBytes: total number of valid bytes in transfer buffer

Keyword: ELSE

See IF

Keyword: ERASE

ERASE [erase string]: Erase grey-scale display bit planes. The erase string is

a series of command words. Allowed words:

All --Erase all bit-planes in both grey scale & overlay planes.

Overall --Erase all overlay bit planes.

Over[01...] --Erase overlay planes 0, 1, etc. for each digit specified.

Greyall --Erase all grey scale bit-planes.

Grey[01...] --Erase grey planes 0, 1, etc. for each digit specified.

Example: ERASE Grey420 Overall

Erasing is restricted to the current clipping window (see Set_clip_rect &

Set_clip_bigrect). To erase all of the grey scale VRAM, use the prefix "big_".

Thus "ERASE ALL" erases within the current clipping window; "ERASE BIG_ALL"

erases all of VRAM.

Note 1) VRAM usually extends well outside the visible screen area.

Note 2) Some display boards have Overlay planes distinct from the grey planes.

More typically, we soft-encode the lowest two grey playes, grey0 and

grey1 as the overlays. Thus, avoid using the "Over" words in ERASE;

Typically, "ERASE Grey0" will erase the cursor overlay and "ERASE

Grey1" will erase the graphics and text overlays.

Note 3) A copy of this command is also in the d_TIGA sub-dictionary.

Keyword: exit

exit: Used to exit from the d_TIGA sub-dictionary or to return from the

'DOS' command.

Keyword: FOR

FOR: Keyword to set up loops. E.g., to put 10 dezingered backgound subtracted

images on tape, and look at them on the fly (the 'i' prints the image number):

for(i=0; i<10; i++){i; move imt=ime:ime-imb:imb; see}

Keyword: FORGET

FORGET: Keyword to UNdefine a symbol, or delete a whole glossary. E.g.,

forget zpict deletes the symbol zpict;

forget 10 deletes all of glossary 10.

See DEFINE

Keyword: GET

GET: Keyword to read a file from disk, which may contain definitions and

commands, and associate it with a glossary number. E.g.,

get 15, "n:\user\mydir\default.gl2"

gets default.gl2 from the user's directory, and associates its definitions with

glossary 15 (provided that the definitions within the file do not include

there own glossary numbers).

Keyword: GOTO

GOTO LABEL: Keyword to branch within a command. E.g.,

i=0; do {move imt=ime; if (i>10) goto out} while (++i); out:

puts 10 exposures on tape.

Keyword: heaplook

heaplook -- Check the integrity of the heap. Should print 'OK'.

Keyword: HELP

HELP: Types help info for specified keywords, e.g., "HELP DENS" types help

info for DENS. "*" and "?" are wildcards which substitute for any remaining and

a single character, resp. When using wildcards, be sure to enclose the term in

double quotes, lest the command line interpreter misinterpret the wildcards as

special symbols. Keywords may be stacked on the command line, spearated by

spaces. If the word "KeywordsOnly" is encountered, then the only a list of

keywords in the helpfile for the next word on the command line is listed. Note

that all keywords are case-insensitive. Examples:

HELP RFILE Get help infor for "RFILE"

HELP "B*" "F*" Help for all topics starting with B or F

HELP KeywordsOnly "R*" List available topics starting with R

HELP "?oot" E.g., get info for "root" and "boot" but not

"roots" or "cahoots"

The helpfile itself is called HELP.TV6. The format for the file is explained

in helps.c

Keyword: IDBUG

IDBUG is a parameter to control debugging. Use IDBUG=0 for normal operation.

Use IDBUG=1 to simulate all image operations, tape operations, and 'wait'

delays. This will cause all ICF calls to be listed as they occur.

Keyword: IDLE_PROC

IDLE_PROC: If defined, is executed by ICF while waiting for keyboard input.

This takes care of SHOTIM updates and adjusts the balance of where in memory

the CPU is executing. May be invoked from the keyboard, but has no noticeable

effect.

Keyword: IF

IF...ELSE: Keywords to set up conditional execution in a command line. The

'else' clause can be omitted if it is not needed. E.g.,

i=j=0; if (i<10 && j<2) {move im[i]=ime;i++} else {i=0; j++}

takes 20 exposures in im0 thru im9.

Keyword: Keyword

See Commands

Keyword: Keywords

See Commands

Keyword: KILL

KILL: Keyword to delete the auto stack from the command prompt.

e.g.,

AUTO KILL;RESET stops autoexecute and clears the timer.

See also "KillKeys" for killing processes away from the command prompt.

Keyword: KillKeys

Kill Keys-- Standard kill keys for TV6 processes

<esc>-- Kills the process and generates a BIG system reset (ICFreset(1))

i.e. Kills all commands on the AutoExecute stack and the

User stack.

<^Z> -- Kills the process and kills the current execution line

(ICFreset(0)). Continues with Auto commands added on a

DIFFERENT command line.

<^X> -- Just terminates the current process. Other queued processes

will bw executed.

From the command prompt (*), use AUTO KILL;RESET to clear the auto

stack and reset the alarm clock/serial interupt.

Keyword: Lasplot

LasPlot rfile [control] x_start y_start x_size y_size line_width

or LasPlot EJECTPAGE

Plot a rfile on the laserjet

plot dimensions given in dots (at 300 dots per inch on the plotted page)

(8 inches by 10 inches is plotting area)

x_start,y_start -- location of upper left of plot measured from upper left

of page (0,0 is upper left 3000,2400 is lower right)

x_size,y_size -- size of plots in dots

line_width -- linewidth of plot in dots

[control] (don't type hyphens -- they show possible abbreviations)

Old-graph-limits Use limits of last graph

Eject-page No plot- sends page to printer

New-page Eject last page and start a new page with

this graph.

Label-off Don't print label under plot

Box-off Don't draw box around graph

Portrait-mode Plot in Portrait mode on page-- landscape=def

use TIC rfile [tic_type] PRINTER 0 1 3

to add lattice tics to plot

Keyword: ListObjs

ListObjs lists all resident object descriptors.

Keyword: ME

NOVICE AT THE HELM! GET HELP FROM SOMEONE WHO KNOWS WHAT HE IS DOING!

Keyword: Memleft

Memleft reports on and allocates all of the remaining memory.

NO MEMORY WILL BE LEFT!!!

Keyword: MONITOR

MONITOR: Keyword to suspend processing of a command line and take input from

the keyboard. Processing resumes after the new input is satisfied. E.g.,

for (i=0;i<37;i++){graf "c:\rfiles\y5dec90."[i]; monitor}

will suspend operation awaiting keyboard command line input after each cycle

through the loop. At this point one can either hit return to start the next

loop cycle or enter a command. A useful trick when entering commands in

response to the "monitor" keyword is to redefine the value of the loop

parameter, i. Another trick is to insert a command line ending with ";monitor"

to force yet another command line request before proceeding with the next loop

cycle.

Keyword: nokey

nokey -- flag to identify whether or not the user has pressed a key.

=1 if no key has been pressed

=0 after a key has been pressed

This is often used in loops such as:

do { (loop instructions)} while (nokey)

This loop will stop when the user presses a key.

Keyword: printgrey

PrintGrey Image_file [output_file] [resolution]

*** RESTRICTED TO 8-BIT IMAGE FILES ***

Produces a HP Laserjet grey-scale graphics file from a 8-bit image

file. It will reduce images to fit on the page.

Image_file-- any 8-bit image file in TV6 -- use "stashscreen" or "convert"

to produce the 8-bit file.

output_file (optional)- if specified, it will direct output to a file

instead of the printer. If no output_file is specified, or

if "network" is specified, a temporary file is created which is

then queued to the Laser4 printer and deleted.

resolution (optional)- 600, 300 (the default), or 150 DPI.

600 gives the best output, but takes the most time to print.

Hardcopy can also be produced with other programs such as Image Alchemy

using an 8-bit tiff file such as that produced by "stashscreen".

Keyword: queue_busy

queue_busy --- autoexec queue busy flag.

busy=1 not busy=0

Keyword: QUIT

QUIT; Leave tv6 and return to dos. BE CAREFUL: This will end your tv6

session. ANYTHING WHICH ONLY RESIDES IN MEMORY WILL BE LOST!!!!

Keyword: RESET

RESET; If defined, this is executed by ICF upon returning to DOS. May also be

invoked from the keyboard. Typically used to close the x-ray shutter and reset

alarm clock and timer functions.

Keyword: SAVE

SAVE: Save a glossary, or all glossaries, to disk. E.g.,

save 10, "myglos.gl" saves glossary 10 without glossary numbers;

save "allglos.gl" saves all glossaries with glossary numbers.

save "default.gl" saves into glossary which is automatically loaded

on startup.

Keyword: SCAN

SCAN: Keyword to retrieve numbers or strings from the typed line. E.g.,

define xpict="scan i,j; move im[i]=ime; move im[j]=imb"

xpict 2 3 <-- when this is typed by the operator, xpict will be

executed with i=2, j=3.

Keyword: SHOW

SHOW: Keyword to see the definition of a string variable or a number, and as

a special case to show the current status of the autoexecute queue. E.g.,

show xpict shows definition of xpict;

show b shows value of b; typing 'b' alone would do the same;

show auto shows current state of autoexecute.

Keyword: STATUS

STATUS: Keyword to show the status of resource usage by ICF.

Keyword: WAIT

Wait t : Wait for a delay time of t seconds.

Keyword: WHILE

WHILE: Keyword to set up conditional loops in commands. See also 'do'. E.g.,

i=0; while (i++<6) {move imt=ime} puts 5 exposures on tape.

Imaging Commands

Keyword: ARCHIVE

ARCHIVE: Archive filespec [a]: Image file disk to tape archiving

All images matching filespec will be appended to tape.

If "a" option is specified, only those files with archive attribute set

will be saved. The archive bit will be reset in this case.

If no path is explicitly specified, the current ImagePath will be used.

Examples:

Archive "c:\image\*.tif" a

transfers all images to tape with *.tif extension and

archive bit=on from directory c:\image and resets

each archive bit.

Archive "*.*"

transfers all images to tape from current ImagePath directory

Keyword: AUTONAME

AUTONAME [filename_prefix] (used with -- MOVE IMA=anyimage )

Autoname sets the filename prefix for the auto-incrementing filename utility.

If no argument is specified, this prints the current prefix.

AUTO-INCREMENTING FILENAME UTILITY

1. Finds a UNIQUE sequential filename for disk output by concatenating

the prefix with an index

2. The utility is invoked when IMA is the destination file in an image move

e.g. MOVE IMA=anyimage

3. The prefix will be concatenated with the current ImagePath if a path

is not explicitly defined within the prefix.

Examples:* AUTONAME XTAL -- sets prefix

* IMAGEPATH C:\IMAGE\ -- sets directory

* MOVE IMA=IM0 -- specify autonaming

moving image (c:\image\xtal0.tif <- im0)

* MOVE IMA=IM0 -- specify autonaming

moving image (c:\image\xtal1.tif <- im0)

* AUTONAME C:\IMG\BACKG -- reset prefix

* MOVE IMA=IM0 -- use autonaming

moving image (c:\img\backg0.tif <- im0)

see ImagePath

Keyword: BIN

BIN: IM_in IM_out bin_factor: performs software binning of image IM_in

Keyword: BINIMAGE

BINIMAGE: See RawImageIn

Keyword: BOX

BOX: [IM] [IMV] [key command]: Cursor driven analysis of an image. Keys control

the operation.

IM: Src file to be examined. this may be a compound file, e.g."IM0=LYSO + 5".

If missing, the default (last used) image is used.

IMV: A Vmemory file. The default is IMSCREEN; however, IMV can

explicitly specify another Vmemory image.

key command:

If omitted, we execute BOX without any keys in queue.

If "RedoKeys", we execute box with the keys for the last use of BOX

already in queue on entry to BOX. This repeats the last key

sequence of BOX.

If a sequence of keys, these keys are put in queue upon entering box.

Valid keys for BOX:

A Accept coordinates of cursors on console.

C Fill value for box_edit function (key F).

D Rotate thru display states: grey + overlays on; grey off overlays on;

grey on + overlays off.

E Edit a pixel value (Memory images only).

F Fill the cursor box area with a value (set with key C) (memory only)

H Histogram intensities in contour. Send the histogram to rfile rfile,

or if *rfile=NULL, query for an rfile name.

I Integrate data within the contour.

P Toggle printing of integration statistics on the console.

R Return.

S Integrate a spot -- width set with key W.

T Compute cumulative statistics on spot integrations

W Set radius for integration circle and backgroud annulus.

X eXamine a histogram graph.

Z Zoom image in cursor box. Toggle "D" to restore origional image.

Examples: box im0=lyso

box im0 imscreen RedoKeys

box im1 HR

Keyword: BOXX

BOXX: IM [XStart] [YStart] [Wide] [High]:

Give image statistics without use of the display system. The arguments

specify the sub image for analysis.

Keyword: CATH

CATH: Runs module which generates an small angle intensity correction

file from a flat-field image. The user is prompted for all necessary

information. The flat-field image is displayed, and a perimeter (only

pixels within the perimeter will be present in the correction file - all

others will be zeroed during correction) is created by the user. The module

then computes statistics on the image, calculates the appropriate correction

for each pixel and saves the correction file.

The correction file will consist of a 4 byte floating point number

for each pixel. Upon correction (i.e. move im5=im4!imi), each pixel in the

source image is multiplied by the corresponding pixel in the correction file

to create the destination image. The current correction file can be changed

using the SetInt command.

Keyword: Convert

Convert: -- Change the image data type

usage: Convert source_image IMn datatype

IMn must be a memory image file

Valid destination datatypes: Char, Short, Long, Float

Keyword: Crop

Crop: IMn xstart ystart xsize ysize --- Crop a memory image (IMn)

This replaces the original image with the cropped version

Keyword: DENS

DENS: Usage: DENS IM [CONTROL] [WIDE] [THETA] ( []=optional arguments )

Produce I(distance) or I(angle) plots.

I(distance)--- integrate a strip or bowtie region (see DensBowtie)

WIDE,THETA (or "W" and "T" options within DENS) set bowtie dimensions.

Mouse cursors set origin and direction of bowtie.

CONTROL (or "M" and "P" options within DENS) sets integration measure

and normalization.

I(angle)-- integrate an annulus

CONTROL=IAngular\ (or "A" option within DENS) sets angular mode.

WIDE (or "W") sets width of integration annulus, cursors set origin

and radius.

Frequently used control words: (see DENSCONTROL for complete list)

Default (D\) -- go to default mode (turns off autointegrate, etc.)

Autointegrate (A\) -- integrate upon entry using last integration region

Returnimmed (R\) -- return without key interaction (use with autointegrate)

IAngular (IA\) -- set angular mode to be the default

IRadial (IR\) -- set radial measure to be default

IDotproduct (ID\) -- set dot product measure to be default

IPerpixel (IP\) -- use perpixel normalization

Nointeraction usage: (see DensNointeraction)

DENS IM N\[Control] [Wide] [Theta/Radius] [Xorigin] [Yorigin] [Phi]

see also DensMeasures DensExamples DensControl DensExpert DensBowtie

Keyword: densnointeraction

Densnointeraction: Nointeraction\ mode in dens--- (abbreviated N\) allows all dens parameters

to be passed from the command line. Integration is immediate.

1. I(distance)--- integrate image within a strip or bowtie region

a.Radial integration measure ( d = sqrt(x^2+y^2) -- used for powder patterns)

DENS IMxx N\IRadial\... [WIDE] [THETA] [X] [Y] [PHI]

(WIDE=0 usually)

b.Dot product measure ( d = r dot n -- used for integration of line features)

DENS IMxx N\IDotproduct\... [WIDE] [THETA] [X] [Y] [PHI]

(THETA=0 usually)

3. I(angle)--- Integration within an annulus as a function of angle

DENS IMxx N\IAngular\... [WIDE] [RADIUS] [X] [Y] [PHI]

[X,Y]--- Origin of integration region (in pixels, can be off the image)

[PHI]--- Direction integration region points (in degrees 0=right 90=up)

[WIDE]-- Half-width of integration region (annulus or butterfly/strip)(in pixs)

[THETA]- Half-angle of butterfly region (in degrees)

[RADIUS] Radius to annular region (in pixels)

see DENSBOWTIE

Keyword: densexpert

Densexpert: DENS IM [Cntrl] [Wide] [Theta/#Radius#] [#Xorigin#] [#Yorigin#] [#Phi#]

Integrate IM within a specified area as a function of distance or angle:

Wide -- half-width of (butterfly or annulus) int. region in pixels

Theta -- half-angle of butterfly region (degrees)

### the following parameters are used only in Nointeraction mode ###

#Radius# -- radius for angular integration

#Xorigin#,#Yorigin#-- coordinates of integration region origin (in pixels)

#Phi# -- Direction to point butterfly in degrees (0=right 90=up)

Control words are broken into 3 groups --

Main control (see DENSEXAMPLES, DENSCONTROL)

Nointeraction-- specify all (5) integration parameters on command line

Autointegrate-- force an integration upon entry (uses current cursor pos.)

Consoleinput -- get cursor coordinates from the console upon entry

Returnimmed -- return without waiting for keys (use with Autointegrate)

Subimage -- use only subimage defined by Sx Sy Swide Shigh

Default -- all other main control parameters turned off

Integration Measures (see DENSMEASURES)

IRadial\ -- distance is signed radius from origin (default mode)

IDotproduct\ -- distance is dot product with diretion of butterfly

IAngular\ -- Integrate intensity vs angle within an annulus

IPerpixel\ -- Normalize intensity to per pixel average (default=off)

I\ -- return to default integration measure

Graphing Modes

GOldlimits\ -- use same graphing scale on new graph

Ggraph\ -- don't display the graph

GContouroff\ -- don't fill the dens region during integration

GEraseoff\ -- don't erase the old graph before plotting new graph

G\ -- return to default graphing mode

String together control words (or init. letters). (see DENSCONTROL)

Integration measures and graphing modes must be preceded by I or G and

should be end with \. If no control word is specified, the last control word

will used. Main control, integration measures and graphing modes can be

changed independently.

see DensExamples, DensMeasures, DensControl

Keyword: denscontrol

Denscontrol: DENS IM [Control] [Wide] [Theta/#Radius#] [#Xorigin#] [#Yorigin#] [#Phi#]

***** CONTROL WORD ABBREVIATIONS *******

N = Noint = Nointeraction #integrate using command line parameters

A = Autoint = Autointegrate #integrate upon entry using old params

C = Con = Console = Consoleinput #accept coords on console

R = Ret = Return = Returnimmed #return immediate (use with autointegrate

S = Sub = Subimage #limit integration to subimage area

D = Def = Default #turn off above parameters

IR\ = IRad\ = IRadial\ #use bowtie region-- d is sqrt(x^2+y^2)

ID\ = IDot\ = IDotproduct\ #use bowtie region-- d is r dot n

IA\ = IAng\ = IAngular\ #use annular region-- d is angle

IP\ = IPer\ = IPerpix\ = IPerpixel\ #normalize integral to perpixel avg.

I\ #use radial default

GO\ = GOld\ = GOldlimits\ #graph with the limits used last time

GN\ = GNo\ = GNograph\ #do not graph

GC\ = GContour\ = GContouroff\ #don't display integration contours

GE\ = GErase\ = GEraseoff\ #don't erase old graph before graphing again

G\ #turn off other graphing parameters

Integration measures and graphics modes catenation: \ or space terminates

I or G mode.

irad\iperpix\ = iradperpix\ = irad\ iperpix\ != irad perpix

GO\GN\ = GON\

noint idot\ iperpix\ gn\ = nointidot\iperpix\gn\ = noint\idotp\gn\ = nipd\gn

Keyword: densmeasures

densmeasures: DENS IM0 [CONTROLWORDS] [WIDE] [THETA/#RADIUS#] [#XORIGIN#] [#YORIGIN#] [#PHI#]

The integration routines can use several different measures for the ordinate

A. Within Butterfly (or bow-tie) region (halfwidth WIDE and half angle THETA)

Radial -- (default mode) distance is sqrt(x^2+y^2). Signed according

to particular half of the butterfly. Useful for integrating

powder diffraction patterns. Wide is usually set to 0.

eg DENS IM0 IRADIAL\ (or IR\ or I\) 0 15

Dot Product -- distance is (r dot n) where n is a unit vector pointing

in the direction of the butterfly. Useful for integrating

line features. Theta is usually set to 0.

eg DENS IM0 IDOTPRODUCT\ (or ID\) 10 0

Perpixel -- either measure above can be normalized to a perpixel average

eg DENS IM0 IRADIAL\ IPERPIXEL\ (or IRP\ or IP\) 0 15

B. Within Annular region (halfwidth WIDE and radius #RADIUS#)

Angular -- Intensity is given as a function of angle

eg DENS IM0 IANGULAR\ (or IA\) 10

see DENS, DENSEXAMPLES, DENSCONTROL, DENSEXPERT

Keyword: DENSEXAMPLES

DENSEXAMPLES : 1. dens im0 default iperpixel\ idotproduct\ goldlimits\ 10 0

(=) dens im0 defaultiperpixel\idotproduct\goldlimits\ 10 0

(=) dens im0 dip\id\go\ 10 0

(=) dens im0 dipd\go 10 0

Each uses dotproduct/perpixel measure with a halfwidth of 10 pixels

in the default interactive mode. Graphing will use the old limits.

(the default command word is used to explicitly specify the mode)

2. dens im0 nointeraction 5 0 300 200 5.3

(=) dens im0 noint 5 0 300 200 5.3

(=) dens im0 n 5 0 300 200 5.3

Each uses the last defined integration measure and graphing mode

to noninteractively dens a strip 5 wide with origin (300,200)

at an angle inclined 5.3 degrees to the horizontal.

3. dens im5

uses the last specified list of parameters to dens image im5

4. dens im0 iangluar\ 10 0

(=) dens im0 ia 10

does an angluar integration with annulus width=10

see DENS, DENSMEASURES

Keyword: densbowtie

Densbowtie: xxxxxx xx=integration boundary xxxxxx

xxxxxx / xxxxxx

xxxxxx / xxxxxx |

xxxxxx xxxxxx THETA

xxxxxx xxxxxx |

xxxxxxxxxxx --------------------

integration |

region |

2 * WIDE -----> direction of bowtie

| [PHI]

|

xxxxxxxxxxx

xxxxxx xxxxxx

xxxxxx xxxxxx

xxxxxx xxxxxx

xxxxxx xxxxxx

xxxxxx xxxxxx

If THETA=0 the integration region becomes a strip

THETA and PHI are specified in degrees (PHI=0 ->right PHI=90 ->up)

Keyword: Disp

Disp IM Kut Scal: Display IM via the shift method: Kut is first subtracted

from IM and then the result is bit shifted Scal bits to the right or left. The

result is trimmed to the range, typically, of 0-255 and displayed on the grey

scale monitor. Scal is encoded as follows:

Scal = -5 Display pixels as black if < Kut, full white if >= Kut.

= -4 to -1 Bit shift Scal bits to left (ie, multiply up).

= 0 Shift zero bits.

= 1 to 15 Bit shift Scal bits to right (ie, divide down).

Screen images which are saved in IM files may be redisplayed via Disp IM,0,0.

Keyword: Display

Display Commands: See "Disp", "PwrSee" & "See" for information on displaying

iamges on the grey-scale monitor.

The grey scale display system is very versatile in that it can display image

objects of an arbitrary width and height into arbitrary areas of different

width and height on the grey scale screen. It is capable of handling images

with pixels in a wide variety of bit-structures and has several means of

compressing pixels of greater than 8 bits depth into the 8-bit depth of the

display monitor. However, unusual images or unusual display modes require hand

editing of the DISPLAY structure and proper setting of the image file object

descriptor. Some info on this may be gleaned from the description at the

beginning of the source code file See3.c. See Sol for more detailed info.

Keyword: exp_time

exp_time -- returned value for the actual shutter time (in seconds).

Keyword: expt

expt-- variable to set exposure (or background) time (in seconds).

Keyword: Gen5In

Gen5In Gen5FileName [IMn] : Reads an image in GEN5 file format into memory

image object IMn. If IMn is not specified, it is read into im0.

Example-- Gen5In C:\IMAGES\A.IMG

reads GEN5 file A.IMG into im0.

Keyword: header_length

header_length -- number of bytes to skip in binary image before valid

image data. Used by RawImageIn.

Keyword: HIST

HIST IM hist_origin hist_end hist_spacing x_origin y_origin x_size y_size

places histogram of pixel values in the rfile RF1 (this can be moved to

another rfile with a command such as "move rfnew=rf1").

--- works only on memory files at present

Keyword: ImagePath

ImagePath [drive:\path\]

Display or change the default path for images

Keyword: KUTDSP

KUTDSP is a parameter that turns on the display of the positions of zingers on

the image as they are found. (KUTDSP=0 is off, KUTDSP=1 is on)

Keyword: KUTZNG

KUTZNG specifies the cutoff level for dezingering, in units of 0.1 standard

deviation. KUTZNG=40 (4 s.d.) is a reasonable starting point. With KUTZNG=30,

you expect 700 false zingers by chance in a 512x512 image; KUTZNG=40 should

give about 17 false zingers.

Keyword: LFOT

LFOT last_file_on_tape--

lfot=-1 -> start writing at BOT

lfot!=-1 -> space to double EOF and write

EXABYTE checks for new tape in drive and will prompt for initialization;

File searches are faster when LFOT is set to the correct value.

Routines will search past LFOT and update LFOT as appropriate.

IF LFOT IS SET TOO HIGH TAPE MAY SPACE TO END !!! -- SET IT RIGHT OR TOO LOW !

Keyword: MOVE

MOVE--- general object manipulator for both images and rfiles (vectors).

resolves object names then performs object manipulation.

Operations: destinations --images, rfiles

sources --images, rfiles, or numbers

move a=b copy b into a

move a=-b copy negated b into a

move a=b op c place result of (b op c) into a

valid ops:

+ addition

- subtraction

* multiplication

/ division

>> bitshift right (c must be a number --- acts only on images)

<< bitshift left "

: dezinger b and c (remove statistically sig. differences from b+c)

! perform image corrections to b -- c is one of the following

IMD -- distortion correction -- prompts for distortion map file

IMI -- intensity correction -- prompts for intensity corr. file

IMC -- performs distortion then intensity correction

reserved names:

IMn -- Memory image where n is any (nonnegative) integer.

IME -- start an exposure

IMB -- start a background

IMT -- Tape file destination image (to be written at end of recorded

data.

IMTn -- Tape image source where n is the desired tape file

IMC, IMI, IMD -- image corrections (see above)

RFn -- Memory rfile wher n is any integer

other names will be treated as disk files.

Examples:

move im0=ime --- take an exposure and place in im0

move imt=(im0:im1)>>1+(im2!imd)!imi-imt7*2

--- dezinger and add im0 and im1 then bitshift the result

by 1 bit, add the distortion then intensity corrected im2 then

subtract the product of tape file #7 and 2. Place result in a

file at the end of tape. Note one or more Memory accumulator

images may be used to buffer the computations.

move t=rf1+4*rf2/7.-r

add memory rfile rf1 to 4* rfile rf2 /7 and subtract

disk rfile "r". Place result in disk file "t"

Keyword: Oblique

Oblique: This runs a module which corrects a small angle intensity correction

file for the "obliquity effect" which results in wide angle scattering. The

user provides the name of the small angle correction file and a phosphor file.

The user is also asked for the beam center (x,y) pixel location, the

beam energy, and the source to phosphor distance. Once these values are

given, the module generates a new correction file which has been changed to

account for the "obliquity effect".

The phosphor file consists of the coefficients of the quadratic term

in the response of the phosphor (I(theta)=I0*(1.0+A*theta), where theta is

measured in degrees) at five different energies (Cu Kalpha, Cu Kbeta, 11.2keV,

13.5keV, and 18.0keV). The values for the current phosphor should be in

the file CURRENT.PHS. Any time a new phosphor file is chosen (and exists),

CURRENT.PHS will be updated to the new values. The correct(!) values for the

current phosphor should also be located in the file DEFAULT.PHS.

IMPORTANT: Do not change the DEFAULT.PHS file unless you know what you

are doing! You could lose the correct values for the current phosphor!

Keyword: OpMode

OpMode [no argument]: gives info and shows current mode

OpMode Argument: where Argument = NormalMode, SerialMode or StreakMode

sets OperatingMode. These control how an exposure is terminated.

Keyword: PermIn

PermIn PermFileName [IMn] :

Reads a 512x512 image in PERM file format into memory image IMn

(default=IM0). Also transfers info in headers.

Keyword: PermOut

PermOut IMn PermFileName :

Transfer a 512x512x16bit image in IMn into a disk file

with PERM file format.

Keyword: PwrSee

PwrSee IM MinIn MaxIn Pwr; Display an image on the grey scale monitor by

exponentiation. For each datum, we subtract MinIn and then raise the result to

the Pwr power, scaling the result by a scale factor such that MaxIn**Pwr=255

(typically). The allowed range of Pwr is (0 to 2).

Keyword: rawimagein

RawImageIn diskfile [IMn] [header length] [width] [height] [bits/pix]

Reads a binary disk file into memory image object IMn (default IM0).

parameters:

header_length- # bytes to skip at beginning of file (default=0)

width- Image width in pixels (default=DefaultWide)

height- Image height in pixels (default=DefaultHigh)

bits/pix- Usually 8 or 16 (default=DefaultBpp)

Example: RawImageIn c:\images\a.g im1 4096 1024 1024 16

reads binary disk file c:\images\a.g into IM1.

this assumes an unsigned integer input-- Use EDITOBJ to change data type

You can also swap bytes if necessary after RAWIMAGEIN command by

move im10=im0>>8+im0<<8

Keyword: readimagenow

ReadImageNow [0/1]

-- Reset the alarm clock and read the image that has been integrating

on the CCD-- reads into image specified by last MOVE IMn=IME command.

If parameter==0, read will only occur if MOVE IMn=IME has left

the alarm clock set.

If parameter==1, read will fill last image referenced in Move imn=ime

statement regardless of clock status. Will give an error

if no image has been specified.

Use parameter==1 to reset serial process.

example: expt=100

Move im0=ime;do{readdigitalbit 0 1}while(pcl_value==0&&queue_busy==1)^

;ReadImageNow

This starts an exposure, then polls digital bit 0 for a low value-

When low (or after 100 seconds in this example) the image will be read.

Keyword: rows_per_strip

rows_per_strip --- number of rows_per_strip in the output TIFF images.

=0 (startup value) use only one strip per image

provides fastest access to image.

=n>0 use high/n strips each containing n rows of data

Keyword: SEE

SEE [IM] : Display IM on the grey scale monitor using the DISPLAY structure in

DOS file DISPLAY.STR. (This contains the parameters used during the last

image display.)

Note that DISPLAY.STR may be edited (see DOS command) prior to calling SEE.

Alternatively, commands DISP or PwrSee may be used for certain types of

display functions. The latter two command really just define set certain

parameters in DISPLAY.STR and then call SEE. SetupDisplay

may also be used to edit the DISPLAY structure.

Keyword: SetDist

SetDist: This module prompts the user for the names of the x and y

distortion correction files. If they are not set, the distortion correction

routine will prompt the user. However, once they have been set, SetDist

is the only way to change them.

Keyword: SetInt

SetInt: This module prompts the user for the name of the intensity

correction file. If it is not set, the intensity correction

routine will prompt the user. However, once it has been set, SetInt

is the only way to change it.

Keyword: Smooth

Smooth -- image and rfile smoothing

Images:

Smooth IM [FilterWidth] [FilterHeight] [coeff1, ..., coeffN]

Smooth IM into IM by convolving with a filter of up to 25 integers. The default

FilterWidth and FilterHeight are 3 and 3. The product FilterWidth *

FilterHeight may not exceed 25. Default filter values, Filter1 to Filter25 are

each 1. Thus, "SmoothImage IM;" smooths IM into IM via a convolution with a

unity 3x3matrix. "SmoothImage IM 3 2 1 -10 1 1 -10 1;" convolves IM into IM

via the 3x2 matrix with row values of (1, -10, 1).

Rfiles:

Smooth RF Width -- smooths rfile with the the given width

Keyword: Sqc

Sqc: This calls the module which generates the distortion correction files

from an image of a square x-ray mask. The module first prompts the user for

the name of the x-ray mask image, displays it, and asks the user to define

a perimeter (the region with useful spots). The user is then prompted for

the positions of four fiducial spots. These spots should be located near

the center of the image, and in the following order:

3 4

1 2

It is essential that these spots all be nearest neighbors (i.e. with no

spots in between!). The program then finds all of the other spots in the

image, and fits their locations to an ideal square grid. The deviations

of the actual locations from the ideal grid are then used to calculate

the distortion at each pixel of the detector. This information is then

saved in the distortion correction files. Each file consists of a floating

point number for each pixel, which indicates where the pixel should actually

be located. (The x distortion correction file contains the ideal x

coordinate....)

The correction procedure can be run through the move instruction,

i.e. move im5=im4!imd. The names of the distortion correction files can

be changed using the SetDist command.

Keyword: StashScreen

StashScreen memory_image_name : This moves a clone of the screen memory object.

If memory_image_name doesn't exist, it will be created as a memory object.

The user will be prompted for the subscreen area to be captured. The default is

the last screen area accessed by an image display.

Example: "StashScreen IM8;" moves the screen image into an object called IM8.

Keyword: Tic

Tic -- display lattice tic marks on the graph or printer

usage:

Graph [rfile]

Tic [rfile] [lattice_type]

or

Lasplot rfile [control] x_origin y_origin x_size y_size linewidth

Tic rfile [lattice_type] PRINTER tic_y_start tic_y_size tic_width

.

.

.

Lasplot EJECT

Lattice_type: (don't include hyphens -- they show possible abbreviations)

Lam-ellar

Hex-agonal

Cubic

Double-diamond or PN3M

Gyroid or IA3D

Plumb-ers-nightmare or IM3M

Sqrt

tic_y_start: #dots to start tic lines from base of plot (at 300 DPI)

you may specify a negative origin

tic_y_size: (float) Tic height as a fraction of height of last plot

may be negative for tics extending below origin

tic_width: width of tic in dots at 300 DPI (default=3)

Example: tic rfile hex printer 0 0.5 3

prints hex tics from the bottom of the graph halfway to the top.

Tic reads lattice parameters (d_spacing and origin) from the rfile

Keyword: Title

Title Image_name ["text"]

With no string Title Image_name views text stored in image title area

Title IMage_name "text" stores "text" in title area

Keyword: TypeHeader

To display header information for, e.g., im0:

TypeHeader im0

To display image history for, e.g., im1:

TypeHeader im1 history

Keyword: zngcntrl

zngcntrl -- (dezinger debugging variable)

=0 normal operation

=1 force use of znggain and zngsigma

Keyword: znggain

znggain -- (dezinger debugging variable)

gain (adu/quanta) used to set zinger lut

Keyword: zngsigma

zngsigma -- (dezinger debugging variable)

sigma of image background used to set zinger lut

Rfile Commands

Keyword: Graph

Graph [rfile] [control] : Graphs an rfile on the screen.

Control specifies options. Combine words as necessary-- Use letters in CAPS

or up to a hyphen for abbrev. -- Don't include the hyphens in the

string.

Inter-active expand/de-expand using the cursors

No-erase don't erase old graph

Old-graph-limits graph using old limits

Keyword: Peak

Peak --- find peak positions and fit to a lattice from rfile data

usage:

Peak rfile control_string

Control_string: -- Can be abbreviated with letters in CAPS or with characters

up to hyphenation points. Don't include hyphens in strings.

Ret-urn-afterfit Return after FitImmed

Fit-immed Uses old peak list for peak fits

Old-graph-limits Enter with old graph display limits

ORigin-force-infit Forces the fitted origin to a predefined value

Disable-graph No Graphs in peaker

Lam-ellar-mode Peaks are indexed with a single integer keystroke

Squares-mode Peaks are indexed via s^2

Index-mode Peaks are indexed with h or h,k or h,k,l

STraight-line-fit Fit peak positions with a straight line- not Bragg eq.

Additionally there are interactive keys within peaker to access additional

functions

-,0-9 Initiate indexing sequence:

Lamellar mode: [-]single_digit -- assigns a [signed] lamellar index

Squares mode: [-]S^2 -- assigns [sign] sqrt(S^2) as index

eg. The hex (2,1) peak is entered as 7 (2^2 + 2*1 + 1^2)

Index mode: A single digit (h) is assumed to be lamellar

2 digits (h,k)-hex and 3 digits (h,k,l)-cubic.

d-spacing mode: Enter d-spacing for peak- used with calibration samples

The peak position nearest the big cursor is then assigned to the index

A Find the lattice spacing of a peak in Angstroms

B Beginning -- this zeros the peak fit list

C Calibration menu

S enter the speciman to phosphor distance in pixels

O Enter the beam position (origin) in pixels

D Enter d_spacing of current rfile-- This will then fit the current

peak list and compute the spec_to_phos distance and origin.

P Fit list of d-spacings to peak positions-- use d-spacing mode in

main menu to enter list

D Display rfile at full scale

E Expand display of rfile to cursor box

F Fit the current list of peak positions and indicies

G Regraph with current display limits

H HELP

I Switch to INDEX_MODE

L Switch to LAMELLAR_MODE

M Set lattice_fit mode (default, force origin, or straight line fit)

R RETURN

S Switch to SQUARES_MODE

T Plot lattice tic marks on graph (lattice type set with key Z)

W Change fit region width for finding peak.

Z Set tic lattice type

Keyword: RFILE

RFILE: An obsolete TV4 command. Use MOVE. MOVE determines the Kind of file

which is involved and performs the proper manipulations.

Keyword: rf2asc

Rf2Asc rfile asciifile

Transfer rfile object to ascii file of x,y values

Keyword: RfilePath

RfilePath [drive:\path\]

Display or change the default path for rfiles

Camera

Keyword: BLT

BLT: -- bias light time (msec) - not generally used.

Keyword: CAC

CAC: -- CCD integration mode

cac=2 -- normal operation

cac=3 -- diagnostic noise source injected into A/D

cac=4 -- diagnostic bar pattern injected into A/D

Keyword: CCDtalk

CCDtalk: string --- sends a string to the photometrics ccd and waits for

a return. An online routine can be defined as follows:

define 1, movie = "while(nokey){ccdtalk \"10 obs qshow \"}"define 1, online = "msg1;msg2;msg3;online_format;movie"define 1, online_format = "ccdtalk \"pz clcpt 110 32 160 512 1 1 ccdfmt \""define 1, msg1 = "\"online --- change time by typing EDIT MOVIE\""define 1, msg2 = "\" then changing the number before the word OBS (10 = 1 second)\""define 1, msg3 = "\" HIT ANY KEY TO ESCAPE FROM ONLINE \""

type online -- a continually updated strip will be displayed on

the SONY monitor

Keyword: CS

CS: -- start the CCD in continuous scan mode (debugging primarily).

In this mode, the CCD is continuously read-out. This is

often used when looking at CCD output on an oscilloscope.

Waits for <esc> or ^X to end.

Keyword: DAG

Dag: -- user variable to set gain of line trace to scope

dag=1 normal

dag=8 8x gain

Keyword: gain

gain -- CCD amplifier gain setting

gain=20 (default)

or gain=5

Keyword: hap

hap-- total # of horizontal pixels per line (including nonimaging pixels).

Keyword: hbin

hbin -- horizontal binning factor for CCD

hbin pixels will be summed before each A/D conversion

hbin=1 --- full resolution image

hbin=2 --- half resolution image, etc

Note: lower resolution results in quicker readout and in some cases

higher S/N.

Keyword: illen

illen -- the number of "real" pixels per line in the CCD image.

This must be <= HAP-ISPIX.

Keyword: isl

isl -- image starting line -- used to skip over buffer lines

at top edge of CCD.

Keyword: ispix

ispix -- image starting pixel -- used to skip over prescan pixels at beginning

of each line to get to exposed pixels on the CCD.

Keyword: ISOREAD

ISOREAD channel#

reads output state of optoisolators on rear of CCD controller

channel# 0 -- 3

(optoisolator 0 is set during exposure)

Keyword: ISOSET

ISOSET channel# state

Set state of optoisolators on rear of CCD controller

channel# = 0 -- 3

state = 0 -> turn OFF

= 1 -> turn ON

(optoisolator 0 is set for exposure-- reset for readout)

Keyword: LC

LC-- lightbox control flag (not generally used).

=0 iso2 unaffected

=1 iso2 on during exposure

=2 iso2 on during readout

Keyword: Microswitch

Microswitch number :: reports the status of protection vane microswitches on 1k

Keyword: nr

nr -- number of CCD reset wait clocks. This sets the length of time that

the reset is held.

Keyword: ns

ns -- number of CCD signal wait states. This is the time between the

black integration and the clocking in of the signal.

Keyword: pblk

pblk --- pre black wait states for the CCD. This is the settling time

between the reset signal and the black level integration period.

Keyword: psig

psig --- pre signal wait states for the CCD. This is the settling

time between black level integration and signal integration.

Keyword: RdCamSetup

RdCamSetup filename -- reads a camera configuration file from diskfile

"filename". The file default.tbl is read upon entry into TV6.

Keyword: ser_dly

ser_dly --- serial line delay for CCD controller communications.

Keyword: SETUP

Setup-- Display the camera setup parameters.

TVL-- total vertical lines (including nonimaging lines)

ISL-- integrate start line -- skips first nonimaging lines

TIL-- total integrated lines ( <= TVL-ISL )

HAP-- total # pixs per line (including nonimaging pixels)

ISPIX-- first pix of imaging area in each line

ILLEN-- # imaging pixels ( <= HAP-ISPIX )

HBIN-- Horizontal binning factor

VBIN-- Vertical binning factor

EXPT-- Exposure time in seconds

CAC-- CCD integration mode (2=norm, 3=add noise, 4=add bar pat.)

GAIN-- CCD a/d gain (5 or 20)

DAG-- gain of PSI scope output signal

V_DLY-- vertical clock wait states (should be same as ser_dly)

The above can be changed via user variables according to desired readout

(e.g. strip mode or reduced resolution).

In addition, there are numerous software clocking delays, which in general

should not be changed:

NR-- # of CCD reset clock states

PBLK-- # of pre-black clock states

PSIG-- # of pre-signal clock states

NS-- # of CCD signal clock states

HCK-- horizontal clock divisor

Variables not generally used:

SHC-- shutter control

LC-- source control

BLT-- bias light time

VREST-- vertical clock rest state

Keyword: SHC

SHC-- shutter control flag (not usually used).

=0 iso1 unaffected.

=1 iso1 on during exposure.

Keyword: TELEMETRY

Telemetry-- measure clock voltages on the CCD

For Thomson 1kx1k

OD - output drain RD - reset drain OG - output gate

RHI - reset level LHI - serial clk HI PHI - parallel clk HI

PLO - par. clk LO BIAS1 - bias level 1 BIAS2 - bias level 2

ICCD - out. current EXT1 - external Volt. EXT2 - external Volt.

Keyword: v_dly

V_dly -- vertical clock wait states.

Keyword: vbin

vbin -- vertical binning factor

vbin=1 full vertical resolution

vbin=n n CCD lines are shifted into horizontal

readout register before doing any horizontal clocks

(This worsens vertical resolution by a factor of n).

Any positive value is allowed.

Keyword: vil_dly

vil_dly --- vertical interline delay -- (in milliseconds)

time to wait between end of one line readout to beginning of

next -- used in streak mode (expose during continuous readout)

to increase integration time per line.

Keyword: VREST

VREST-- vertical clock rest state select (not used for Thomson 1k).

=0 phase 2

=1 phase 3

=2 phase 1

Tape Commands

Keyword: ModeSel

ModeSel- Debugging tape setup command. Used to set the read/write

modes on the scsi tape device.

Keyword: ModeSense

ModeSense-- request mode sense information from the scsi tape device.

See EXABYTE manual.

Keyword: motion_thresh

motion_thresh -- (debugging) exabyte parameter

Keyword: reconn_thresh

reconn_thresh --- (tape debugging variable)

Keyword: ReqSen

ReqSen; (debugging)SCSI Request Sense for EXABYTE-- See EXABYTE manual.

Keyword: REWIND

REWIND; Rewinds the Exabyte tape.

Keyword: TapeToDisk

TapeToDisk DiskFileName-- Tape utility to dump the binary image of the

current tape file to the specified disk file name. Use TSPACE to

position the tape to the correct place.

Keyword: Tape

Tape commands for exabyte tape: See Rewind; TapeToDisk; Tspace; ModeSense;

ReqSen; ModeSel

Keyword: tape_file

tape_file (debugging tool) lists current tape file counter

PC Labcard Commands

Keyword: ATOD

ATOD: AtoD channel#,[range],[quiet]: Use the PC Lab card to measure an analog voltage

channel#-- 0 thru 7

[range] -- 0 thru 8

0-- +/- 5 V

1-- +/- 2.5 V

2-- +/- 1 V

3-- +/- 0.5 V

4-- 0 - 10 V

5-- 0 - 5 V

6-- 0 - 2 V

7-- 0 - 1 V

8-- +/- 10 V

[quiet] -- 0 -- will print voltage on screen

1 -- no voltage to screen -- poll pcl_value

The measured voltage is placed in user variable pcl_value. If the applied

voltage is past the end of the measurement range, the maximum or minimum

allowed values in the range will be recorded.

Keyword: DTOA

DtoA channel#, voltage: set a voltage on PC Lab card D/A

channel#-- 0 or 1

voltage-- 0.0 - 5.0 Volts

Keyword: gpib

GPIB command command_field : debugging gpib routines

commands: -- you must init with GPIB FIND first

GPIB FIND device_name --- device_name is CCD for the photometrics

GPIB WRITE string

GPIB READ byte_count

GPIB TMO time_out_parameter -- see the National instrument manual

GPIB RSP -- checks the serial poll byte

GPIB CLEAR

This set of commands does not work concurrently with control code for the

camera at present (e.g. move im0=ime).

Keyword: pcl_value

pcl_value: this is a variable filled on each call to

AtoD #,range or

ReadDigitalBit #

with the result of the measurement. This allows process

control from the command line.

Keyword: readdigitalbit

ReadDigitalBit bit#,[quiet]

Sense an input bit line from the PC Lab card

bit# --- 0 to 15

[quiet] --- 0 -- print return on screen

1 -- don't print to screen -- use pcl_value

return 1=high

0=low

Note:unconnected will return high

Return value stored in pcl_value

Keyword: setdigitalbit

SetDigitalBit bit#, value

set a digital line on the PC Lab card to a particular value

bit# -- 0 to 15

value -- 0(low) or 1(high)

Serial Communication Commands

Keyword: Listen

Listen [on/off]

Listen to serial line - on, off or toggle if no argument

Keyword: Receive

Receive "trigger string"

Send a trigger string to the serial tsr. When the string is received from the

serial line, int 4Ah (alarm clock) will be issued to activate reading the CCD.

If there is no string, the trigger is disabled.

Keyword: send

Send "string to send"

Send a string over serial line and make tv6 ready for image reading.

Keyword: serial

Serial

Two-way serial communication over the RS232 line.

Keyword: terminal

Put computer into full-duplex terminal mode on the serial line

TIGA Card Commands

Keyword: BITBLT

BITBLT: d_TIGA\Bitblt :Bit-block xfer.

This is for code development. See TIGA manual.

Keyword: d_TIGA

d_TIGA: A subdictionary of TIGA and test commands. To exit from this

dictionary, type the "Exit" command. DO NOT TYPE "Quit"!!

Keyword: Do_palet

d_TIGA\Do_palet :Set up the display board palet

This is for code development. See TIGA manual.

Keyword: Draw

d_TIGA\Draw [I],[J],[K] :Direct access to draw function.

This is for code development. See Drawp.c for arguments.

Keyword: Draw_line

d_TIGA\Draw_line [xs] [ys] [xf] [yf] :Draw a line in the current fcolor from

(xs,ys) to (xf,yf).

This is for code development. See TIGA manual.

Keyword: Draw_point

d_TIGA\Draw_point [x] [y] :Draw a point in the current fcolor at (x,y).

This is for code development. See TIGA manual.

Keyword: Draw_rect

d_TIGA\Draw_rect [wide] [high] [x] [y] :Draw a rectangle of (wide x high)

pixels with the upper left corner at (x,y).

This is for code development. See TIGA manual.

Keyword: Drew

d_TIGA\Drew :Send out a draw triple of arguments.

This is for code development. See drawp.c

Keyword: Fill_rect

d_TIGA\Fill_rect [wide] [high] [x] [y] :Draw a rectangle filled in with the

current fcolor, (wide x high) pixels with the upper left corner at (x,y).

This is for code development. See TIGA manual.

Keyword: Get_clip_bigrect

d_TIGA\Get_clip_bigrect :Type current values of the big clipping rectangle.

This is for code development. See TIGA manual & udraw.c

Keyword: Get_colors

d_TIGA\Get_colors :Get the current foreground and background colors, e.g.,

fcolor & bcolor.

This is for code development. See TIGA manual.

Keyword: Get_lut

d_TIGA\Get_lut :Get the small (256 byte long) look up table used to xlate VRAM

values to grey scale values, e.g., the monochromatic palet.

This is for code development. See TIGA manual.

Keyword: Get_pmask

d_TIGA\Get_pmask :Get pmask.

This is for code development. See TIGA manual.

Keyword: Get_tms_byte

d_TIGA\Get_tms_byte :Get a byte at a given bit-address from the TIGA board.

This is for code development. See TIGA manual.

Keyword: Get_tms_long

d_TIGA\Get_tms_long :Get a long at a given bit-address from the TIGA board.

This is for code development. See TIGA manual.

Keyword: Get_tms_short

d_TIGA\Get_tms_short :Get a short at a given bit-address from the TIGA board.

This is for code development. See TIGA manual.

Keyword: Gsp_free

d_TIGA\Gsp_free :Free a GSP memory allocation.

This is for code development. See TIGA manual.

Keyword: Gsp_malloc

d_TIGA\Gsp_malloc :Malloc GSP memory.

This is for code development. See TIGA manual.

Keyword: Gsp_minit

d_TIGA\Gsp_minit :Reinitialize and free all GSP memory allocations.

This is for code development. See TIGA manual.

Keyword: Gsph_alloc

d_TIGA\Gsph_alloc :Allocate a handle-based Gsp memory allocation.

This is for code development. See TIGA manual.

Keyword: Gsph_compact

d_TIGA\Gsph_compact :Compact GSP memory.

This is for code development. See TIGA manual.

Keyword: Gsph_totalfree

d_TIGA\Gsph_totalfree :Get size of largest free block of GSP memory.

This is for code development. See TIGA manual.

Keyword: Lut_ramp

d_TIGA\Lut_ramp :Fill red palet w/ramp from 0 to 255.

This is for code development. See TIGA manual & udraw.c

Keyword: Lut_reverse_ramp

d_TIGA\Lut_reverse_ramp :Fill red palet w/ramp from 255 to 0.

This is for code development. See TIGA manual & udraw.c

Keyword: Overlay0

d_TIGA\Overlay0 ["on"/"off"]: Turn overlay0 on or off. This overlay holds the

mouse cursors.

Keyword: Overlay1

d_TIGA\Overlay1 ["on"/"off"] :Turn overlay1 on or off. This overlay usually

holds text and graphics.

Keyword: Overlays

d_TIGA\Overlays ["on"/"off"] :Turn both overlays 0 & 1 on or off.

Keyword: Pan

d_TIGA\Pan [x] [y] :Pan VRAM such that (x,y) is in the upper left corner of

the screen.

Keyword: Patch

Patch is used to move one part of a Vmemory (ie, grey scale display board VRAM

or DRAM) image into another part. There are two forms of the command:

Patch mouse [IMsrc] [IMdst];

Use the mouse to move part of image IMsrc into

IMdst. If Neither IMsrc or IMdst are specified, the screen object,

imscreen, is assumed. If IMdst is omitted, IMdst=IMsrc is assumed.

Patch [IMsrc] [WideSrc HighSrc XStartSrc YStartSrc] [IMdst] [WideDst HighDst

XStartDst YStartDst];

Move the part of IMsrc specified by WideSrc...YStartSrc into the part

of IMdst specified by WideDst...YStartDst. If IMsrc is omitted, the

screen object, imscreen, is assumed. If the ...Src parameters are

omitted, the same parameters as the last call are used. If IMdst is

omitted, IMdst=IMsrc is assumed. If the ...Dst parameters are omitted,

we use the same parameters as the lst call to patch.

Keyword: Pc_tms

d_TIGA\Pc_tms :Bidirectional xfer of data strings between GSP and PC memory.

This is for code development. See TIGA manual & udraw.c

Keyword: Peek_breg

d_TIGA\Peek_breg [register] :Get a B-register (0 to 14) value from the GSP

processor.

This is for code development. See TIGA manual.

Keyword: Poke_breg

d_TIGA\Poke_breg :Push a B-register value in the GSP processor.

This is for code development. See TIGA manual.

Keyword: RestoreSomeScreen

d_TIGA\RestoreSomeScreen :Restore some screen saved via SaveSomeScreen.

This is for code development. See TIGA manual & uniimage.c

Keyword: SaveSomeScreen

d_TIGA\SaveSomeScreen :Save some grey-scale screen to DRAM. Restore with

RestoreSomeScreen.

This is for code development. See TIGA manual.

Keyword: SetBigCursor

d_TIGA\SetBigCursor [x] [y] :Set the big mouse cursor to (x,y).

Keyword: Set_clip_bigrect

d_TIGA\Set_clip_bigrect [wide] [high] [x] [y] :Set the clipping rectangle to

be (wide x high) pixels with the upper left corner at (x,y). This is a

super-set of the TIGA set_clip_rect function, but applicable to all of VRAM.

This is for code development. See TIGA manual & udraw.c

Keyword: Set_clip_rect

d_TIGA\Set_clip_rect [wide] [high] [x] [y] :Set the clipping rectangle to be

(wide x high) pixels with the upper left corner at (x,y).

This is for code development. See TIGA manual.

Keyword: Set_cursor_limits

d_TIGA\Set_cursor_limits :Set the limits for the mouse cursors.

This is for code development. See TIGA manual.

Keyword: Set_dstbm

d_TIGA\Set_dstbm :Set the destination bitmap for bit-block and zoom movements

This is for code development. See TIGA manual.

Keyword: Set_fcolor

d_TIGA\Set_fcolor [fcolor] ;Set the foreground color to fcolor (0 to 255).

This is for code development. See TIGA manual.

Keyword: Set_lut

d_TIGA\Set_lut :Set the monochrome palet.

This is for code development. See TIGA manual & udraw.c

Keyword: Set_overlay_lut

d_TIGA\Set_overlay_lut :Set the overlay palet.

This is for code development. See TIGA manual & udraw.c

Keyword: Set_overlay_mask

d_TIGA\Set_overlay_mask [hex-mask] :Set the mask for overlay planes.

This is for code development. See TIGA manual & udraw.c

Keyword: Set_planes

d_TIGA\Set_planes :Set VRAM planes toa given value.

This is for code development. See TIGA manual.

Keyword: Set_pmask

d_TIGA\Set_pmask [pmask] :Set the pmask. pmask may be entered as a decimal

integer, a hexadecimal integer or as a string of the form "grey7340", where

the digits specify bit-planes.

This is for code development. See TIGA manual.

Keyword: SetSmlCursor

d_TIGA\SetSmlCursor [x] [y] :Set the small cursor to (x,y).

Keyword: Set_srcbm

d_TIGA\Set_srcbm :Set up the source bitmap for bitblt & zoom image transfers.

This is for code development. See TIGA manual.

Keyword: Set_tms_byte

d_TIGA\Set_tms_byte :Write a byte into GSP memory. This prompts for more info.

This is for code development. See TIGA manual.

Keyword: Set_tms_long

d_TIGA\Set_tms_long :Write a long into GSP memory. This prompts for more info.

This is for code development. See TIGA manual.

Keyword: Set_tms_short

d_TIGA\Set_tms_short :Write a short into GSP memory. This prompts for more info.

This is for code development. See TIGA manual.

Keyword: SetupDisplay

SetupDisplay manipulates the Display structure which is used by SEE to

control the display of images on the grey scale monitor. Appended words control

the action. A string of more than one appended word may be used. Example:

SetupDisplay Type Display Set BigLutMethod=Pwr;

Send

Send the memory resident display structure to the display hardware, ie,

implement the settings defined in the structure. Example:

SetupDisplay Send

Edit <Parameter>

Edit display structure Parameter, where Parameter is the name of a

display structure parameter. "SetupDisplay Type Display" types the

parameter names and values of the current display structure. The Edit

function shows the parameter and its current value for editing. Hitting

return then encodes the edited value into the structure. Example:

SetupDisplay Edit BigLutMethod;

ReadFile <File-name>

Read an ASCII encoded file of the DISPLAY structure into the memory

resident version. Example:

SetupDisplay OldStructure.str

Set <parameter>=<parameter_value>

Set a display strucutre parameter to a specific value. Example:

SetupDisplay Set BigLutMethod=Pwr Set ScreenWide=1000;

Test

Test SEE. -- Not yet implemented --

Type Display

Type the current memory resident display structure.

Type Default

Type the default display structure.

WriteFile <File_name>

Write the current memory resident display structure in ASCII encoded

form into DOS file_name.

Keyword: SetupGraph

SetupGraph manipulates the Grapher structure which is used by Graph to

control graphing functions on the grey scale monitor. Appended words control

the action. A string of more than one appended word may be used. Example:

SetupGraph Type Grapher Set Wide=512 Set High=750;

Appended command words:

Default

Load Grapher with the default grapher structure. This is useful if the

grapher structure gets screwed up and has to be reset. Example:

SetupGraph Default;

Edit <Parameter>

Edit grapher structure Parameter, where Parameter is the name of a

grapher structure parameter. "SetupGraph Type Grapher" types the

parameter names and values of the current Grapher structure. The Edit

function shows the parameter and its current value for editing. Hitting

return then encodes the edited value into the structure. Example:

SetupGraph Edit Wide;

ReadFile <File-name>

Read an ASCII encoded DOS file of the Grapher structure into the memory

resident version. Example:

SetupGraph OldGrapher.str

Set <parameter>=<parameter_value>

Set a grapher strucutre parameter to a specific value. Example:

SetupGraph Set Wide=512 Set High=1000;

Test cntrl

Test graph using the bit-wise coded control word, cntrl. See graph.c

for a description of what the various bits in cntrl do.

Type <grapher_structure_name>

Type the grapher structure. The structures available are Grapher,

GrapherOld or GrapherDefault. Example

SetupGraph Type GrapherDefault

WriteFile <File_name>

Write the current memory resident grapher structure in ASCII encoded

form into DOS File_name.

Keyword: Setup_luts

d_TIGA\Setup_luts :Setup palets via LUTS_STRUCTURE. This prompts for info.

This is for code development. See TIGA manual.

Keyword: Test_pattern

d_TIGA\Test_pattern [text] :Put a test pattern on the grey-scale display. If

text=0=no text, =1=overlay plane text, =2=grey plane text.

This is for code development.

Keyword: Vmemory

Vmemory refers to memory on the grey scale display board. It is divided into

two types: VRAM, part of which is displayed on the monitor and DRAM. VRAM is

physically high-speed dual port memory availble to both the display board CPU

and the video monitor (at video rates). DRAM is conventional memory on the

display board accessible to the display board CPU. Both types of memory can be

mapped to a window on the PC bus -- uniimage.c. Objects stored in VRAM are

called VmemVRAM type objects and those stored in DRAM are VmemDRAM type

objects.

Keyword: Zoom_rect

d_TIGA\Zoom_rect :Zoom part of the screen. This needs a pre-defined source and

destination bitmap, set via the Set_srcbm and Set_dstbm commands.

This is for code development only. See TIGA manual.


Last modified: Wednesday 26 Aug 1998 12:02:23 by
Adam C. Finnefrock   (adam@bigbro.biophys.cornell.edu)