Autoslit is used to create slit-masks for the LRIS instrument from a list of object positions. Given an input file of object positions and a parameter file to control the operation of the program, Autoslit may be used to automatically and/or interactively match slits of various shapes to a selection of the objects. Autoslit will produce output files for the LRIS slitmask mill machine and the slitmask alignment program.

Autoslit was developed by Judith Cohen and Patrick Shopbell, but it is currently distributed and supported by W.M. Keck Observatory.


Autoslit and a number of support files are available via the URL:

Autoslit Download Page


Pre-compiled binaries of Autoslit are available for a few platforms, including Linux (RedHat Enterprise 5), Mac OS X 10.6 Snow Leopard, and Oracle/Sun Solaris 10. These may be obtained from the binaries/ subdirectory at the above URLs.

Alternatively, the source may be retrieved and compiled locally. A Makefile is including for compiling Autoslit. The code should compile on most Unix systems, although it is currently developed on Mac OS X and RedHat Enterprise Linux hardware.

  1. Retireve and Unpack distribution
  2. The most recent source distribution for Autoslit may be retrieved at the link above.

    Autoslit is distributed as a gzipped tar file, that should be unpacked using the 'gunzip' utility from GNU and the Unix 'tar' utility:

             > gunzip autoslit.tar.gz
             > tar xvf autoslit.tar

    Alternatively, the version of 'tar' from GNU includes an option to use 'gunzip' directly:

             > tar zxvf autoslit.tar.gz

    This process will create a directory, autoslit-3.x, which contains the source code and example input files for Autoslit.

  3. Edit Makefile
  4. A few compile options may need to be adjusted in the Makefile:
    1. PGPLOT - The PGPLOT line graphics library is required; its location on your system should be noted in LIBPGPLOT. Autoslit 3.0 has been tested with PGPLOT 5.1, although other versions may work as well. If you do not have PGPLOT, it may be retrieved from:
    2. Compilers - Both C and FORTRAN compilers are required. Autoslit 3.0 has been tested with the SunPro 3.X compilers from Sun. The code should also compile with the 'gcc' and 'g77' compilers from GNU. To avoid complications, you should probably use the same FORTRAN compiler that was used to compile the PGPLOT library.
  5. Type 'make'.
  6. This will build the 'autoslit3' executable program. You may then install 'autoslit3' in the location of your choice. If it will be used by more than one person, this location on a Unix machine is often /usr/local/bin. The executable is the only file that is needed to run Autoslit. There are no support files, although you may want to keep this README file, as well as the user manual (autoslit3.doc) and the sample input files in the subdirectory Examples/, for later reference.


