Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.apo.nmsu.edu/Telescopes/HardwareControllers/GuiderImageCommands.html
Дата изменения: Thu Nov 6 23:17:19 2003
Дата индексирования: Sat Apr 9 23:28:03 2016
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п
Guider Image Controller Commands

Guider Image Controller Commands

For version 4.1; last updated 2003-11-06

Overview

This controller obtains and processes images from various guide cameras. Its commands, and associated replies, are described in this document. For more information about the controller, please see the Guide Image Controller Overview Manual. A few additional commands may be available that are not supported and hence not documented in this manual. These are generally written to aid in debugging. The complete set of commands available, including unsupported commands, may be determined by issuing the help command.

Units are as follows, unless otherwise noted:

The position coordinate system is as follows:

Configuration File

Beginning with version 4.0 a camera configuration file has been implemented. This file is read at startup and in response to the readconfig command. The format of the file changed in 4.1 and is now as follows:

Keywords and their associated values are:

Here is a sample configuration file:

ImageDir    :images:
MaxFileNum  10
Debug        1
! Camera data
!       ID      type    name    x size  y size  bits    map?    temp    gain    read    gainset    spdtable
!                               (pix)   (pix)   /pix            (C)     e-/ADU  (e-)    (Photometrics)
Camera  1       PXL     PXL1024 1024    1024    16      0       -25.0    9.7    21
Camera  2       SenSys  SenSys   768     512    12      0        10.0   40.0    26      1
Camera  3       SenSys  SenSys2 1536    1024    12      0        10.0   40.0    26      1

Commands

Only the format for normal replies is shown below. It is hoped that error messages will be self-evident.

centroid xCtr yCtr xPredFWHM yPredFWHM

Find the position and shape of a star. The predicted FWHM is in binned pixels; an error of a factor of two either way should be acceptable. Excessive error can cause centroiding to fail. The centroid box (set by the boxsize parameter and the predicted FWHM) must contain only one star, else the centroid will be inaccurate (and will usually be rejected with an error).

If the centroid is computed successfully, returns data as follows:

 

bin       position        FWHM    maj ang  peak  bright  sky    pos uncert  error code
x y      x        y     maj  min                                  x     y
2 2   133.609  33.681   4.25 4.32   1.8   1105.5 24483.1 77.0   0.001 0.001     0
 

where:

Error Codes. These may change, but are presently as follows (those returned by atDACentroid). Values -1 through -4 indicate a failed centroid, and an error message is returned instead of star data.

0

OK

-1

center isn't locally highest pixel in atObjectCenterFind_Ptr

-2

object is too close to the edge in atObjectCenterFind_Ptr

-3

object has vanishing second derivative in atObjectCenterFind_Ptr

-4

sky is too high in atObjectCenterFind_Ptr -10 Zero sigma - peak and counts not calculated after atObjectCenterFind_Ptr

-11

Infinite sigma after atObjectCenterFind_Ptr

-21

Error in setfsigma (sigma too large) in atSigmaFind

-22

Sigma out of range (inf sharp or inf flat) in atSigmaFind

-23

Too many iterations in atSigmaFind

-24

Too close to edge in atSigmaFind

-25

Error in lgausmom - check sky value in atSigmaFind

-26

Too flat in atFindFocMom, from atSigmaFind

-30

Zero sigma - peak and counts not calculated after atSigmaFind

-31

Infinite sigma after atSigmaFind

clearimage

Erase the image in memory (by resetting the image pointers).

docentroid expTime xBin yBin xCtr yCtr xPredFWHM yPredFWHM

Exposes the CCD, reads a subregion into memory, and centroids the subregion. The size of the subregion is predFWHM * boxSize, truncated as necessary to fit on the CCD. If expTime is zero then the shutter is not opened. See also doread and centroid. Note: docentroid will return an error if no camera selected.

Returns the output of showiminfo followed by the output of centroid (including the relevant error message if centroiding fails).

