Advanced Scanner's Guide

Draft, 6/1/95

This document gives instructions on research scans, changing defaults, and some detailed "behind the cookbook" information. For more basic or cookbook-level instructions, see the Basic Scanner's Guide .
Contents:
  1. Files
  2. Nonstandard scanning
  3. Related tools
  4. More about the global sections
  5. About debugging
  6. An example of diagnosing a byte count error using the debugger
  7. Running ALIA in the software develop environment
  8. Running ALIA in the hardware "tweak" environment

Files

Stand Alone Console namelist file ALIA_DATA:HW.NML

This file pertains to the standalone console, but is not actually read by it. Instead, a utility called FILL_CONSOLE_MEMORY is used to read this namelist file, and fill the global section CONSOLE_SECTION with the relevant data. The Stand Alone Console (and ALIA ) then use the data contained in this section. To make changes in this data,
  1. edit the file
  2. put the SAC to sleep or take it down altogether
  3. RUN ALIA_EXE:FILL_CONSOLE_MEMORY to apply the changes to memory
  4. restart the SAC , or, wake it up and use FILL_SERVO (or COMMAND_SAC and select "init to std config"), to apply the changes to devices.

Stand Alone Console error log file ALIA_DATA:SAC.LOG

This file contains error output from the SAC . If the SAC has died, you may be able to determine the problem or at least find a clue by typing out the log file. (If the SAC is still up, you won't be able to, as it has the file locked.)

Note that at the present time, there is always the single word "Error" at the top of the file. This has to do with initialization problems for the large screen display that we are not using, and can be ignored.

Note also, that there is not always error information in this log file, and I don't know why. I wish I did!

ALIA default namelist file ALIA_DATA:BIG.TP_NML

When you issue the verb SCAN with no qualifiers, it is as if you are saying SCAN/TP=ALIA_DATA:BIG.TP_NML. This is the template task parameter file for the scan. All namelists having to do with scanning are contained here. It is a big file (hence the name) because it contains many namelists, including some multiple occurrences of the same namelist. For example, instructions for scanning several rasters, with 1 or 5 channels, with different focus setups are all present. They are all contained in the same file to minimize the number of places people have to go to remember to change things. The scanning program is smart enough to take only the information it needs.

The template file is fairly well annotated with comments.

To make changes in this data, just edit the file. The next time you invoke ALIA , it'll pick up this file by default.

ALIA output tp_nml file PD?:RRRRR_PPPP_NN.TP_NML

This file is not a straight copy of the template BIG.TP_NML file. Instead, it contains only those namelists applicable to this scan; also some namelists from the HW.NML file since that describes the scan; also some bookkeeping information like scan duration; also, it does not contain any comments.

It is sometimes important to understand what is written to the file when, especially for file cleanup purposes after a workaround. Here is the sequence of events:

  1. ALIA program is invoked
  2. Focus and photometric setup is performed
  3. Focus and photometric namelists are written to output file (If step 2 was skipped, default info is written to file)
  4. Shading raster is performed.
  5. raster and bookkeeping namelists for shading raster are written to output file
  6. Spot raster is performed.
  7. raster and bookkeeping namelists for spot raster are written to output file
  8. Main raster is performed
  9. raster and bookkeeping namelists for main raster are written to output file
  10. All remaining scan-specific namelists are written to output file
  11. All SAC related namelists are written to output file.
If, for example, the shading, spot, and main rasters have had to be performed with separate invocations, understanding this sequence of events will help you figure out the file repairs that have to be done to produce a single tp_nml file containing complete and accurate data.

ALIA output GSH file PD?:RRRRR_PPPP_NN.GSH

The ALIA program produces an extremely minimal GSH file, comparable to that put on the optical disks, just before it begins each raster. This is intended as a temporary file, used only by SPAM to allow the user to look at the data. The real gsh file is produced by a separate program, run after the scan completes. See the com file BASE:[CONTROL]RUN_HEADER_DB for a pointer as to where to look.

Configuration files hwdev:[optical.gamma?]gamma?.config

Also known as "Gretchen's file of optical stuff", this file is automatically copied onto the scan disk after the scan completes. It is an ascii file which contains details of the current optical configuration of the machine.


Back to Table of Contents

Non Standard Scanning

Nonstandard pixel sizes

The GAMMA machines are physically configured for 15 micron pixels. Scans may be performed at other pixel sizes in single channel mode (altho the spot size will not be optimal, and this may result in under- or over- sampling).

To perform a scan with some other pixel size, do the following:

Qualifiers to use with the SCAN or SELECT_SCAN verb:

/nchan=1
Use this qualifier to perform a single channel scan. The SCAN command is not smart enough to figure out that it needn't do a shading scan in this case, so use it with SELECT_SCAN.
/tp=foo.tp_nml
Use this qualifier to force use of a nonstandard task parameter file. This is useful when you want to change a number of things at once.

To generate the nonstandard task parameter file, copy ALIA_DATA:BIG.TP_NML to another location & filename, and then edit at will.

/noshading
Will not perform shading raster. (Shading coefficients used will be the last ones calculated.) Illegal for SCAN verb.
/nospots
Will not perform spot raster. Illegal for SCAN verb.
/nophot
Will not go through focus & photometric setup
/focus={sag, flat, adhoc}
Determines which focus procedure to use. Default is focus=sag.
/set_focus
Equivalent to focus=adhoc.
/ debug
Not recommended for use by nonprogrammers, but it's there.

Other verbs to use:

SPOT_SCAN
will do only the spot scan. All other qualifiers may also be used.
RESEARCH_SCAN
will prompt you for a task parameter file. Spot scan is not performed. All other qualifiers may also be used.

Back to Table of Contents

Related Tools

Peek_at_alia_sections

This utility gives you access to both the CONTROL and CONSOLE global sections. You will have write access so be careful! You can run this either during a scan, or after a scan has died to check out what state it's in.

Invoke it by doing $run alia_exe:peek_at_alia_sections.dbg and then step about 10 lines. After you've connected to both sections, you can use the standard debugger tools to examine variables.

You can find relevant include files in ALIA:[INCLUDE] for the control section, and ALIA:[SAC.INCLUDE] for the console section.

Of particular interest may be the EH structure in the console section. EH stands for error handling. It shows the last reported message. Unfortunately this is in a numeric code so you need to search files like ALIA:[INCLUDE]ERROR_HANDLING.INC and ALIA:[INCLUDE]SERVO_ERRORS.INC to get any meaningful information out.

View_cefs

This utility will show you the current state of all the common event flags : 1 means the flag is set, 0 means it is not set. This is a static, snapshot utility. It is good for checking out the state of things when ALIA appears to be hung and just waiting for something.

Invoke it by typing RUN ALIA_EXE:VIEW_CEFS.
Back to Table of Contents


More about the Global Sections

There are 2 permanent global sections needed to run ALIA . Both are (if all goes well) automatically created and filled at boot time. The boot file is located in BASE:[CONTROL]PIXEL1_BOOTME.COM; see this file for details of how to create the sections and fill them in case anything misfires.

Oh, right. If it has misfired then BASE won't be defined either. So look in DISK$SCHMIDT:[PLATEPROC.CONTROL]PIXEL1_BOOTME.COM.

Both sections are mapped to files located in PGS_PLACE, which is presently located in disk$data:[global_sections].

You can determine whether the permanent global sections exist by doing show dev/files pgs_place.

Additionally, a temporary global section is created by the controller to hold the data buffers for each scan. This section is called, logically enough, the DATA_SECTION. It is accessed by the data collector, laser monitor, and data processor. The file that it is mapped to also is in pgs_place.
Back to Table of Contents


About Debugging

If you invoke ALIA with the /debug qualifier, what will happen is that you'll get the CONTROLLER program in debug mode, ie, compiled & linked with the debugger, running with debug prompts etc.

Then, when it gets to the routine SPAWN_OTHER_PROCESSES, it will ask you whether or not to run each of the other processes. If you say YES (the default), it will spawn & run the non-debug version of that program. If you say NO, you must then go to another window and manually run the debug version of that program, eg, RUN ALIA_EXE:LASER_DATA_PROCESSOR.DBG .

Thus if you want debug access to all 7 programs, you'll need 7 windows. Generally you won't need this. I generally have run with only 1 or 2 other programs in debug mode.

To debug the SAC , instead of using the start_sac command, do run alia_exe:stand_alone_console.dbg . This will run the SAC interactively, still attached to the DECterm you start it from. This is a useful technique when the SAC keeps dying without leaving any clues to what it is doing.


Back to Table of Contents


An example of diagnosing a byte count error using the debugger

Debugging this program can be a bit tricky since it involves real time control of the hardware. Stepping through a program will slow things down and change the timing characteristics. Thus, setting traces tends to be the most useful approach. This is particularly true for keeping track of the ASTs.

For example, the following describes the approach I used to diagnose a byte count error that turned out to be a problem with the scaler.

First, I ran the servo process in debug, and set breaks in the reset_steady_state routines so that I could examine what the marker (XMKR) commands were that were being sent to the servo. Then, while the program was still paused, I used IDL to query the servo and register that those numbers had indeed been received. This seemed to exonerate the servo itself. It also changed the symptoms a bit, presumably since the timing of things was changed. The new symptom was that the empty light did go off, but the FIFO filled up, ie, no internal reads were being performed. As it happens, this symptom was mentioned on the glitch list; its cause is that the first pixel flag is never set.

I then ran the data_collector in debug, and set traces at the LAST_PIXEL_AST, FIRST_PIXEL_AST, and SPIT_OUT_FIRST_WORD routines, and ran without breakpoints. This verified that, indeed, the first pixel ast was not going off until the end of the pass. (The spit_out_first_word routine never got called; the last_pixel_ast went off nearly as soon as it was set; and the first_pixel_ast went off near the end of the pass.)

This looked to me as if the count of pixels in the scaler was off somehow, so I tried pressing the reset button before starting the next raster, and indeed, this cured the problem.


Back to Table of Contents


Running ALIA in the software develop environment

To work in the development environment, do the following:

This procedure sets process-level , ie, window specific logicals to point you at the ALIA development places, and defines the verbs to point at the development executables.
Back to Table of Contents


Running ALIA in the hardware "tweak" environment

To work in the hardware tweak environment, do the following:

This procedure sets process-level , ie, window specific logicals to point you at the ALIA tweak places, and defines the verbs to point at the tweak executables.

To rebuild ALIA with your "tweaked" changes, set default to hwdev:[supertasks.alia] and do mms/skip/descrip=alia:[mms]alia.new_descrip . This will recompile any code that has been changed, and relink everything. It does take quite a while. If you know you only need to rebuild one program, you may give it that program as an argument, eg, mms/skip/descrip=alia:[mms]alia.new_descrip data_collector.exe, data_collector.dbg.

Note that map files will go into alia:[map] , exes will go into alia_exe , and object and list files will go into disk$hw:[scratch] . You may need to purge these areas periodically to keep from running out of disk space.


Back to Table of Contents
Back to Overview


Vicki Laidler -- laidler@stsci.edu
Last updated 12/17/96