Autoslit 3.0 is entirely terminal-based, although a device capable of line graphics (e.g., Tek 4010 emulator, X Window System) is needed for interactive slit assignment. A PostScript printer is needed for printing the hardcopy plots of the final slit setup. Two files are required as input to Autoslit:
  1. parameter file

    This file contains parameters settings which control the behavior of Autoslit and define addition slit types. Autoslit will prompt the user for the name of this file.

    The parameter file consists of two sections, with a structure as follows:

             <keyword>  <value>
             <keyword>  <value>
             <slit definition block>
             <slit definition block>

    All words are case-insensitive, and spacing is not important.

    1. keyword section

      The keyword-value pairs may be given in any order. The seventeen possible keywords are as follows:

      	FILENAME  <name>	- name of input object file
      	FILEOUT   <name>	- root file name for output files
      	PRIORITY  <int>		- object priority to divide objects
      	RANK_TOP  [1|2]		- number of slit ranks in top half
      	RANK_BOT  [1|2]		- number of slit ranks in bottom half
      	SLIT_WID  <real>	- width of slits in arc-sec
      	SLIT_LEN  <real>	- minimum length of slits in arc-sec
      	SLIT_SEP  <real>	- separation of slits in arc-sec
      	EPOCH     <real>	- epoch for slitmask use
      	TEMP      <real>	- temperature for refraction calc in Celsius
      	PRESS     <real>	- pressure for refraction calc in mm of Hg
      	WAVE      <real>	- wavelength for refraction calc in Angstroms
      	LAT       <real>	- latitude of observatory in decimal degrees
      	POS_ANGL  <real>	- position angle in decimal degrees
      	HOUR_ANG  <real>	- hour angle in decimal degrees
      	MIRROR    <object>	- use guide star [DEPRECATED in v3.20]
      	ENG_TEST  <boolean>	- engineering test?
      	ADC       <boolean>	- atmospheric dispersion corrector in use?
      	INTERACT  <boolean>	- interactive slit assignment?
      	VERBOSE   <boolean>	- verbose output?

      For the values of the boolean keywords, any string beginning with one of the letters [tyTY] denotes true/yes, while any string beginning with one of the letters [fnFN] denotes false/no.

    2. slit definition section

      Autoslit 3.0 enables the use of four non-standard slit types: tilted slits, arc slits, line segment slits, and boxes. These slits are defined in the second section of the input parameter file. Definition blocks are structured as follows:

      1. tilted slits

        TILTS <int> <object> <pos angle> <min up> <min down> <object> <pos angle> <min up> <min down> ...

        The first line specifies the number of tilted slits to be defined. Each subsequent line defines one tilted slit. Each slit is defined by the name of the object on which the slit will be placed (from the input object file), the position angle of the slit, and the minimum extent of the slit in arc-seconds, above and below the position of the object.

      2. arc slits
        	    ARCS  <int>
        	    <name>  <ra>  <dec>  <epoch>  <radius>  <min pa>  <min pa>
        	    <name>  <ra>  <dec>  <epoch>  <radius>  <min pa>  <min pa>

        The first line specifies the number of arc slits to be defined. Each subsequent line defines one arc slit. Each slit is defined by a name (arc slits need not be placed on objects), the position of the center of curvature of the arc, the epoch of the center position coordinates, the radius of curvature, and the position angles of the ends of the slit. The RA and Dec of the center should each be defined by three numbers (hours|degrees, minutes, seconds), separated by whitespace. The radius should be positive for arcs to the right of the center, and negative for arcs to the left of the center. The slit will extend along the smallest arc between the specified position angles.

      3. line segment slits
        	    SEGMENTS  <int>
        	    <name1>  <ra>  <dec>  <epoch>
        	    <name1>  <ra>  <dec>  <epoch>
        	    <name1>  <ra>  <dec>  <epoch>
        	    <name2>  <ra>  <dec>  <epoch>
        	    <name2>  <ra>  <dec>  <epoch>
        	    <name2>  <ra>  <dec>  <epoch>
        	    <name2>  <ra>  <dec>  <epoch>

        The first line specifies the number of points to be defined for line segment slits. Each subsequent line defines one point in a line segment slit. Each point is defined by the name of the line segment slit (line segment slits are not placed on objects), the position of the point, and the epoch of the position coordinates. All consecutive line segment points which share the same slit name will be connected to form a single slit. For example, the above declaration would create two slits, one with 3 points (name1), and another with 4 points (name2). See the file Examples/ for more examples. Note that the value on the first line of the block indicates the number of points in the line segment slits, not the number of slits.

      4. box slits
        	    BOXES  <int>
        	    <object>  <size>
        	    <object>  <size>

        The first line specifies the number of box slits to be defined. Each subsequent line defines one box slit. Each slit is defined by the name of the object on which the slit will be placed (from the input object file), and the size of the box, in arc-seconds.

        The order of the slit definition blocks does not matter. Multiple definition blocks are also allowed, i.e., two sets of arc slits. The only requirement is that the number of slit definition lines in any given block must match the number given on the declaration line, i.e., 'ARCS 4' must be followed by 4 arc slit definitions.

  2. object list

    This file must contain one-line descriptions of each object of interest in the field, in a format identical to that used for Palomar Observatory's Norris spectrograph. This format is described in more detail in the file GET_OBJ.C, but is summarized as follows:

    Each object description line consists of:

    <name> <prior> <mag> <ra> <dec> <epoch> <equinox> <ra_pm> <dec_pm>


    	<name>    = object identifier (or name)
    	<prior>   = object priority as assigned by the observer
    	<mag>     = object magnitude
    	<ra>      = object right ascension: <hours> <minutes> <seconds>
    	<dec>     = object declination: <degrees> <minutes> <seconds>
    	<epoch>   = epoch of the object's coordinates
    	<equinox> = object equinox
    	<ra_pm>   = object proper motion in right ascension in arcsec/yr
    	<dec_pm>  = object proper motion in declination in arcsec/yr

    Although the order of the fields is important, spacing between the fields does not matter.

    The lines may be given in any order, *except* the first line, which should have a priority of '9999' and should provide the coordinates of the center of the field of interest.