dodark expTime xBin yBin region

Like doread but does not open the shutter. Used to take dark frames.

Returns the output of showiminfo.

doread expTime xBin yBin region

Exposes the CCD, reads it into memory, writes a FITS image to the directory "guider images", and updates the text file last.image to point to it. The FITS file is given one of a circularly sequential set of names; if a file by that name exists, it is silently replaced. If expTime is zero then the shutter is not opened. Note: doread will return an error if no camera selected

Returns the output of showiminfo.

dumpbadbin file name

Dump the bad pixel map to a binary file.

dumpbadfits file name

Dump the bad pixel map to a FITS file.

dumpbin fileName

Dump the image to a binary file.

dumpfits fileName

Dump the image to a FITS file.

exit

Identical to the quit command. Makes the image controller program quit. Please don't issue this command unless you are prepared to get the program running again.

findstars maxNumStars region xPredFWHM yPredFWHM

Computes statistics, determines a cutoff level (see prefs), scans for stars, sorts the list in decreasing brightness and prints a list of stars. The predicted FWHM is in pixels; an error of a factor of two either way should be acceptable, but excessive error can cause star finding or centroiding to fail. The stars are listed approximately in decreasing order of brightness.

The order is approximate due to details of the algorithm. When the stars are first found only crude positions and brightnesses are determined, and these crude brightnesses are used to sort the data. The stars are accurately centroided only as they are being printed, so the brightnesses may not be in perfectly descending order. (Note that any stars for which the centroid calculation fails are omitted, with a warning printed to the log window). The ordering should probably be perfected, but the simplest solution would require accurately centroiding many more objects, which would slow down the code.

Returns one line of data per star; each line is in the format returned by centroid. Sample output:

 

findstars 100 0 0 0 0 5 5
created null bad pixel map for camera: 2
star finder constructed; super pixel array is 31 by 19
star finder destructed
Found 11 raw star(s)
2 2   133.609 33.681   4.32 4.25 -1.8   1105.5 24483.1 77.0   0.001 0.001   0
2 2   205.562 67.510   4.16 4.04 -70.4   985.2 20909.2 82.0   0.001 0.001   0
2 2   74.291 177.195   5.22 4.29 80.3   556.1 14238.4 77.0   0.001 0.001   0
2 2   132.761 110.889   4.82 4.56 -7.5   505.9 12899.7 77.0   0.001 0.001   0
2 2   79.187 33.018   6.58 5.27 -55.1   358.5 13771.4 77.0   0.001 0.001   0
2 2   17.606 100.423   6.19 4.42 -11.6   427.3 12682.9 77.0   0.001 0.001   0
2 2   78.383 106.623   5.30 4.35 -22.1   392.7 10272.0 76.0   0.001 0.001   0
2 2   133.305 180.496   7.00 5.10 16.8   263.5 10670.0 78.0   0.001 0.001   -24
2 2   17.149 173.413   4.59 4.05 -47.9   256.0 5690.9 77.0   0.002 0.002   0
2 2   23.220 32.065   6.80 5.18 -25.3   163.6 5897.1 76.0   0.002 0.002   0
2 2   281.312 171.713   5.19 4.32 32.6   160.8 4129.9 78.0   0.002 0.002   0

If no stars are found, the following is returned:

 

no stars found

help

Displays help for the program, including a list of commands, their arguments, and a brief description of each command.

init

Initialize the current camera, erases the image (and bad pixel map), and restores default parameters.

loadbadbin xSize ySize fileName

Load the bad pixel map from a binary file.

loadbin xSize ySize fileName

Load the image from a binary file.

loadfits fileName

Load the image from a FITS file. Attempts to parse CAMID (camera ID number) in the header, but defaults to the zero camera if not found. If the FITS file was written when a different set of cameras was available then CAMID may actually be wrong, in which case you may wish to edit it out of the header.

