next up previous contents index
Next: B Command Line Interface Up: Part III: Appendices Previous: Part III: Appendices

A The .wipinit File



WIP has set up most of the default attributes so that the user should not have to ``worry'' about them until they want to alter them to enhance their plot. There may be a time, however, when a user will want to customize characteristics a certain way. For example, suppose a user typically works with a tektronix device  . The hard coded device type is the /xwindow . To override this default device, the user could start WIP with the command  

wip -d /tek

every time they use WIP. Obviously, a simpler solution is desired. Placing the line
set device /tek

in the file .wipinit in the user's home directory will cause WIP to always act as if the hard coded initial device was a tektronix terminal.gif

An another example, suppose a user typically displays images with the x-axis representing Right Ascension and the y-axis Declination. Then, this user might like to have a call to box   without any arguments to correctly label the x-axis in hours, minutes, and seconds and the y-axis in degrees, minutes, and seconds. By default, WIP defines xbox  as the string ``BCNST'' and ybox  as ``BCNSTV'' (see Table 8.5 for an explanation of these characters). One alternative might be that the user would specify the string  variables xbox  and ybox 

set xbox bcnsthz

set ybox bcnstvdyz

whenever they entered WIP. A better alternative, however, would be for the user to specify these string variables in their .wipinit file as:
set xbox bcnsthz

set ybox bcnstvdyz.

Then, whenever WIP is started, these values will become the default values for the string variables xbox and ybox.

In addition to setting these variables, a user may also want to automatically load files containing macro     definitions or set other user variables   to certain values whenever WIP is started. A user should use caution when using the set command in their .wipinit file: calculations made with variables established by the device (e.g. X1, VY1, FILL, etc.) are undefined at this point and, hence, so are results based on their values. For this reason, the command set should generally be used cautiously in the user's .wipinit file except for string variables and the most rudimentary of calculations.

As an example of how to define macros automatically, suppose a user has a file named mymacro.wip that contains a macro definition that is used often. Placing the line

macro mymacro.wip

in the user's .wipinit file will automatically load the macro definitions from the named file every time WIP is started. Remember everything in the named file but macro definitions will be ignored by the macro command.

Table A.1: Acceptable commands in the .wipinit File

Table A.1 lists the commands and string variables that may be specified in your .wipinit file. Note that the user variable maxarray can only be set in the .wipinit file. This is because once these arrays are initialized, they can not have their maximum size changed. In addition, comments  may be placed anywhere in the .wipinit file as long as they begin with the comment character (#).  For a further explanation of how to define macros, see Chapter 7. The command set  and user variables  are discussed more fully in Chapter 8.

A typical .wipinit file might contain the following lines:

set device /xserve

set xbox BCNSTHZ
set ybox BCNSTVDYZ
set print lp -d ps -w
macro /myroot/subdir/macro1.wip
macro /myroot/macro2.wip

where the user has two files containing macros (/myroot/subdir/macro1.wip and /myroot/macro2.wip) that are always loaded whenever WIP begins. In addition, this example illustrates how to set the default graphics device to the /xserve X window driver; change the default arguments for the box command; and set the print command to send the plot (under Solaris) to the printer named ps with a notification to the user after it is printed.  

next up previous contents index
Next: B Command Line Interface Up: Part III: Appendices Previous: Part III: Appendices