Comments, suggestions, reports of bugs, etc. should be directed to .

Modification History

This list tracks modifications to autoslit 3.0.

3.20 Mar-30-2011

  1. Deprecated MIRROR keyword in input file.
  2. Removed central bar - both plotting and slit overlap checks.
  3. Added plotting of both blue and red chip gaps.
  4. Added slit overlap checks for both chip gaps - issue warning only.
  5. Changed default epoch from current date to epoch specified for field center in object file. EPOCH keyword can still be used to over-ride.
  6. Added output of a fourth file, which is a ds9 region file. It can be loaded into the ds9 image viewer to draw the slits on top of a WCS-enabled image of the field. [This idea was contributed by Andrew Newman, and the output style matches closely his own program for translating autoslit output to a region file.]
  7. Updated help file.
  8. Updated Makefile and verified that support architectures are:
  9. Updated version number in

3.10 Mar-18-2010

  1. Updated version number in (forgot for 3.09!).
  2. Updated Makefile to use gcc 4.x + gfortran as default compiler.
  3. Removed support for Mac OS X 10.3 and Sun OS 4.x from Makefile.
  4. Updated #ifdef in C source to support change in C+Fortran mixing with gcc 4.x.

3.09 Jan-24-2007

  1. Added support for rescaling from use of the atmospheric dispersion corrector (keyword: ADC).
  2. Changed architecture-specific compiler keyword "__APPLE__", to account for new behavior with Mac OS X 10.4 (Tiger) and gcc 4.x.

3.08 Apr-21-2005

  1. Minor modifications to compile on Mac OS X 10.3.

3.07 Aug-19-2002

  1. More minor modifications to compile on Linux.

3.06 Jan-17-2001

  1. Modified Makefile slightly to compile checkmask3 properly.
  2. Modified output routines in obscure case of dec = -0.xxxx.
  3. Minor modifications to compile on Linux.

3.05 Apr-16-1998

  1. Fixed GET_HOST to not crash if DNS does not return host name.
  2. Updated SLIT_SEP example in documentation from mm to arc-sec.
  3. Fixed header temperature label from [K] to [C].
  4. Corrected a number of typos in autoslit3.doc.
  5. Corrected a typo in
  6. Fixed documentation error regarding units of HOUR_ANG.

3.04 Jan-14-1998

  1. Fixed minor bug associated with boxes and arcs near the central bar.

3.03 Oct-20-1997

  1. Added updated documentation file, autoslit3.doc.
  2. Re-organized file and subdirectory structure.
  3. Added check_mask3 and tilted_slit programs.
  4. Added option to specify input file on command line.
  5. Renamed default input parameter file to
  6. Added default input object file name as autoslit.obj.
  7. Both H and ? can be used for interactive mode help.

3.02 Oct-16-1997

  1. Increased precision of COSD/SIND calculation in WRITE_SETUP().
  2. Fixed major bug regarding lengthening of bottom-most slit.
  3. Added "add box slit" (B) command to support adding box slits interactively.
  4. Fixed bug in header output of southern hemisphere field.
  5. Adjusted ASSIGN_SLITS() to remove compile-time warning.
  6. Changed precession to work on object equinoxes, rather than epochs.

3.01 Sep-08-1997

  1. Fixed typo bug in SLIT_OK() call in ADD_SLIT().
  2. Blank lines in output setup file surrounded by delimiters, for alignment program.
  3. Tilted slits (as well as standard slits) are now lengthened.
  4. Added options in Makefile to compile with OpenWindows libraries.

3.00 Sep-05-1997

  1. official version 3.0 released