makebadpixmap minGood maxGood

Use the current image to make a bad pixel map. Pixels with values outside the range minGood to maxGood (inclusive) are considered bad. Specifying 0 for maxGood causes it to use the maximum possible counts minus one -- in other words, only completely saturated pixels are considered too bright.

median region

Computes the approximate median pixel value of the specified region. For large regions some groups of pixels are averaged together before taking the median of the averages.

quit

Identical to the exit command. Makes the image controller program quit. Please don't issue this command unless you are prepared to get the program running again.

readconfig [filename]

Reads the specified configuration file, or config.txt if none specified. Any omitted keywords are left unchanged, so this command is useful for modifying the configuration data read in at startup (from the file config.txt).

setboxsize size

Sets the centroid box size, in FWHM units. The centroid box is used for two things:

The centroid box size in pixels is computed, as follows:

Centroid box size in x/y pixels = max (box size in fwhm units * predicted FWHM in x/y pixels, 15)

Unlike predicted FWHM, the appropriate value of box size (in FWHM units) should be independent of camera and observing conditions. In fact, the default box size should be adequate under all circumstances.

Making the box size too large is unlikely to cause significant problems, it mainly slows down reading of the CCD. Making the box size too small will cause centroiding to fail, and since the required size depends partly on how centered the star is in the image, this failure can be intermittent for borderline cases.

setcam camIDNum

Select a given camera and initialize it. All subsequent camera access commands, such as "doread" are directed to this camera until a new setcamera command is received. Returns the same information as showcaminfo.

0 always means "no camera". Other camera ID numbers are specified in the configuration file. A list of available cameras may be obtained via the showcamlist command.

setfilenum filenum

Sets the file number for the FITS file to be automatically written next time the camera is read. Must be in the range [1, maxfilenum].

setmaxfilenum maxfilenum

Sets the maximum file number for the FITS file automatically written each time the camera is read. Must be positive.

showbadcaminfo

Return camera data associated with the bad pixel map, using the same format as showcaminfo.

showbadiminfo

Return information about the bad pixel map, using the same format as showiminfo.

showcaminfo

Return data about the current camera, including image size, min and max possible pixel values, the CCD temperature (in C; NaN if not available for the current camera) and the file number for the next file to be written. Sample output:

 

showcaminfo
0 "none" 1200 1200 16 NaN 53 "camera: ID# name sizeXY bits/pixel temp fileNum"

showcamlist

Return information about all known cameras. Only hard-wired information is displayed; information about what the camera is looking at should be kept in the TCC or MC. Sample output:

 

showcamlist
0 "none" 1600 1600 16 nan 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
1 "PXL1024" 1024 1024 16 -20.89 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
2 "SenSys" 768 512 12 nan 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
3 "SenSys2" 1536 1024 12 nan 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
4 "SenSys" 768 512 12 nan 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
5 "SenSys2" 1536 1024 12 nan 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
6 "SenSys" 768 512 12 nan 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
7 "SenSys2" 1536 1024 12 nan 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
 

showconfig

Return data about the current configuration. Sample output:

! Current configuration
! directory for autosaved images (may contain spaces)
ImageDir     :images:

! directory for bad pixel maps (may contain spaces)
BadPixMapDir badpixelmaps

! number of autosaved images to store (may contain spaces)
MaxFileNum   10

! number of last autosaved image
! (typically best left alone, so commented out)
! LastFileNum  0

! 0 for normal operation (read commands from the serial port)
! 1 to debug (read commands from the console window)
Debug        1

