STScI Logo

imgscale stsdas.hst_calib.hsp



imgscale -- Calculate plate scales (aperture location calibration phase II).


imgscale infiles inmasks nfiles npeak low_limit outtable


Use the data from area scans obtained at a grid of different pointings. The highest npeak points are selected from each file and a centroid position is obtained for these npeak points. A lower limit is then obtained by multiplying the highest count of all measurements by a user specified fraction (specified with the low_limit parameter). If a file's highest count level is below this lower limit, its data are rejected. The remaining centroid positions are then used to determine the plate scales and the rotation angle between V2,V3 and X,Y deflection coordinate systems.

The input data files must have only one group. The maximum size of the input area scan is 50 x 50. The maximum number of input files is 40.


infiles [file name template]
Input file template consisting of a list of input files. The following keywords are needed from the science file header of each file:

'ROOTNAME'      Rootname of the observation set (char*10).
'MODE'          Observation mode (char*3).
'DATA_FMT'      Data format (char*4).
'DETECTOB'      Detector of the object (int).
'EPOCh'         Epoch of the observation (double).
'VHORIZ'        X deflection of the starting point (int).
'VVERT'         Y deflection of the starting point (int).
'VHPOINTS'      Number of area scan columns (int).
'VVPOINTS'      Number of area scan rows (int).
'VHORSTPT'      Horizontal step per point (int).
'VVERSTPT'      Vertical step per point (int).
'VNOINTPT'      Number of integrations per point (int).
'V2'            V2 coordinate of the area scan center (real).
'V3'            V3 coordinate of the area scan center (real).
inmasks [file name template]
List of mask files corresponding to the input files.
outtable [file name]
File name of the output table created by imgscale; this table has the following columns:

'X_SCALE'       Plate scale of X axis relative to V2 (real).
'Y_SCALE'       Plate scale of Y axis relative to V3 (real).
'ROTATE_ANGLE'  Rotation of X-Y relative to V2-V3 (real).
'TARGET_V2'     V2 coordinate of the target (real).
'TARGET_V3'     V3 coordinate of the target (real).
'LOW_LIMIT'     Fraction of the highest count, points below this
                count level are rejected (real).
'NPOINTS'       Number of data points used to determine plate
                scale (int).
'NPEAK'         Number of highest points selected in each input
                file (int).
nfiles [integer, min = 1, max = 40]
Number of input files that contain the area scan data.
npeak [integer, min = 1]
Number of highest points to be selected in each file to determine a centroid position.
low_limit = 0.[real, min = 0., max = 0.25]
Fraction of the highest count level; points below this level will be rejected in determining plate scale, etc. To prevent possible exclusion of the target, e.g., if it falls at the intersection of four adjacent pixels, this value should not exceed 0.25.
(okval = 1.) [real]
Mask value for good points.
(hitval = 0.) [real]
Mask value for bad points and particle events.


1. Calculate plate scales from the input files listed in infiles.lis and input masks listed in inmasks.lis. Put results in the output table yimgscale$output. There are four input files and masks. Four highest points are used in each file to determine the coordinate of the peak intensity via a centroid method. Points which are below 20% of the highest count of all files are rejected from further calculations. The file infiles.lis contains the following:


and the file inmasks.lis contains the following:


hs> imgscale "@infiles.lis" "@inmasks.lis" "yimgscale$output" 4
              4 0.2 okval=1 hitval=0


hs> imgscale "ximgscale$infile![1-4].hhh"
              "ximgscale$infile![1-4].msh" "yimgscale$output" 4
              4 0.2 okval=1 hitval=0

or, if these four file pairs are the only such files in 'ximgscale',

hs> imgscale "ximgscale$infile*.hhh" "ximgscale$infile*.msh"
              "yimgscale$output" 4 4 0.2  okval=1 hitval=0

If list files are used (as in example 1), the list files must be local files.




Source Code · Package Help · Search Form · STSDAS