aboutsummaryrefslogtreecommitdiff
path: root/noao/nproto/doc
diff options
context:
space:
mode:
Diffstat (limited to 'noao/nproto/doc')
-rw-r--r--noao/nproto/doc/binpairs.hlp54
-rw-r--r--noao/nproto/doc/findgain.hlp131
-rw-r--r--noao/nproto/doc/findthresh.hlp128
-rw-r--r--noao/nproto/doc/iralign.hlp220
-rw-r--r--noao/nproto/doc/irmatch1d.hlp211
-rw-r--r--noao/nproto/doc/irmatch2d.hlp212
-rw-r--r--noao/nproto/doc/irmosaic.hlp157
-rw-r--r--noao/nproto/doc/linpol.hlp164
-rw-r--r--noao/nproto/doc/mkms.hlp63
-rw-r--r--noao/nproto/doc/skygroup.hlp131
-rw-r--r--noao/nproto/doc/skysep.hlp64
-rw-r--r--noao/nproto/doc/slitpic.hlp63
12 files changed, 1598 insertions, 0 deletions
diff --git a/noao/nproto/doc/binpairs.hlp b/noao/nproto/doc/binpairs.hlp
new file mode 100644
index 00000000..09a019d0
--- /dev/null
+++ b/noao/nproto/doc/binpairs.hlp
@@ -0,0 +1,54 @@
+.help binpairs Oct84 noao.nproto
+.ih
+NAME
+binpairs -- Bin pairs of (x,y) points in log separation
+.ih
+USAGE
+binpairs file1 file2 rmin rmax nbins
+.ih
+PARAMETERS
+.ls file1
+File containing (x,y) points to be paired.
+.le
+.ls file2
+File containing (x,y) points to be paired. This file may be the same
+as file1.
+.le
+.ls rmin
+The minimum separation to be binned.
+.le
+.ls rmax
+The maximum separation to be binned.
+.le
+.ls nbins
+The number of log separation bins to be computed.
+.le
+.ls verbose = no
+Print progress information?
+.le
+.ih
+DESCRIPTION
+The (x,y) points in the specified files are paired and the number of pairs
+in each bin of log separation is computed and output. The two files may
+be the same. There are
+\fInbins\fR separation bins between the separations \fIrmin\fR and \fIrmax\fR.
+If the verbose parameter is yes then progress information is printed on the
+standard error output at intervals of 5% of the time.
+The output consists of the lower limit of the separation bin, the number of
+pairs in the bin, the number of pairs divided by the total number of pairs,
+and the annular area of the bin.
+
+This task is useful for computing two point correlation functions.
+.ih
+EXAMPLES
+
+.nf
+ cl> binpairs data1 data2 .01 1 20 >> result
+
+ or
+
+ cl> binpairs data data .01 1 20 >> result
+.fi
+.ih
+SEE ALSO
+.endhelp
diff --git a/noao/nproto/doc/findgain.hlp b/noao/nproto/doc/findgain.hlp
new file mode 100644
index 00000000..3c730007
--- /dev/null
+++ b/noao/nproto/doc/findgain.hlp
@@ -0,0 +1,131 @@
+.help findgain Apr92 noao.nproto
+.ih
+NAME
+findgain -- calculate the gain and readout noise of a CCD
+.ih
+USAGE
+findgain flat1 flat2 bias1 bias2
+.ih
+PARAMETERS
+.ls flat1, flat2
+First and second dome flats.
+.le
+.ls bias1, bias2
+First and second bias frames (zero length dark exposures).
+.le
+.ls section = "[*,*]"
+The selected image section for the statistics. This should be chosen
+to exclude bad columns or rows, cosmic rays and other blemishes, and
+the overscan region. The flat field iillumination should be constant
+over this section. Special care should be taken with spectral data!
+.le
+.ls center = "mean"
+The statistical measure of central tendency that is used to estimate
+the data level of each image. This can have the values: \fBmean\fR,
+\fBmidpt\fR, or \fBmode\fR. These are calculated using the same
+algorithm as the IMSTATISTICS task.
+.le
+.ls binwidth = 0.1
+The bin width of the histogram (in sigma) that is used to estimate the
+\fBmidpt\fR or \fBmode\fR of the data section in each image.
+The default case of center=\fBmean\fR does not use this parameter.
+.le
+.ls verbose = yes
+Label the gain and readnoise on output, rather than print them two per
+line?
+.le
+.ih
+DESCRIPTION
+FINDGAIN uses Janesick's method for determining the gain and read noise
+of a CCD from a pair of dome flats and a pair of bias frames (zero
+length dark exposures). The task requires that the flats and biases be
+unprocessed and uncoadded so that the noise characteristics of the data
+are preserved. Note, however, that the frames may be bias subtracted
+if the average of many bias frames is used, and that the overscan
+region may be removed prior to using this task.
+
+The section over which the statistics are computed should be chosen
+carefully. The frames may be displayed and perhaps blinked, and
+IMSTATISTICS, IMHISTOGRAM, IMPLOT, and other tasks may be used to
+compare the statistics of sections of various flats and biases directly.
+.ih
+ALGORITHM
+The formulae used by the task are:
+
+.nf
+ flatdif = flat1 - flat2
+
+ biasdif = bias1 - bias2
+
+ gain = ((mean(flat1) + mean(flat2)) - (mean(bias1) + mean(bias2))) /
+ ((sigma(flatdif))**2 - (sigma(biasdif))**2 )
+
+ readnoise = gain * sigma(biasdif) / sqrt(2)
+.fi
+
+Where the gain is given in electrons per ADU and the readnoise in
+electrons. Pairs of each type of comparison frame are used to reduce
+the effects of gain variations from pixel to pixel. The derivation
+follows from the definition of the gain (N(e) = gain * N(ADU)) and from
+simple error propagation. Also note that the measured variance
+(sigma**2) is related to the exposure level and read-noise variance
+(sigma(readout)**2) as follows:
+
+.nf
+ variance(e) = N(e) + variance(readout)
+.fi
+
+Where N(e) is the number of electrons (above the bias level) in a
+given duration exposure.
+
+In our implementation, the \fBmean\fR used in the formula for the gain
+may actually be any of the \fBmean\fR, \fBmidpt\fR (an estimate of the
+median), or \fBmode\fR as determined by the \fBcenter\fR parameter.
+For the \fBmidpt\fR or \fBmode\fR choices only, the value of the
+\fBbinwidth\fR parameter determines the bin width (in sigma) of the
+histogram that is used in the calculation. FINDGAIN uses the
+IMSTATISTICS task to compute the statistics.
+.ih
+EXAMPLES
+To calculate the gain and readnoise within a 100x100 section:
+
+.nf
+ lo> findgain flat1 flat2 bias1 bias2 section="[271:370,361:460]"
+.fi
+
+To calculate the gain and readnoise using the mode to estimate the data
+level for each image section:
+
+.nf
+ lo> findgain.section="[271:370,361:460]"
+ lo> findgain flat1 flat2 bias1 bias2 center=mode
+.fi
+
+To calculate the gain and readnoise from several frames and accumulate
+the results in a file for graphing:
+
+.nf
+ lo> findgain.section = "[41:140,171:270]"
+ lo> findgain flat1 flat2 bias1 bias2 verbose- > gain.list
+ lo> findgain flat3 flat4 bias3 bias4 verbose- >> gain.list
+ lo> findgain flat5 flat6 bias5 bias6 verbose- >> gain.list
+ lo> findgain flat7 flat8 bias7 bias8 verbose- >> gain.list
+ lo> findgain flat9 flat10 bias9 bias10 verbose- >> gain.list
+ lo> plot
+ pl> graph gain.list point+
+.fi
+
+It is not obvious what to do with all the other combinations of flats
+and biases. Note that the values in gain.list could have been averaged
+or fit as well.
+.ih
+BUGS
+The image headers are not checked to see if the frames have been
+processed.
+
+There is no provision for finding the "best" values and their errors
+from several flats and biases.
+.ih
+SEE ALSO
+findthresh, imstatistics, imhistogram, implot
+.endhelp
diff --git a/noao/nproto/doc/findthresh.hlp b/noao/nproto/doc/findthresh.hlp
new file mode 100644
index 00000000..386d25c1
--- /dev/null
+++ b/noao/nproto/doc/findthresh.hlp
@@ -0,0 +1,128 @@
+.help findthresh Apr92 noao.nproto
+.ih
+NAME
+findthresh -- Estimate the background noise level of a CCD
+.ih
+USAGE
+findthresh data
+.ih
+PARAMETERS
+.ls data
+The level of the sky (or any other data level, for that matter) in A/D
+units, for which the random error is to be estimated. If this is not
+given on the command line and a list of \fBimages\fR is specified then
+the data level will be measured from the images.
+.le
+.ls images = ""
+If not NULL ("") and if \fBdata\fR is not specified, this is a list of
+images whose random background error per pixel is to be estimated.
+.le
+.ls section = "[*,*]"
+The selected image section for the statistics. This should be chosen
+to exclude bad columns or rows, cosmic rays, and other blemishes.
+.le
+.ls gain
+The CCD gain in electrons/ADU.
+This may be estimated using the FINDGAIN task.
+.le
+.ls readnoise
+The CCD read noise in electrons.
+This may be estimated using the FINDGAIN task.
+.le
+.ls nframes = 1
+The number of raw data frames that were coadded or averaged
+to produce the \fBimages\fR. If this is not set to 1, the
+\fBcoaddtype\fR parameter must also be set to the proper value.
+.le
+.ls coaddtype = "average"
+For coadded frames (\fBnframes\fR > 1) the type of combination
+that was done, either "average" or "sum".
+.le
+.ls center = "mean"
+The statistical measure of central tendency that is used to estimate
+the data level of each image. This can have the values: \fBmean\fR,
+\fBmidpt\fR, or \fBmode\fR. These are calculated using the same
+algorithm as the IMSTATISTICS task.
+.le
+.ls binwidth = 0.1
+The bin width of the histogram (in sigma) that is used to estimate the
+\fBmidpt\fR or \fBmode\fR of the data section in each image.
+The default case of center=\fBmean\fR does not use this parameter.
+.le
+.ls verbose = yes
+Label the computed and measured background noise on output,
+rather than print them two per line?
+.le
+.ih
+DESCRIPTION
+FINDTHRESH can be used to estimate the expected random error per pixel
+(in ADU) of the sky background of a CCD image, given the \fBgain\fR (in
+electrons per ADU) and \fBreadnoise\fR (in electrons) of the CCD. The
+sky background (or any other data level of interest) can be specified
+directly with the \fBdata\fR parameter, or the representative values can
+be measured from a specified list of \fBimages\fR as also governed by
+the \fBsection\fR, \fBcenter\fR, and \fBbinwidth\fR parameters.
+FINDTHRESH can be used with processed frames that are the coaddition or
+average of several raw images by choosing the correct values for the
+\fBnframes\fR and \fBcoaddtype\fR parameters. In this case
+(\fBnframes\fR > 1), the effective gain and effective readnoise of the
+coadded frames will also be printed out.
+
+The section over which the statistics of the \fBimages\fR are computed
+should be chosen carefully. The frames may be displayed and perhaps
+blinked, and IMSTATISTICS, IMHISTOGRAM, IMPLOT, and other tasks may be
+used to compare the statistics of various sections of the images directly.
+.ih
+ALGORITHM
+The formula used by the task is:
+
+.nf
+ random error in 1 pixel = sqrt (data*p(N) + r(N)**2) / p(N)
+.fi
+
+Where the effective gain, p(N), is given in electrons per ADU and
+the effective readnoise, r(N), is given in electrons. The effective
+gain and readnoise are calculated from the intrinsic \fBgain\fR and
+\fBreadnoise\fR, specified as parameters to the task, by the relations:
+
+.nf
+ p(N) = N * \fBgain\fR (only if the frames were \fBaveraged\fR)
+ r(N) = sqrt(N) * \fBreadnoise\fR (whether averaged \fBor\fR summed frames)
+.fi
+
+In our implementation, the level of the sky can be calculated using any
+of the \fBmean\fR, \fBmidpt\fR (an estimate of the median), or \fBmode\fR
+as determined by the \fBcenter\fR parameter. For the \fBmidpt\fR or
+\fBmode\fR choices only, the value of the \fBbinwidth\fR parameter
+determines the bin width (in sigma) of the histogram that is used in
+the calculation. FINDTHRESH uses the IMSTATISTICS task to measure the
+statistics.
+.ih
+EXAMPLES
+To estimate the CCD background noise at a specified data level, gain and
+readnoise (note that you will be prompted for the gain and the readnoise
+if you don't set them either explicitly on the command line, or previously
+using, for example, eparam):
+
+.nf
+ lo> findthresh 100 gain=2.3 readnoise=13.
+.fi
+
+To estimate the CCD background noise within a 100x100 section
+of a list of images, data*.imh:
+
+.nf
+ lo> findthresh data*.imh section="[271:370,361:460]"
+.fi
+
+To estimate the CCD background noise using the mode to estimate the
+sky level for each image section:
+
+.nf
+ lo> findthresh.section="[271:370,361:460]"
+ lo> findthresh data*.imh center=mode
+.fi
+.ih
+SEE ALSO
+findgain, imstatistics, imhistogram
+.endhelp
diff --git a/noao/nproto/doc/iralign.hlp b/noao/nproto/doc/iralign.hlp
new file mode 100644
index 00000000..34ec5a5a
--- /dev/null
+++ b/noao/nproto/doc/iralign.hlp
@@ -0,0 +1,220 @@
+.help iralign Sep93 noao.nproto
+.ih
+NAME
+iralign -- align the elements of the mosaiced image
+.ih
+USAGE
+iralign input output database coords
+.ih
+PARAMETERS
+.ls input
+The mosaiced image written by IRMOSAIC.
+.le
+.ls output
+The output aligned image.
+.le
+.ls database
+The database file written by IRMOSAIC.
+.le
+.ls coords
+If \fIalignment\fR = "coords", then \fBcoords\fR is
+a text file containing the x and y coordinates, measured in the input
+mosaiced image, of reference objects common
+to adjacent subrasters in the input mosaiced
+image. The reference coordinates are written with the following format:
+line 1) the x and y coordinates of an object in the any subraster,
+line 2) the x and y coordinates of the same object in any adjacent subraster,
+line 3) the x and y coordinates of another object in the any subraster,
+line 4) the x and y coordinates of the same object in any adjacent subraster,
+etc.
+If \fIalignment\fR = "file", then \fBcoords\fR is a text file containing
+the x and y shifts in columns 1 and 2 respectively,
+of each subraster relative to the reference subraster, in the order
+in which the subrasters were written into the mosaiced input image.
+This option can be used to make fine adjustments to the output aligned image
+by manually editing the computed shifts and rerunning
+IRALIGN with the new shifts.
+.le
+.ls xshift
+The x shift in pixels used if \fIalignment\fR = "shifts".
+.le
+.ls yshift
+The y shift in pixels used if \fIalignment\fR = "shifts".
+.le
+.ls alignment = "coords"
+The method of aligning the subraster.
+.ls coords
+The x and y positions of the reference points common to adjacent subrasters
+in the input mosaiced image are listed in a text file as described
+under the help for the \fIcoords\fR parameter.
+.le
+.ls shifts
+The x and y shifts of each subraster with respect to its neighbour are
+set to \fIxshift\fR and \fIyshift\fR.
+.le
+.ls file
+The x and y shifts of each input subraster with respect to the
+reference subraster image are listed in a text file as described
+under the help for the \fIcoords\fR parameter.
+.le
+.le
+.ls nxrsub = INDEF, ls nyrsub = INDEF
+The column and row index of the reference subraster.
+The default reference subraster is the central subraster.
+.le
+.ls xref = 0, yref = 0
+The x and y offset of the reference
+subraster in the output aligned image.
+By default the reference subraster occupies the same position in
+the output image that it does in the input image.
+.le
+.ls trimlimits = "[1:1,1:1]"
+The number of columns or rows to trim off each edge of each input subraster
+before inserting it in the output image, specified in image section notation.
+The default action is to trim 1 column or line at each edge of the subraster.
+.le
+.ls nimcols = INDEF, nimlines = INDEF
+The number of columns and lines in the output image. The defaults are the
+number of columns and lines in the input image.
+.le
+.ls oval = INDEF
+The value of undefined pixels in the output image. The default is the value
+stored in the database file written by IRMOSAIC.
+.le
+.ls interpolant = linear
+The type of interpolant used to shift the subrasters. The options are:
+.ls nearest
+Nearest neighbour interpolation.
+.le
+.ls linear
+Bilinear interpolation.
+.le
+.ls poly3
+Bicubic polynomial interpolation.
+.le
+.ls poly5
+Biquintic polynomial interpolation.
+.le
+.ls spline3
+Bicubic spline interpolation.
+.le
+.le
+.ls verbose = yes
+Print messages on the terminal describing the progress of the task?
+.le
+.ih
+DESCRIPTION
+IRALIGN takes the mosaiced image \fIinput\fR and database
+\fIdatabase\fR files
+written by IRMOSAIC, and a list of reference object
+coordinates \fIcoords\fR created by the user, and writes
+an output image \fIoutput\fR in which all the subrasters are aligned
+with respect to a reference subraster.
+
+If \fIalignment\fR = "coords", IRALIGN accumulates the relative shifts
+between adjacent subrasters defined by the data in \fIcoords\fR,
+into a total shift for each subraster with respect to the reference subraster.
+Relative shifts defined for non-adjacent subrasters are ignored.
+For those subrasters which have no relative shift information,
+IRALIGN makes a best guess at the relative x and y shifts
+based on the relative x andy shifts of nearby subrasters
+which do have relative shift information. If the x and y shifts
+are sufficiently uniform over the whole input image the user may set
+\fIalignment\fR to "shifts" and supply values for
+\fIxshift\fR and \fIyshift\fR.
+Alternatively the total shifts may be read directly from the file \fIcoords\fR
+if \fIalignment\fR = "file".
+
+Coordinate lists for the \fIalignment\fR = "coords" option,
+may be generated interactively using the RIMCURSOR,
+or APPHOT package CENTER and APSELECT tasks. For example a coordinate list
+written by RIMCURSOR for a
+4 by 4 mosaic of 51 by 51 pixel square images containing a single
+reference object common to all the subrasters might look like the following.
+
+.nf
+41.3 42.6 1 \40 # coordinates of ref object in subraster 1
+62.0 38.5 1 \40 # coordinates of ref object in subraster 2
+41.3 42.6 1 \40 # coordinates of ref object in subraster 1
+38.1 95.8 1 \40 # coordinates of ref object in subraster 3
+62.0 38.5 1 \40 # coordinates of ref object in subraster 2
+70.3 89.0 1 \40 # coordinates of ref object in subraster 4
+38.1 95.8 1 \40 # coordinates of ref object in subraster 3
+70.3 89.0 1 \40 # coordinates of ref object in subraster 4
+.fi
+
+In this example subrasters 1 and 2 are in the lower-left and
+lower-right hand corners of
+the mosaiced image respectively, while subrasters 3 and 4 are in the
+upper-left and upper- right hand corner of the mosaiced image.
+Any number of reference objects may be used.
+
+The subrasters are inserted into the output image using the
+interpolation scheme defined by
+\fIinterpolant\fR, and aligned with reference to the subraster defined
+by \fInxrsub\fR and \fInyrsub\fR, using the shifts defined by
+the data in the file \fIcoords\fR or defined by \fIxshift\fR and
+\fIyshift\fR. Subrasters are inserted into the output image in the order
+they were placed in the original mosaic with pixels in the most recently
+placed subrasters replacing those in earlier placed ones in the overlap regions.
+Undefined pixels in the output image
+are assigned the value \fIoval\fR. The position of the reference subraster
+in the output image may be adjusted by setting the offset parameters
+\fIxref\fR and \fIyref\fR. The edges of each subraster may be trimmed
+before insertion into the output image by setting the \fItrimlimits\fR
+parameter.
+
+.ih
+EXAMPLES
+
+1. Align an 8 by 8 mosaic with respect to subraster 6, 5.
+
+.nf
+ pr> iralign mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5
+.fi
+
+2. Align an 8 by 8 mosaic as in example 1 above but shift the position of the
+reference subraster in the output image by 2 pixels in x and 3 pixels
+in y.
+
+.nf
+ pr> iralign mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 xref=2 yref=3
+.fi
+
+3. Align an 8 by 8 mosaic as 1 above but trim 2 rows and columns off
+of each input subraster before inserting it into the output image.
+
+.nf
+ pr> iralign mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 trimlimits="[2:2,2:2]"
+.fi
+
+4. Rerun the above example saving the verbose output in a file. Use the
+PROTO package FIELDS task to select the xshift, yshift and intensity
+shift fields, edit the shifts manually and rerun IRALIGN with the
+new shifts.
+
+.nf
+ pr> iralign mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 trimlimits="[2:2,2:2]" > shifts1
+
+ pr> fields shifts1 3,4,6 > shifts2
+
+ pr> edit shifts2
+
+ ... make whatever changes are desired
+
+ pr> iralign mosaic mosaic.al.2 mosaic.db shifts2 align=file \
+ nxrsub=6 nyrsub=5 trimlimits="[2:2,2:2]"
+.fi
+
+.ih
+TIME REQUIREMENTS
+.ih
+BUGS
+.ih
+SEE ALSO
+irmosaic, apphot.center, apphot.apselect, irmatch1d, irmatch2d
+.endhelp
diff --git a/noao/nproto/doc/irmatch1d.hlp b/noao/nproto/doc/irmatch1d.hlp
new file mode 100644
index 00000000..221d75cd
--- /dev/null
+++ b/noao/nproto/doc/irmatch1d.hlp
@@ -0,0 +1,211 @@
+.help irmatch1d Jan90 noao.nproto
+.ih
+NAME
+irmatch1d -- align and match the elements of the mosaiced image
+.ih
+USAGE
+irmatch1d input output database coords
+.ih
+PARAMETERS
+.ls input
+The mosaiced image to be aligned. This image must have been produced by
+the IRMOSAIC task and have an accompanying database file specified by
+\fIdatabase\fR.
+.le
+.ls output
+The aligned image produced by IRMATCH1D.
+.le
+.ls database
+The database file from the IRMOSAIC task.
+.le
+.ls coords
+If \fIalignment\fR = "coords", then \fBcoords\fR is
+a text file listing the coordinates of objects in the input
+image one object per line in the following
+format: 1) the x and y coordinates of the object in the first subraster
+2) the x and y coordinates of the same object in the second subraster
+3) the x and y coordinates of the next object in the first subraster
+etc.
+If \fIalignment\fR = "file", then \fBcoords\fR is a text file listing
+the x, y and intensity shifts in columns 1, 2 and 3 respectively,
+of each input subraster relative to the reference subraster. The
+most common use of this option is to make fine adjustments by hand
+to the output of IRMATCH1D by editing the computed shifts slightly and
+rerunning IRMATCH1D with the new shifts.
+.le
+.ls xshift
+The x shift in pixel units if \fIalignment\fR = "shifts".
+.le
+.ls yshift
+The y shift in pixel units if \fIalignment\fR = "shifts".
+.le
+.ls alignment = "coords"
+The method of aligning the subraster.
+.ls coords
+The x and y positions of the marker points are listed in a file in the
+format specified by the \fIcoords\fR parameter.
+.le
+.ls shifts
+The x and y shifts of a subraster with respect to its neighbour are
+set to \fIxshift\fR and \fIyshift\fR.
+.le
+.ls file
+The x, y and intensity shifts of each input subraster with respect to the
+reference subraster image.
+.le
+.le
+.ls match = "*"
+Match intensities using the overlap region between adjacent subrasters. The
+median intensity is computed in the overlap region
+and the intensity scale of the current subraster is scaled to that of
+the previous subraster. Intensities are matched in one dimension in the order
+in which they
+are placed in the output image. The default is match everything.
+Those subrasters to be matched must be listed by number. For example to
+match intensities for subrasters 1 to 5 and 10 to 20 set match = "1-5,10-20".
+To match all the subrasters set match = "1-999" or match="*".
+.le
+.ls nxrsub = INDEF, ls nyrsub = INDEF
+The column and line index of the reference subraster.
+This will default to the central subraster.
+.le
+.ls xref = 0, yref = 0
+The x and y offset of the position of the reference subraster in the
+output image. The default action is to place the reference subraster
+in the same position in the output image as it has in the input image.
+.le
+.ls trimlimits = "[1:1,1:1]"
+The number of columns and rows to be trimmed off each edge of the
+input subraster before it is inserted in the output image in section
+notation. The default is to trim 1 column or row in each direction.
+.le
+.ls nimcols = INDEF, ls nimlines = INDEF
+The number of columns and rows in the output image. The default is the
+number of columns and rows in the input image.
+.le
+.ls oval = INDEF
+The value of undefined pixels in the output image. The default is the value
+in the database file from IRMOSAIC.
+.le
+.ls interpolant = linear
+The type of interpolant used to shift the subrasters. The options are:
+.ls nearest
+Nearest neighbour interpolation.
+.le
+.ls linear
+Bilinear interpolation.
+.le
+.ls poly3
+Bicubic polynomial interpolation.
+.le
+.ls poly5
+Biquintic polynomial interpolation.
+.le
+.ls spline3
+Bicubic spline interpolation.
+.le
+.le
+.ls verbose = no
+Print messages on the terminal describing the progress of the task.
+.le
+.ih
+DESCRIPTION
+IRMATCH1D takes the mosaiced image \fIinput\fR, the database file \fIdatabase\fR
+generated by IRMOSAIC and a list of coordinates \fIcoords\fR and computes
+an output image \fIoutput\fR in which all the individual subrasters are aligned.
+If \fIalignment\fR = "coords", IRMATCH1D accumulates the relative shifts
+between adjacent subrasters
+into a total shift with respect to the reference subraster. Shifts which
+do not correspond to adjacent subrasters are ignored.
+For subrasters which have no direct shift information, IRMATCH1D makes a best
+guess at the x and y shift based on the shifts of nearby subrasters which
+do have direct shift information.
+If the x and y shifts are sufficiently uniform over the whole input image
+the user may set \fIalignment\fR
+= shifts and input values of \fIxshift\fR and \fIyshift\fR.
+Alternatively the shifts may be read from the file \fIcoords\fR if
+\fIalignment\fR = "file".
+
+Coordinate lists may be generated interactively on the Sun workstations
+using the IRAF imtool facility and centered using the APPHOT CENTER
+and APSELECT tasks.
+
+The subrasters are inserted into the output image
+using the interpolation scheme defined by
+\fIinterpolant\fR and is made with reference to the subraster defined
+by \fInxrsub\fR and \fInyrsub\fR, using the shifts defined by
+the coordinates in the file \fIcoords\fR or defined by \fIxshift\fR and
+\fIyshift\fR. Subrasters are placed in the output image in the order
+they were inserted into the original mosaic with pixels in the most
+recently placed subrasters replacing those placed earlier in the overlap
+regions. Undefined pixels in the output image
+are given the value \fIoval\fR. The position of the reference image in the
+output image can be adjusted by setting the parameters \fIxref\fR and
+\fIyref\fR. The edges of each subraster may be trimmed before
+insertion into the output image by setting the \fItrimlimits\fR parameter.
+
+Intensities of adjacent subrasters can be matched using the \fImatch\fR
+parameters. At present matching is done by computing the median in the
+overlap region between adjacent subrasters and applying difference in
+these two numbers to the subraster in question. Intensity matching is
+done in one dimension only with the direction of matching following
+the order that the individual subrasters were inserted into the mosaic.
+For example if IRMOSAIC was run with \fIcorner\fR = "ll", \fIdirection\fR
+="row" and \fIraster\fR = "no", then the matching would start in the
+lower-left corner, proceed along the first row, move to the star of the
+second row and so on.
+
+.ih
+EXAMPLES
+
+1. Align an 8 by 8 mosaic with respect to subraster 6, 5.
+
+.nf
+ pr> irmatch1d mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5
+.fi
+
+2. Align an 8 by 8 mosaic as 1 above but shift the position of the
+reference subraster in the output image by 2 pixels in x and 3 pixels
+in y.
+
+.nf
+ pr> irmatch1d mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 xref=2 yref=3
+.fi
+
+3. Align an 8 by 8 mosaic as 1 above but trim 2 rows and columns off
+of each input image before inserting into the output image.
+
+.nf
+ pr> irmatch1d mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 trimlimits="[2:2,2:2]"
+.fi
+
+4. Rerun the above example saving the verbose output in a file. Use the
+PROTO package fields task to select the xshift, yshift and intensity
+shift fields, edit the shifts slightly and rerun irmatch1d with the
+new shifts.
+
+.nf
+ pr> irmatch1d mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 trimlimits="[2:2,2:2]" > shifts1
+
+ pr> fields shifts1 3,4,6 > shifts2
+
+ pr> edit shifts2
+
+ ... make whatever changes are desired
+
+ pr> irmatch1d mosaic mosaic.al mosaic.db shifts2 align=file \
+ nxrsub=6 nyrsub=5 trimlimits="[2:2,2:2]"
+.fi
+
+.ih
+TIME REQUIREMENTS
+.ih
+BUGS
+.ih
+SEE ALSO
+irmosaic, iralign, irmatch2d, apphot.center, apphot.apselect
+.endhelp
diff --git a/noao/nproto/doc/irmatch2d.hlp b/noao/nproto/doc/irmatch2d.hlp
new file mode 100644
index 00000000..80f8b42e
--- /dev/null
+++ b/noao/nproto/doc/irmatch2d.hlp
@@ -0,0 +1,212 @@
+.help irmatch2d Jan90 noao.nproto
+.ih
+NAME
+irmatch2d -- align and match the elements of the mosaiced image
+.ih
+USAGE
+irmatch2d input output database coords
+.ih
+PARAMETERS
+.ls input
+The mosaiced image to be aligned. This image must have been produced by
+the IRMOSAIC task and have an accompanying database file specified by
+\fIdatabase\fR.
+.le
+.ls output
+The aligned and matched image produced by IRMATCH2D.
+.le
+.ls database
+The database file from the IRMOSAIC task.
+.le
+.ls coords
+If \fIalignment\fR = "coords", then \fBcoords\fR is
+the text file listing the coordinates of objects in the input
+image one object per line in the following
+format: 1) the x and y coordinates of the object in the first subraster
+2) the x and y coordinates of the same object in the second subraster
+3) the x and y coordinates of the next object in the first subraster
+etc.
+If \fIalignment\fR = "file", then \fBcoords\fR is the text file listing
+the x, y and intensity shifts in columns 1, 2 and 3 respectively,
+of each input subraster relative to the reference subraster. The
+most common use of this option is to make fine adjustments by hand
+to the output of IRMATCH2D by editing the computed shifts slightly and rerunning
+IRMATCH2D with the new shifts.
+.le
+.ls xshift
+The x shift in pixel units if \fIalignment\fR = "shifts".
+.le
+.ls yshift
+The x shift in pixel units if \fIalignment\fR = "shifts".
+.le
+.ls alignment = "coords"
+The method of aligning the subraster.
+.ls coords
+The x and y positions of the marker points are listed in a file in the
+format specified by the \fIcoords\fR parameter.
+.le
+.ls shifts
+The x and y shifts of a subraster with respect to its neighbour are
+set to \fIxshift\fR and \fIyshift\fR.
+.le
+.ls file
+The x, y and intensity shifts of each input subraster with respect to the
+reference subraster image.
+.le
+.le
+.ls match = "*"
+Match intensities using the overlap region between adjacent subrasters. The
+median intensity is computed in the overlap region
+and the intensity scale of the current subraster is scaled to that of
+the previous subraster. Intensities are matched in two dimensions, first
+in the order in which they
+were placed in the output image and then in the orthogonal dimension.
+The default is match everything.
+Those subrasters to be matched must be listed by number. For example to
+match intensities for subrasters 1 to 5 and 10 to 20 set match = "1-5,10-20".
+To match all the subrasters set match = "1-999" or match="*".
+.le
+.ls nxrsub = INDEF, nyrsub = INDEF
+The column and row index of the reference subraster. This will default
+to the central subraster.
+.le
+.ls xref = 0, yref = 0
+The x and y offset of the reference subraster in the output image. By default
+the reference subraster is placed in the same position in the output image
+that it occupied in the input image.
+.le
+.ls trimlimits = "[1:1,1:1]"
+The number of rows and columns to be trimmed off each input subraster
+before it is copied to the output image in section notation.
+The default is to trim 1 row and column off each edge of the input
+subraster.
+.le
+.ls nimcols = INDEF, nimlines = INDEF
+The number of columns and lines in the output image. The default is the
+number of lines and columns in the input image.
+.le
+.ls oval = INDEF
+The value of undefined pixels in the output image. The default is the value
+in the database file from IRMOSAIC.
+.le
+.ls interpolant = linear
+The type of interpolant used to shift the subrasters. The options are:
+.ls nearest
+Nearest neighbour interpolation.
+.le
+.ls linear
+Bilinear interpolation.
+.le
+.ls poly3
+Bicubic polynomial interpolation.
+.le
+.ls poly5
+Biquintic polynomial interpolation.
+.le
+.ls spline3
+Bicubic spline interpolation.
+.le
+.le
+.ls verbose = yes
+Print messages on the terminal describing the progress of the task.
+.le
+.ih
+DESCRIPTION
+IRMATCH2D takes the mosaiced image \fIinput\fR, the database file \fIdatabase\fR
+generated by IRMOSAIC and a list of coordinates \fIcoords\fR and computes
+an output image \fIoutput\fR in which all the individual subrasters are aligned.
+If \fIalignment\fR = "coords", IRMATCH2D accumulates the relative shifts
+between adjacent subrasters
+into a total shift with respect to the reference subraster. Shifts which
+do not correspond to adjacent subrasters are ignored.
+For subrasters which have no direct shift information, IRMATCH2D makes
+a best guess at the x and y shift based on the shifts of nearby subrasters
+which do have direct shift information. If the x and y shifts
+are sufficiently uniform over the whole input image the user may set
+\fIalignment\fR = shifts and input values of \fIxshift\fR and \fIyshift\fR.
+Alternatively the shifts may be read for the file \fIcoords\fR if
+\fIalignment\fR = "file".
+
+Coordinate lists may be generated interactively on the Sun workstations
+using the IRAF imtool facility and centered using the APPHOT CENTER
+and APSELECT tasks.
+
+The subrasters are inserted into the output image using the
+interpolation scheme defined by
+\fIinterpolant\fR and is made with reference to the subraster defined
+by \fInxrsub\fR and \fInyrsub\fR, using the shifts defined by
+the coordinates in the file \fIcoords\fR.
+Subrasters are inserted into the output image in the order they were
+inserted into the original mosaic with pixels in the most recently
+placed subrasters replacing those placed earlier in the overlap regions.
+Undefined pixels in the output image
+are given the value \fIoval\fR. The position of the reference subraster
+in the output image can be shifted by setting the parameters \fIxref\fR and
+\fIyref\fR. The \fItrimlimits\fR parameter can be used to trim each
+input subraster before it is inserted into the output image.
+
+Intensities of adjacent subrasters can be matched using the \fImatch\fR
+parameter. At present matching is done by computing the median in the
+overlap region between adjacent subrasters and applying difference in
+these two numbers to the subraster in question. Intensity matching is
+done in two dimensions, first along the direction in which subrasters
+were inserted into the mosaic and then in the orthogonal dimension.
+For example if IRMOSAIC was run with \fIcorner\fR = "ll", \fIdirection\fR =
+"row" and \fIraster\fR = "no", then the matching would proceed along
+each row starting with the lower-left hand corner and then along
+each column beginning again in the lower-left corner.
+
+.ih
+EXAMPLES
+
+1. Align an 8 by 8 mosaic with respect to subraster 6, 5.
+
+.nf
+ pr> irmatch2d mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5
+.fi
+
+2. Align an 8 by 8 mosaic as 1 above but shift the position of the
+reference subraster in the output image by 2 pixels in x and 3 pixels
+in y.
+
+.nf
+ pr> irmatch2d mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 xref=2 yref=3
+.fi
+
+3. Align an 8 by 8 mosaic as 1 above but trim 2 rows and columns off
+of each input image before inserting into the output image.
+
+.nf
+ pr> irmatch2d mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 trimlimits="[2:2,2:2]"
+.fi
+
+4. Rerun the above example saving the verbose output in a file. Use the
+PROTO package fields task to select the xshift, yshift and intensity
+shift fields, edit the shifts slightly and rerun irmatch2d with the
+new shifts.
+
+.nf
+ pr> irmatch2d mosaic mosaic.al mosaic.db coords nxrsub=6 \
+ nyrsub=5 trimlimits="[2:2,2:2]" > shifts1
+
+ pr> fields shifts1 3,4,6 > shifts2
+
+ pr> edit shifts2
+
+ ... make whatever changes are desired
+
+ pr> irmatch2d mosaic mosaic.al mosaic.db shifts2 align=file \
+ nxrsub=6 nyrsub=5 trimlimits="[2:2,2:2]"
+.fi
+
+.ih
+TIME REQUIREMENTS
+.ih
+BUGS
+.ih
+SEE ALSO
+irmosaic, iralign, irmatch1d, apphot.center, apphot.apselect
+.endhelp
diff --git a/noao/nproto/doc/irmosaic.hlp b/noao/nproto/doc/irmosaic.hlp
new file mode 100644
index 00000000..6cdd400c
--- /dev/null
+++ b/noao/nproto/doc/irmosaic.hlp
@@ -0,0 +1,157 @@
+.help irmosaic Oct89 noao.nproto
+.ih
+NAME
+irmosaic -- mosaic a set of infrared ccd images
+.ih
+USAGE
+mosaic input output database nxsub nysub
+.ih
+PARAMETERS
+.ls input
+The list of input images to be mosaiced. The images are
+assumed to be ordered either by row,
+column, or in a raster pattern. If the image list is not in
+order then the iraf files task plus the editor must be used
+to construct an image list. The images in the input list
+are assumed to all be the same size.
+.le
+.ls output
+The name of the output image.
+.le
+.ls database
+The name of the text file listing the operations performed by irmosaic.
+This list can be used as input for iralign.
+.le
+.ls nxsub
+The number of subrasters along a row of the output image.
+.le
+.ls nysub
+The number of subrasters along a column of the output image.
+.le
+.ls trim_section = "[*,*]"
+The section of the input images to be mosaiced into the output image.
+Section can be used to flip and/or trim the individual subrasters before adding
+them to the mosaic. For example if we want to flip each subraster around the
+y axis before adding it to the mosaic, then \fItrim_section\fR = "[*,-*]".
+.le
+.ls null_input = ""
+The list of unobserved subrasters. For example if the subrasters 3 to 5 and
+10 of a sequence of observations were not observed then
+\fInull_input\fR = "3-5,10".
+This parameter follows the ranges notation convention. The number of unobserved
+subrasters plus the number of images must equal \fInxsub\fR *
+\fInysub\fR.
+.le
+.ls corner = "ll"
+The starting position in the output image.
+The four options are "ll" for lower left corner, "lr" for lower right corner,
+"ul" for upper left corner and "ur" for upper right corner.
+.le
+.ls direction = "row"
+Add subrasters to the output image in row or column order. The options are
+"row" for row order and "column" for column order.
+.le
+.ls raster = no
+Add subrasters to the output image in a raster pattern or return to the start
+of a column or a row?
+.le
+.ls median_section = ""
+The section of each input subraster for which the median is computed. If
+\fImedian_section\fR is the null string then the medians are not computed.
+If \fImedian_section\fR is "[*,*]" the whole input subraster is used to
+compute the median.
+.le
+.ls subtract = no
+Subtract the median value from each input subraster before placing the
+subraster in the output image.
+.le
+.ls nimcols = INDEF
+The number of columns in the output image. If \fInimcols\fR is INDEF then
+the program will compute the number of columns using the size of the input
+subrasters, \fInxsub\fR and \fInxoverlap\fR.
+.le
+.ls nimrows = INDEF
+The number of rows in the output image. If \fInimrows\fR is INDEF then
+the program will compute the number of rows using the size of the input
+subrasters, \fInysub\fR and \fInyoverlap\fR.
+.le
+.ls nxoverlap = -1
+The number of columns between adjacent frames. A negative value specifies
+the amount of column space between adjacent subrasters.
+A positive value specifies the amount of column overlap on adjacent
+subrasters.
+.le
+.ls nyoverlap = -1
+The number of rows between adjacent frames. A negative value specifies
+the amount of row space between adjacent subrasters.
+A positive value specifies the amount of row overlap on adjacent subrasters.
+.le
+.ls oval = 0.0
+The output image pixel value in regions undefined by the by the list of input
+images.
+.le
+.ls opixtype = "r"
+The pixel type of the output image. The options are "s" (short integer),
+"i" (integer), "l" (long integer), "r" (real) and "d" for double
+precision.
+.le
+.ls verbose = yes
+Print messages about task progress and actions taken.
+.le
+.ih
+DESCRIPTION
+
+IRMOSAIC takes a the list of subrasters of identical dimensions specified
+by \fIinput\fR and combines them into a single
+output image \fIoutput\fR. The order in which the subrasters are placed
+in the output image is determined by the parameters \fIcorner\fR,
+\fIdirection\fR and \fIraster\fR. The orientation of each individual
+subraster in the output image may be altered by setting the \fItrim_section\fR
+parameter.
+
+IRMOSAIC uses the subraster size, the number of subrasters, the \fInxoverlap\fR
+and \fRnyoverlap\fI parameters and the \fInxsub\fR and \fInysub\fR partmeters
+to compute the size of the output image. An image of size larger than the
+minimum required can be specified by setting \fInimcols\fR and \fInimrows\fR.
+The pixel type of the output image is specified by \fIopixtype\fR and undefined
+regions of the output image are given the value \fIoval\fR.
+
+The median of a section each subraster may be optionally computed
+and placed in the database file by setting \fImedian_section\fR.
+The computed median will be subtracted from the input subrasters if
+\fIsubtract\fR is set to yes.
+Task action messages will be printed on the standard output
+if \fIverbose\fR is set to yes.
+.ih
+EXAMPLES
+
+1. Mosaic a list of 64 infrared images onto an 8 by 8 grid in column order
+starting in the upper right hand corner. Allow one blank column and row
+between each subraster.
+
+.nf
+ pr> irmosaic @imlist mosaic mosaic.dat nxsub=8 nysub=8 \
+ nxoverlap=-1 nyoverlap=-1 corner="ur" direct="column"
+.fi
+
+2. Mosaic a list of 62 infrared images onto an 8 by 8 grid in column order
+starting in the upper right hand corner. Allow one blank column and row
+between each subraster. Subrasters 3 and 9 in the sequence do not exist
+and are to be replaced in the output image with an unknown value of -1.0.
+
+.nf
+ pr> irmosaic @imlist mosaic mosaic.dat nxsub=8 nysub=8 \
+ nxoverlap=-1 nyoverlap=-1 corner="ur" direct="column"\
+ null_input="3,9", oval=-1.0
+.fi
+
+.ih
+TIME REQUIREMENTS
+.ih
+BUGS
+At present only integral pixel overlaps are allowed in this routine.
+Fine tuning of the alignments can be done with iralign.
+.ih
+SEE ALSO
+iralign, irmatch1d, irmatch2d
+.endhelp
diff --git a/noao/nproto/doc/linpol.hlp b/noao/nproto/doc/linpol.hlp
new file mode 100644
index 00000000..5cde0e60
--- /dev/null
+++ b/noao/nproto/doc/linpol.hlp
@@ -0,0 +1,164 @@
+.help linpol Apr92 noao.nproto
+.ih
+NAME
+linpol -- Calculate linear polarization, angle, and Stokes images
+.ih
+USAGE
+linpol input output
+.ih
+PARAMETERS
+.ls input
+A list of input images. There must be either three or four input
+images taken with the polarizer at even multiples of a 45 degree
+position angle.
+.le
+.ls output
+The output data cube which will contain as separate bands the
+fractional linear polarization and angle frames, and optionally the
+Stokes parameter frames.
+.le
+.ls degrees = yes
+Report the polarization angle in degrees? If \fBdegrees\fR = no, the
+polarization angle will be reported in radians.
+.le
+.ls stokes = yes
+Output the Stokes parameter images? If \fBstokes\fR = yes, the three
+linear Stokes parameters, I, Q, and U, will be included in the
+\fBoutput\fR data cube as separate bands. If \fBstokes\fR = no, only
+the fractional linear polarization and angle frames will appear in the
+output.
+.le
+.ls normalize = no
+Normalize the Q and U frames? This is appropriate when using a tool
+such as VELVECT to plot the polarization vectors. If \fBnormalize\fR =
+yes, the Q and U Stokes parameter frames will be normalized by dividing
+by the I parameter frame. This parameter has no effect on either the
+fractional polarization or angle frames.
+.le
+.ls keyword = "polangle"
+This must be set to the name of a header keyword that contains the
+polarizer angle for each of the \fBinput\fR images. LINPOL will only
+accept polarizer angles at even 45 degree separations. Either four such
+frames, at 0-45-90-135 degrees, or three frames with any one of the
+0-45-90-135 degree frames omitted, may be specified.
+.le
+.ih
+DESCRIPTION
+LINPOL calculates the pixel-by-pixel fractional linear polarization and
+polarization angle for a set of either three or four images taken with
+polarizer set at even multiples of a 45 degree position angle. At least
+three different frames with the header \fBkeyword\fR set to one of
+0, 45, 90, or 135 degrees must be specified in the \fBinput\fR list.
+
+If \fBdegrees\fR = yes, the output polarization angle band of the image
+will be in units of degrees, if \fBdegrees\fR = no, the angle will be
+reported as radians. If \fBstokes\fR = yes, the output image
+will consist of five separate bands, one each for the pixel-by-pixel
+fractional linear polarization and the corresponding polarization angle,
+and one for each of the I, Q, and U pixel-by-pixel Stokes parameters.
+If \fBstokes\fR = no, only the fractional polarization and the polarization
+angle will be saved in the output.
+
+The \fBnormalize\fR parameter is useful for plotting purposes.
+If \fBnormalize\fR = yes, the Q and U Stokes parameter frames will be
+normalized by dividing by the I parameter frame. This may be appropriate
+when using a tool such as VELVECT to plot the polarization vectors.
+This parameter has no effect on either the fractional polarization or
+angle frames.
+
+Each input image must contain the corresponding polarizer angle
+in the header keyword specified by the parameter \fBkeyword\fR
+Linpol will only accept polarizer angles at even 45 degree separations.
+Either four such frames, at 0-45-90-135 degrees, or three frames with
+any one of the 0-45-90-135 degree frames omitted, may be specified.
+
+The output image header will include information describing the particular
+input images that went into its generation and the particular nature of
+each band of the output.
+.ih
+EXAMPLES
+An observer obtained four exposures of a particular field through a
+polarizer set at a position angle of 0-45-90-135 degrees. The first
+step in producing a good map of the polarized light from (extended
+or point-like) sources in the field is always to register these frames
+very precisely. A slight mismatch in the positioning of each pixel
+relative to the shoulders of nearby sources or extended emission will
+result in large errors in the determination of the polarization quantities.
+
+Another preprocessing step that may be desirable is to match the PSFs
+(Point Spread Functions) of the various frames. Ideally, these are
+stable in the raw data (i.e., the seeing at the telescope was constant),
+but if not they must be matched to avoid the same errors as above. Note
+that it may also be a good idea to "smooth" the raw images before
+applying linpol to increase the signal-to-noise of the output.
+
+After guaranteeing the integrity of the input images, the image header
+\fBkeyword\fR must be created to contain the position angle. The hedit
+task can be used to do this:
+
+.nf
+ hedit im.00 polangle 0 add+
+ hedit im.45 polangle 45 add+
+ hedit im.90 polangle 90 add+
+ hedit im.135 polangle 135 add+
+.fi
+
+At this point, the input images are ready to be processed by linpol.
+
+To generate an output image containing the fractional linear
+polarization and polarization angle in separate bands, along with the
+pixel-by-pixel Stokes parameter frames:
+
+.nf
+ np> linpol im.*.imh polar
+.fi
+
+To omit the Stokes parameter frames:
+
+.nf
+ np> linpol im.*.imh polar stokes-
+.fi
+
+To represent the pixel-by-pixel polarization angle in radians, rather
+than degrees:
+
+.nf
+ np> linpol im.*.imh polar degrees-
+.fi
+
+To normalize the Q and U Stokes frames and plot the result with velvect:
+
+.nf
+ np> linpol im.*.imh polar normalize+
+ np> imhead polar lo+
+ polar[100,100,5][short]: Linear polarization image
+ No bad pixels, no histogram, min=unknown, max=unknown
+ Line storage mode, physdim [100,100,5], length of user area 2147 s.u.
+ Created Wed 10:15:05 29-Apr-92, Last modified Wed 10:15:05 29-Apr-92
+ Pixel file 'ursa!/ursa/scr3/iraf/seaman/polar.pix' [ok]
+ ...
+
+ POL0 = 'im.00.imh'
+ POL45 = 'im.45.imh'
+ POL90 = 'im.90.imh'
+ POL135 = 'im.135.imh'
+ POLAR = 'Band 1 is the percent polarization'
+ ANGLE = 'Band 2 is the polarization angle'
+ I-STOKES= 'Band 3 is the Stokes I parameter'
+ Q-STOKES= 'Band 4 is the normalized Stokes Q parameter'
+ U-STOKES= 'Band 5 is the normalized Stokes U parameter'
+ np> velvect polar[*,*,4] polar[*,*,5]
+.fi
+
+Note that the current version of the velvect task is not particularly
+appropriate for this use. It has no support for reducing the pixel
+resolution of the output plot: each pixel will generate a plotted vector
+so that to produce an uncrowded (and low "noise") plot, the input images
+or output bands must be manually block averaged or otherwise smoothed.
+In addition, the plotted vectors are directed (little arrows) not
+undirected line segments, and the length of the vectors are not easily
+adjusted.
+.ih
+SEE ALSO
+velvect, imalign, hedit
+.endhelp
diff --git a/noao/nproto/doc/mkms.hlp b/noao/nproto/doc/mkms.hlp
new file mode 100644
index 00000000..078480a4
--- /dev/null
+++ b/noao/nproto/doc/mkms.hlp
@@ -0,0 +1,63 @@
+.help mkms Jan03 noao.nproto
+.ih
+NAME
+mkms -- make multispec format from 1D arrays with associated bands
+.ih
+USAGE
+mkms output spectra raw background sigma
+.ih
+PARAMETERS
+.ls output
+Name of output multispec image.
+.le
+.ls spectra
+List of primary 1D spectra to be included in multispec image.
+.le
+.ls raw
+List of 1D raw or secondary spectra. If none specify "" otherwise
+the list must match the list of primary spectra.
+.le
+.ls background
+List of 1D background spectra. If none specify "" otherwise
+the list must match the list of primary spectra.
+.le
+.ls sigma
+List of 1D sigma spectra. If none specify "" otherwise
+the list must match the list of primary spectra.
+.le
+.ih
+DESCRIPTION
+MKMS creates a multispec format from 1D spectra. Unlike SCOPY it
+can include associated spectra. There can be any number of primary 1D
+spectra and the associated spectra are optional. However, when
+associated spectra are specified the list must match the primary spectra
+list and the arrays must have the same number of pixels and dispersion
+as the primary spectrum. The different spectra may have different
+dispersions.
+
+This is a simple script using SCOPY and IMSTACK. It has minimal error
+checking. In particular, if the set of input is not consistent the
+task will abort with an error leaving temporary files behind.
+.ih
+EXAMPLES
+1. To create an image with one spectrum and each of the associated types:
+
+.nf
+ cl> mkms out.ms spec rawspec bkgspec sigspec
+.fi
+
+2. To create an image with three primary spectra and error arrays:
+
+.nf
+ cl> mkms out.ms spec1,spec2,spec3 "" "" err1,err2,err3
+.fi
+
+.ih
+REVISIONS
+.ls MKMS V2.12.2
+This prototype task added for this release.
+.le
+.ih
+SEE ALSO
+scopy, imstack
+.endhelp
diff --git a/noao/nproto/doc/skygroup.hlp b/noao/nproto/doc/skygroup.hlp
new file mode 100644
index 00000000..7b5dfed9
--- /dev/null
+++ b/noao/nproto/doc/skygroup.hlp
@@ -0,0 +1,131 @@
+.help skygroup Feb06 noao.nproto
+.ih
+NAME
+skygroup -- Group a list containing RA and Dec into spatial sublists
+.ih
+SYNOPSIS
+A list with RA and Dec in the first two columns followed by user data
+is grouped into sublist based on spatial proximity. A separation parameter
+defines the grouping by looking for gaps in both RA and Dec that are
+bigger than the specified amount. The output sublists may or may not
+include the RA and Dec columns. A typical example of user data might be
+image names.
+.ih
+USAGE
+skygroup input output
+.ih
+PARAMETERS
+.ls input
+Input tabular text file containing RA and Dec in the first two whitespace
+separated columns and user data in the remaining columns. The RA may
+be in hours or degrees while the Dec must be in degrees. The RA values
+must lie in the range 0h to 24h or 0d to 360d and the Dec values
+must lie in the range -90d to 90d.
+.le
+.ls output
+Output root filename. The root filename itself will contain a list of
+the sublists. The sublists will have _NNN appended to the root name
+where NNN is a three digit number. If there are more than 999 sublists
+the number of digits will increase. A check is made for any pre-existing
+filenames with this root, sequence pattern, and optional extension and
+an error will result if any are found.
+.le
+.ls extn = ""
+Optional output extension. This string is appended to the output files
+noted previously. Note that an period must be given explicitly if a
+".XXX" style extension is desired.
+.le
+.ls sep = 60 (arcsec)
+The maximum separation in arcseconds in RA and Dec, applied separately, which
+defines the start of a new group.
+.le
+.ls raunit = "hr" (hr|deg)
+The input RA unit where "hr" is hours and "deg" is degrees.
+.le
+.ls keepcoords = yes
+Keep the input coordinate columns in the output lists? If no then only
+the user data will be placed in the output lists. This option allows
+taking a list of RA, Dec, and filenames and producing only lists of
+filenames to be used as @files.
+.le
+.ls raformat = "%.2h", decformat = "%.1h"
+The format for printing the RA and Dec in the output lists if
+\fIkeepcoords\fR is yes. See the help for \fBprintf\fR for the formats.
+Note that the raformat may be given in %H format to convert input RA
+in degrees into output hours. The default produces sexagesimal format
+keeping the RA in the same units as the input.
+.le
+.ih
+DESCRIPTION
+This task groups a list of user data with RA and Dec coordinates
+into sublists where all points in a group have at least one member with
+celestial distance in RA or Dec separately less than or equal to the
+specified separation. In other words, groups are defined by gaps in RA
+and Dec.
+
+The input format is a text table where each line consists of an RA,
+a Dec, and arbitrary user data. Whitespace separates these three parts.
+The RA and Dec have certain restrictions on units and ranges as described
+in the parameters. However, the RA may be given either in hours or degrees
+and may be output in hours if given in degrees.
+
+The output is a set of sublists as well as a file containing the set
+of sublist filenames. The sublists contain the input user data with
+or without the input coordinates.
+
+The grouping algorithm is summarized as follows. The input list is
+sorted by declination. The declination ordered list is traversed
+to form groups with consecutive declination intervals less than or
+equal to the specified separation. These groups are then
+sorted in RA and these are traversed to form the final groups with
+consecutive RA intervals less than or equal to the specified separation.
+Note that the RA intervals are actually computed by \fBskysep\fR and
+make use of both the RA and Dec.
+
+A challenge is dealing with the wrap around in RA at the zero meridian.
+This is handled by duplicating points near 0 beyond 24h or 360d. This is
+the reason the input is required to only be in a specific range. This
+duplication can result in entries appearing in more than one output group.
+A merging step handles this situation.
+.ih
+EXAMPLES
+1. A set of images is to be grouped based on their FITS tangent point
+coordinates. Note this make most sense when the tangent point pixel
+coordinates are the same in the image. The image will then be grouped
+to find those that overlap by some amount. If the images have 10 arc
+minute fields of view and we want to group those that overlap by at least
+50% then the separation parameter should be something like 5 arc minutes.
+We want to the output to a list of only the file names which will then
+be passed on to an image stacking program.
+
+.nf
+ cl> hselect *.fits crval1,crval2,title yes > coords
+ cl> skygroup coords group extn=".lis" sep=300 rau=deg keep-
+ cl> type group.lis
+ group_001.lis
+ group_002.lis
+ ...
+ cl> type group_001.lis
+ obj4325.fits
+ obj4329.fits
+ ...
+ cl> count @group.lis
+ cl> count @group
+ 1 3 85 group_001.lis
+ 2 6 170 group_002.lis
+ 102 306 8670 group_003.lis
+ 133 399 11438 group_004.lis
+ 31 93 2666 group_005.lis
+ 7 21 595 group_006.lis
+ 5 15 425 group_007.lis
+ 281 843 24049 Total
+.fi
+
+The CRVAL values are for the RA and Dec world axes respectively. Because
+the FITS reference values must be in degrees the input RA unit is specified
+as degrees. Because we want only the output file names we use keepcoords=no.
+The output lists will be group_001.lis, group_002.lis, etc.
+.ih
+SEE ALSO
+skysep, astradius, astcalc
+.endhelp
diff --git a/noao/nproto/doc/skysep.hlp b/noao/nproto/doc/skysep.hlp
new file mode 100644
index 00000000..db2c7c89
--- /dev/null
+++ b/noao/nproto/doc/skysep.hlp
@@ -0,0 +1,64 @@
+.help skysep Feb06 noao.nproto
+.ih
+NAME
+skysep -- Compute arc separation of two RA/Dec values
+.ih
+SYNOPSIS
+Given two RA/Dec value pairs the spherical separation is computed. This
+task can be used in scripts and has both text and parameter output.
+.ih
+USAGE
+skysep ra1 dec1 ra2 dec2
+.ih
+PARAMETERS
+.ls ra1, dec1, ra2, dec2
+The RA and Dec of two points on the sky for which a separation is to be
+computed. The RA may be in hours or degrees and the Dec is in degrees.
+The values may be in decimal or sexagesimal format.
+.le
+.ls raunit = "hr"
+Units for right ascension. The value "hr" selects hours and "deg"
+selects degrees.
+.le
+.ls verbose = no
+Print a verbose output to the standard output?
+.le
+.ls sep
+This output parameter will contain the separation in arc seconds after
+the task is run. It may then be referenced as the variable skysep.sep.
+.le
+.ih
+DESCRIPTION
+This simple script task computes the separation between two celestial
+coordinates given as RA and Dec. The RA units may be hours or degrees,
+as selected by a parameter, and the Dec units must be degrees. The result
+may be printed to the standard output (in restricted precision) and is
+also record in a task parameter for later use.
+.ih
+EXAMPLES
+1. The verbose output appears as follows:
+
+.nf
+ cl> skysep 12:12:12 32:32:32 12:12:24 32:32:52 verb+
+ 153.05 arcsec = (12:12:12.00, 32:32:32.0) - (12:12:24.00, 32:32:52.0)
+ cl> = skysep.sep
+ 153.04686934468
+.fi
+
+2. To use in a script:
+
+.nf
+ cache skysep # Cache to avoid problems with updating par files
+
+ # To use scan to get the value.
+ skysep (r1, d1, r2, d2, raunit="deg", verbose+) | scan (sep)
+ printf ("The separation is %f\n", sep)
+
+ # To use the saved value.
+ skysep (r1, d1, r2, d2, raunit="deg", verbose-)
+ printf ("The separation is %.5f\n", skysep.sep)
+.fi
+.ih
+SEE ALSO
+astcalc, asthedit
+.endhelp
diff --git a/noao/nproto/doc/slitpic.hlp b/noao/nproto/doc/slitpic.hlp
new file mode 100644
index 00000000..859a0ee0
--- /dev/null
+++ b/noao/nproto/doc/slitpic.hlp
@@ -0,0 +1,63 @@
+.help slitpic May85 noao.nproto
+.ih
+NAME
+slitpic -- generate IRAF image of slit mask for aperture plates.
+.ih
+USAGE
+slitpic serial_numbers output_root
+.ih
+PARAMETERS
+.ls serial_numbers
+A range of serial numbers to be searched for in \fItape1\fR. One
+mask is generated for each \fIserial_number\fR.
+.le
+.ls output_root
+The rootname of the output image file. The \fIserial_number\fR is appended to
+this \fIoutput_root\fR if more than one image is begin created.
+.le
+.ls tape1 = "slitsave"
+A text file containing solutions generated by program SLITS. This file
+essentially contains x,y positions of slits to be included on the mask.
+.le
+.ls slit_width = 2.5
+The slit width in seconds of arc.
+.le
+.ls site = "kpno"
+The telescope site where the output mask will be used. Current choices
+are "kpno" and "ctio".
+.le
+.ls pixel_scale = 0.4157
+The scale of the output image in arcseconds per pixel
+.le
+.ls pixel_scale_date = "14feb84"
+The date from which \fIpixel_scale\fR is valid. The output \fBcrtpict\fR
+print will be annotated with this date.
+.le
+.ls crtpict = no
+This boolean parameter controls whether or not a file of commands is written
+to drive program \fBcrtpict\fR.
+.le
+.ls cmd_file = "cmd"
+If \fIcrtpict\fR = yes, this parameter specifies the root name of the output
+command file. This command file is read by task \fBcrtpict\fR.
+.le
+.ih
+DESCRIPTION
+Task \fBslitpic\fR reads a file of slit positions and generates an IRAF
+image for use as a slit mask for aperture plate observing.
+.ih
+EXAMPLES
+The following example creates an IRAF image from the "SERIAL = 67" entry
+in file "mask67.dat"; the output image is named "mask":
+.sp
+.nf
+ cl> slitpic 67 mask tape1=mask67.dat
+.fi
+.ih
+TIME REQUIREMENTS
+Task \fBslitpic\fR takes 8 cp seconds to create a 780 x 780 mask; a
+1184 x 1184 image requires about 16 cp seconds.
+.ih
+SEE ALSO
+crtpict
+.endhelp