! camera data is as follows:
ID number, type, name, x size, y size, bits/pix, has bad pixel map (0 if false, 1 if true), desired temperature (C), gain (e-/ADU), read noise (e-)
Camera 0 none none 1600 1600 16 0 1 0
Camera 1 PXL PXL1024 1024 1024 16 -25 9.7 21
Camera 2 SenSys SenSys 768 512 12 10 40 26
Camera 3 SenSys SenSys2 1536 1024 12 10 40 26
Camera 4 SenSys SenSys 768 512 12 10 20 19
Camera 5 SenSys SenSys2 1536 1024 12 10 20 19
Camera 6 SenSys SenSys 768 512 12 10 5 13
Camera 7 SenSys SenSys2 1536 1024 12 10 5 13

showiminfo

Return data about the current image in memory. Sample output:

 

showiminfo
1 1 0 0 0 0 nan 0 nan "image: binXY begXY sizeXY expTime camID temp"

showiminfo
1 1 0 0 1024 1024 nan 0 nan "image: binXY begXY sizeXY expTime camID temp"

showparams

Return the value of all user-settable parameters. Sample output:

 

showparams
6.00 53 "params: boxSize (FWHM units) maxFileNum"

showstatus

Concatenate output of showparams, showcaminfo and showiminfo. Sample output:

 

showstatus
1 "PXL1024" 1024 1024 16 -20.89 318 "camera: ID# name sizeXY bits/pixel temp lastFileNum"
1 1 0 0 0 0 nan 0 nan "image: binXY begXY sizeXY expTime camID temp"
8.00 1000 params: boxSize (FWHM units) maxFileNum

showversion

Returns the software version and date. Sample output:

 

showversion
Guider Image Controller v3.0b2 3/26/97

stats region

Compute and prints statistics for the given region. Sample output:

 

stats 0 0 0 0
819.33 106.27 455.00 21678.00 1048576 0 "mean stdDev min max nGoodPix nBadPix"

Parameters

region

Four numbers specifying a region of interest, as follows:

xCtr yCtr xSize ySize

where:

For example:

7.5 1 3 4

requests a 3x4 box of pixels centered on the center of pixel 7 in x and the boundary between pixels 0 and 1 in y. This is a rectangle extending from pixel 6,-1 through pixel 8,2 (inclusive). However, a portion of this requested region is out of range (less than zero), so the actual region will be truncated to a 3x3 box extending from pixel 6,0 through 8,2 (inclusive).

History

2003-11-06 manual fixes

4.1 2002-05-22

4.1b5 2001-06-18

4.1b4 2001-06-01

4.1b3 2001-05-18

4.1b2 2001-04-04

4.1b1 2001-03-07

4.0b3, 1/18/00

Ported to Windows 95 with support for Apogee Cameras. This version has two targets and still supports the Macintosh with the Photometrics cameras. The port required the following changes:

For more detailed information you may want to look at the file "4.0 Developer Notes" in the development directory

3.0b27, 6/22/99

3.0b26, 6/21/99

3.0b25, 6/17/99

3.0b24, 6/17/99

3.0b23, 6/16/99

3.0b22, 6/16/99

3.0b21, 6/16/99

3.0b20, 6/14/99

3.0b19, 6/1/99

3.0b18 4/8/99

3.0b17, 12/14/98

Changes in versions 3.0b12 - 3.0b16 were not recorded

3.0b11, 8/19/97

(note: 3.0b10 was never released)

3.0b9, 8/11/97 (created 8/18/97)

This version number and date were used for two releases (oops). These notes refer to the later release, which was built 8/18/97.

3.0b5-3.0b8

3.0b4, 4/7/97

3.0b3, 4/4/97

3.0b2, 3/31/97

2.0, ?/?/96

This version was developed by Jeff Morgan, but the manuals were apparently never updated. Changes include:

1.1, 7/25/95

1.0b11.x, 3/17/95

1.0b10, 3/17/95

1.0b9, 3/17/95

1.0b8, 3/17/95

1.0b7, 3/17/95

1.0b5? 6?, 3/15/95 if 5

1.0b4, 3/13/95

1.0b3, 11/21/94

First release, by Russell Owen.


Russell Owen, Bruce Truax