There are various levels of customization of aipsview. Some type of customization can be implemented as environment variables, X-defaults resources, command line switches, and configuration files. Where it is possible to carry out the same customization in more than one manner, variables in the configuration files override, command line switches, which override X-defaults variables, which in turn override environment variables.
Several environment variables have been defined for customization of
aipsview functionality. These control the display colors and
hardcopy output file and device defaults. Environment variables may
be set each time you start aipsview by typing setenv
variable name
value
, or by putting these in
your .cshrc file.
| AVAILABLE | Use all currently non allocated colors (default). |
| BW | Use all but colors allocated as black pixel and white pixel. |
| ALL | Use all colors in colormap. |
| <#> | Use <#> colors, where <#> is between 0 and the maximum number of colors. |
Thus, setenv AV_PAL_NUMCOLORS 224 will cause aipsview to use 224 of the 256 colors generally available. If you want to get the maximum number of colors for image display but still be able to see aipsview text, it is strongly recommended that you use setenv AV_PAL_NUMCOLORS BW and start aipsview with aipsview -bg white (n.b., the default text or foreground color is black).
If AV_PAL_NUMCOLORS is set high enough that the black and white pixels are changeable, aipsview automatically assumes AV_CLIPTO_COLOR is 1.
| /PS | PostScript file, landscape orientation. |
| /VPS | PostScript file, portrait orientation. |
| /CPS | Color PostScript file, landscape orientation. |
| /VCPS | Color PostScript file, portrait orientation (default). |
If you wish, you may use a resource file for aipsview; instructions for doing this follow. If you are not familiar with X resource files, you might want to get your local guru to help. Note that although a resource file may be convenient for you, it is not necessary to use a resource file into order to run aipsview. A sample resource file (with the aipsview defaults specified) follows. An exclamation mark at the start of a line indicates a comment. To set your preferences for a particular resource, edit the value of the X resource variable. In order for the resource file to take effect, you can either merge it with your .Xdefaults file or place it in your own application defaults directory.
An example of how to create your own application defaults directory is the following (assuming you use csh):
Create a directory to put application default files into:
mkdir $HOME/.xdefaults
Copy the sample aipsview default file (below) to the $HOME/.xdefaults directory and call it aipsview.
Edit your .cshrc file to add ONE of these environment variables:
setenv XAPPLRESDIR $HOME/.xdefaults/ (note the trailing slash),
or
setenv XUSERFILESEARCHPATH $HOME/.xdefaults/%N
The first provides a directory to look for, the second is a path which can contain multiple directories. After editing the file, either log in again, execute source .cshrc, or just type the setenv command. The file will be read whenever you run aipsview.
If you merge this file with your .Xdefaults file, the values will be in effect whenever you display aipsview on the system running the X server that read the .Xdefaults file. If you create an application defaults directory, defaults in the directory are read when you run aipsview on the machine with the directory.
For more information, try man X and read the subsection application-specific files. The OPTIONS section gives some standard X command-line arguments.
! -------- AIPSVIEW DEFAULTS FILE ------- ! ------------- DIRECTORIES ------------- ! The directories where aipsview will look for data files and palettes. *DataDirectory: /home/monet/baker/Data *PaletteDirectory: /home/monet/baker/Palettes ! ------- WINDOW SIZES (pixels) --------- ! Height, width, and size (size sets height and width) of the image window. *DisplayHeight: 256 *DisplayWidth: 256 *DisplaySize: 256 ! Height and width of the X profile window. *xProfile.height: 512 *xProfile.width: 512 ! Height and width of the PGPLOT profile window. *pgProfile.height: 512 *pgProfile.width: 512 ! ---------------- COLORS --------------- ! Background and foreground colors for all parts of aipsview. *background: gray *foreground: black ! Color to use when a toggle button is selected. *XmToggleButtonGadget.selectColor: yellow ! Foreground color for any arrow buttons. *ArrowButton.foreground: gray ! Background color for X profiles. *xProfile.background: blue ! ----------------- MISC ----------------- ! Force aipsview to default to building the data panel outside of the ! image window. *InfoPanel: OUTSIDE ! The colorVerbosity variable turns on reporting of colors used. ! Possible choices are: ! 0 no output ! 1 limited output ! 2 slightly more verbose output ! Numbers greater than 2 are not currently used. A value of 1 will ! print something like: ! # RO colors = 204. # RW colors = 27. # unallocated colors = 25. ! Which says that aipsview has allocated 204 colors as read only (RO), ! the image has been allocated 27 writable (RW) colors and there were ! 25 unallocated colors available for widgets. A value of 2 will ! report a slightly more verbose output: ! # RO colors = 204. # RW colors = 27. # unallocated colors = 25. ! System CMAP is using 204 of 256 colors. ! numColors=0 minColors=16 numFreeColors=25 *colorVerbosity: 1 ! Designate the default PGPLOT display device. Possible choices are: ! /PS PostScript file, landscape orientation. ! /VPS PostScript file, portrait orientation. ! /CPS Color PostScript file, landscape orientation. ! /VCPS Color PostScript file, portrait orientation (default). *pgDevice: /VCPS ! ---------------- FONTS ---------------- ! Designate particular fonts for aipsview. *fontList: -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-* *menuBar*fontList: -*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-* *FontPlain*fontList: -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-* *FontBold*fontList: -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-* *FontItalic*fontList: -*-helvetica-medium-o-normal-*-14-*-*-*-*-*-*-* *FontBoldItalic*fontList: -*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*
Standard X Window command line switches, such as changing the default foreground and background colors, will work. For example, you can start aipsview with yellow text on a light blue background typing aipsview -fg yellow -bg lightblue. Standard color names available on your machine can be found by typing showrgb at a system prompt.
There are several command line switches that set some global variables for aipsview. They override the corresponding variables in the X-defaults file. The following table shows the switches, the corresponding X-defaults resource and a short description.
| Switch | Argument | Resource | Description |
|---|---|---|---|
| -numColors | (1) | N/A | Number of colormap colors to use. |
| -minColors | <colors> | N/A | Minimum number of colors to allocate to image. Can't be set to less than 8. |
| -numFreeColors | <colors> | N/A | Number of colors to leave free. |
| -colorVerbosity | <level> | colorVerbosity | Colormap information aipsview reports. |
| -displayHeight | <height> | DisplayHeight | Initial width of image window. |
| -displaySize | <size> | DisplaySize | Set image window to be <size> x <size>. |
| -pgDevice | <device name> | pgDevice | Use <device name> as PGPLOT output. |
| AVAILABLE | Use all currently non allocated colors (default). |
| BW | Use all but colors allocated as black pixel and white pixel. |
| ALL | Use all colors in colormap. |
| <#> | Use <#> colors, where <#> is between 0 and the maximum number of colors. |
Here is an annotated example of an .aipsviewrc file:
# If the levels variable does not exist, nlevels is used to tell aipsview
# how many contour levels to generate. If levels exists, nlevels is
# ignored.
set aipsview(contour,nlevels) 4
# Note that there are no commas in the list of values.
set aipsview(contour,levels) { .1 .3 .5 .7 .9 }
set aipsview(contour,levelScale) 1.0
set aipsview(contour,levelsAreFractional) FALSE
# lineStyle can be one of SOLID, DASHED or DASHEDifNEGATIVE. DASHED really
# means look in the lineStyles array for a list containing the above three
# values.
set aipsview(contour,lineStyle) DASHEDifNEGATIVE
set aipsview(contour,lineStyles) DASHED SOLID DASHED SOLID
# This sets the Enable Blanking toggle of the contour window.
set aipsview(contour,blankingEnabled) TRUE
# This sets the Immediate Update toggle of the contour window.
set aipsview(contour,immediateUpdate) FALSE
# colorStyle can be one of RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW,
# BLACK, WHITE OR MIXED. If it is MIXED, aipsview looks in the colorStyles
# array for a list of colors. MIXED is not valid in the colorStyles array.
set aipsview(contour,colorStyle) MIXED
set aipsview(contour,colorStyles) { WHITE RED GREEN BLUE CYAN MAGENTA YELLOW }
set aipsview(contour,labelContours) FALSE
set aipsview(contour,drawContours) TRUE
set aipsview(contour,drawTitle) FALSE
#
# The following are configurations for an individual data set
# (smallcube.fits).
#
# Change the number of marker type toggles for the profile hardcopy of
# the smallcube data set.
set smallcube.fits(profile,numMarkerToggleTypes) 16
# Let aipsview assign toggle type for toggles 0-13, but use Hershey's
# symbols 864 and 745 for markers 14 and 15, respectively.
set smallcube.fits(profile,markerToggleType14) 864
set smallcube.fits(profile,markerToggleType15) 745
# Specify the emphasis color for contours.
set smallcube.fits(contour,emphasisColor) RED
# Set the number of Markers and Captions to zero.
set smallcube.fits(imageAxis,numMarkers) 0
set smallcube.fits(imageAxis,numCaptions) 0
Notes on configuration files: