Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home

Frequenty Asked Questions About Using AIPS++

1.
When I type a command, all that happens is that I see line after line of Glish code.

2.
When I type Imager(), I get an error.

3.
When I type x=1, Glish complains about error, parse error at or near '='.

4.
When I try to set a string, Glish complains.

5.
I get too much output if I mistakenly type the name of an array.

6.
Strange things happen if I use double quotes around strings.

7.
When I start AIPS++ and type ahead, strange things happen.

8.
Some commands don't do what I expect: doit(shift=t).

9.
How do I run something in the background?

10.
How do I stop something?

11.
AIPS++ is very sloooowwwwww...

12.
How do I copy or rename an Image or MeasurementSet?

13.
How do I make notes in the log?

14.
How can I customize AIPS++ on startup?

15.
The display looks empty.

16.
How do I change directory in Glish?

17.
Why is the Glish prompt sometimes - and sometimes +?

18.
Why do the contents of AIPS++ windows sometimes behave strangely after the window is resized?

19.
My display seems to have frozen up, but the Command Line window is still working.

20.
AIPS++ just hangs, now what?.

Q:1 When I type a command, all that happens is that I see line after line of Glish code.

Remember to put brackets () after the command. The name of the function alone is a valid Glish variable that can be passed around just as any other variable. We use this capability extensively in the Glish code.



Q:2 When I type Imager(), I get an error.

AIPS++ is case-sensitive, so in this example you need to type imager(). The convention is that names of functions should always be lower case, and that different words in a composite name run into each other without, for examples, underscores to delineate them.

Q:3 When I type x=1, Glish complains about error, parse error at or near '='.

Remember that Glish needs a colon for assignment: x:=1. The single equals is reserved for default arguments. (No, we don't particularly like this feature either).

Q:4 When I try to set a string, Glish complains.

Remember that Glish needs (single) quotes around strings.

     - file:=3C84.MS                             
                  # Incorrect
     error, parse error at or near 'C84'
     warning, uninitialized global variable MS used
     F 
     - file:='3C84.MS'                           
                  # Correct

Q:5 I get too much output if I mistakenly type the name of an array:

Glish assumes that you really want to see what you type. So if you type an array name then the whole thing can be dumped to the screen. You can limit the output per array:

     a:=array(0.0, 100, 100)
     a::print.limit:=10

Or, more usually, for all output:

     system.print.limit:=10

Q:6 Strange things happen if I use double quotes around strings.

The double quote tells Glish to split the enclosed string into a vector of strings, one for each full word, whereas single quotes preserve the entire string as one element. This can affect tests for equality in Glish code. We try to avoid this error in our code but to be safe you should always use single quotes.

Q:7 When I start AIPS++ and type ahead, strange things happen.

Wait until you see a - prompt. Glish processes include files in the background and can accept inputs while doing so although the result may not be reasonable. So it's best to be polite and wait. Here is an example of what can happen:

     aips++
     x:=1
     "logger.g", line 330: warning$: 
      no events have been received
     "logger.g", line 330: error, 
      non-string type in coercion of <fail>

Q:8 Some commands don't do what I expect: doit(shift=t).

The documentation says to use shift=T. t is not the same as T (the true symbol in Glish).In fact, since t is undefined, it is created and assigned a value of F (the False symbol), thus doing the opposite of what you expected!

Q:9 How do I run something in the background?

Some tools support this via the global dowait variable. See for example, Image or Imager. The GUI also allows this.

Q:10 How do I stop something?

Control-c will stop a Glish function from running. GUI functions can be stopped by pressing the abort button.

Q:11 AIPS++ is very sloooowwwwww...

AIPS++ is designed to run well on a canonical machine which is a Sparc 4 or Ultra or 200 MHz Pentium Pro class machine with 64 Mbytes of memory or more. It will run very slowly on a 32MByte Sparc IPX, for example, swapping a lot. The best way to check memory availability is to use a system utility such as top on Solaris machines.

Q:12 How do I copy or rename an Image or MeasurementSet?

For any Table, you can use tablecopy or tablerename. The Catalog tool will also do this, with the option of using a GUI.

Q:13 How do I make notes in the log?

Use the logger.note.

     dl.note('Forgot robust weighting - 
     repeating deconvolution')

Q:14 How can I customize AIPS++ on startup?

There are two possibilities:

     .glishrc

A Glish defaults file, .glishrc, can be located in your home directory. The .glishrc file can be used to customize Glish, such as to set search paths for Glish scripts, to set default precision on output, to start particular packages, etc. It can contain any valid Glish command. The two most important uses are tell Glish to use a particular directory for the search path for include files, and to limit the amount of output that Glish sends to the screen:

         
system.path.include:=
          '. /home/tarzan/tcornwel/aips++/libexec 
/aips++/beta/sun4sol_gnu/libexec'
system.print.limit:=10

.aipsrc An AIPS++ defaults file, .aipsrc, can be located in your home directory. This is used to hold global choices and information.

For example:

catalog.default: gui          
          #start a GUI catalog on startup
		
measures.default: gui       
          #start a GUI measures on startup
          
logger.default: screen       
          #use the screen for Logger messages
          
aipsview.numcolors: 200   
          #use 200 colors in Aips View palette

Q:15 The display looks empty.

Perhaps Netscape has gobbled up all the color table. You have two choices, either stop Netscape and restart it with the -install command-line option to require a private color map, or specify aipsrc variables to start Aips View with a smaller number of colors (see display).

Q:16 How do I change directory in Glish?

You can't at the moment. Instead, you'll have to exit from Glish, cd at the system prompt, and then restart AIPS++. An alternative is use file names with directories specified. We will add capabilitity to change directory in the future.

Q:17 Why is the Glish prompt sometimes - and sometimes +?

The statement that you entered is ambiguous. Usually entering a simple semi-colon will resolve it.

Q:18 Why do the contents of the AIPS++ windows sometimes behave strangely after the window is resized?

It is a "feature" of the Tk widget set that we use. Once any window is resized, the new size is taken to be fixed, and any subsequent changes to the contents are constrained to fit within the window size, instead of expanding it as necessary. The workaround is not to resize windows unless necessary.

Q:19 My display seems to have frozen up, but the Command Line window is still working.

A logic error in a GUI can result in this. First, at the Command Line window, type:

tk_release()

Try this a few times to see if the displays unfreeze. If so, then please submit a bug report if you think you know under what conditions the freeze occurred.

Q:20 AIPS++ just hangs, now what?.
Check that lockd is running on your NFS server.

Please E-mail any comments or questions about AIPS++ to aips2-request@nrao.edu.

Copyright 1995-2000,2002 Associated Universities Inc., Washington, D.C.


next up previous