Instrument Data Fitting for the TCC
Version 2.0.2 Last updated 2015-09-10
Inst Data Fit allows one to determine various parameters needed for instrument data files, including: scale, orientation and the position of the rotator with respect to the instrument. Inst Data Fit can handle both instruments and guide cameras. Some sample data files are included.
Scale and Orientation
Collect the Data
- Move to a fairly bright (for the instrument) isolated star high in the sky and near the meridian. For a guider or slit viewer you can use
tcc command
track/pterr 10,70 obs
.
- Rotate with the object at zero degrees:
rotate 0 object
- Move the boresight to various locations on the instrument using tcc command
offset/pabs bore x, y
; note that x, y are in degrees, so use small values.
- At each offset position measure and record the centroid in pixels, being aware of the
zero convention.
- Record the boresight position (in degrees) and the centroid (in pixels) in a text file, in 4 columns, as follows.
Columns may be separated using spaces or a single tab. Leading and trailing lines that do not begin with digits will be ignored.
boresight x boresight y centroid x centroid y
(deg) (deg) (pixels) (pixels)
Fit the Data
- Run Inst Data Fit. Note that it has balloon help.
- Make sure the type of data is Instrument (Guider is obsolete). You can use the popup menu or the appropriate entry in the Macros menu.
- Specify all fields above the "Fit Scale and Orientation" button New Rot_Inst_ang. Use the balloon help if needed. You may leave Scale alone unless you check the Aspect Ratio is Exact box, in which case you must specify Scale X and Y such that their ratio (including the sign of the ratio) is exactly correct. (The magnitude need not be particularly close).
- Regarding GIm_Ctr or IIm_Ctr: this is the desired center of the image. Use the exact physical center of the imaging area unless you have some overwhelming reason to do otherwise; any other choice will cause great confusion among other astronomers and engineers. For example: a 1024x1024 CCD has a center position of (512,512), using the standard zero convention.
- Push the Fit Scale and Orientation button.
- It will ask you for a file; feed it your scale data file.
- A graph is drawn which indicates if the fit converged properly.
- If it does not converge and the Aspect Ratio is Exact box is checked then you may have the sign of Scale X wrong. Reverse the sign of Scale X, double check that the ratio is correct (i.e. for square pixels the absolute value of
Scale X should equal the absolute value of Scale Y) and perform the fit again.
- If that doesn't work, uncheck the Aspect Ratio is Exact box and fit again. If the fit converges but the ratio of the scales is way off, then your data is defective.
- If the fit fails to converge with Aspect Ratio is Exact unchecked, then your data is probably defective.
- Results appear in the lower window (Inst Data Fit...), including error estimates. The main panel is also updated. Pay careful attention to the sign of scale x (scale y is always positive). Please be sure to apply these results to the instrument block before measuring
Center of Rotation data. If you fail to update the instrument data file and load it, the center of rotation data may be useless.
Apply the Results
- Edit the instrument data file (on the TCC in directory TINST:); the relevant parameters are:
- for an instrument:
IIm_Scale
(scale) and Rot_Inst_ang
(orientation)
- for a guider, scale is entered as
GIm_Scale
, but orientation is entered as GProbe data: angle of rot w.r.t. image
- Load the new instrument data file using tcc command
set instrument=name
- Verify that the new values have been loaded using tcc command
show block inst
Center of Image and Position of Rotator or Guide Probe
Collect the Data
- Make sure scale and orientation are set correctly in the TCC, e.g. using tcc command
show block inst
. This is especially important if you computed new scalen and orientation values, i.e. make sure you successfully applied and saved the results.
- Move to an FK5 star which is high in the sky and near the meridian, e.g.
track/pterr 10, 70 obs
- Zero the boresight position (instrument-plane offset) using tcc command
offset/pabs bore 0, 0
- Move the star part-way between the center of the CCD and the edge using an arc offset:
offset arc ra, dec
. Do not use boresight offsets; the boresight must stay at (0,0)!
- Rotate to various angles using tcc command
rotate/rotwrap=near ang obj
(/rotwrap=near is optional, but may help reduce unexpected unwrapping). At each angle measure the centroid of the star in pixels, as above.
- Record rotator angle (in degrees) and centroid (in pixels) in a text file, in 3 columns, as follows (see also format notes):
angle centroid x centroid y
(deg) (pixels) (pixels)
Fit the Data
- Make sure the type of data is Instrument (Guider is obsolete). You can use the popup menu or the appropriate entry in the Macros menu.
- Make sure all values except the last new_..._xy values above the Fit Center of Rotation button are correct and were the values used to take the data.
- Regarding GIm_Ctr or IIm_Ctr: this is the desired center of the image. Use the exact physical center of the imaging area unless you have some overwhelming reason to do otherwise; any other choice may cause confusion among other astronomers and engineers. For example: a 1024x1024 CCD has a center position of (512,512) (using using the standard zero convention).
- Push the Fit Center of Rotation button.
- Select your data file when requested.
- A graph is drawn which indicates if the fit converged properly. If the fit does not converge:
- Make sure the Scale X and Y values in the
Fit Instrument Data window are correct, including
sign.
- Make sure you entered the offsets and/or rotator angles by talking directly to the TCC. If you enter these into the MC or Remark, instead, you may get odd sign changes that mess up your data. If this is the problem then I suggest retaking all data, including that for scale and orientation.
- Make sure the scale and orientation data in the TCC is correct, including sign. If they are wrong, you must fix the problem and then take the center-of-rotation data again.
- Results appear in the lower window (Inst Data Fit...), including error estimates. The main panel is also updated. Pay careful attention to the sign of scale x (scale y is always positive).
Apply The Results
- Edit the instrument data file (on the TCC in directory TINST:); the relevant parameters are:
- for an instrument:
IIm_Ctr
(desired center) and Rot_Inst_xy
(center of rotation with respect to instrument)
- for a guider:
GIm_Ctr
(desired center) and guide probe pos. of rot w.r.t. image
(cnter of rotator with respect to guide probe).
- Load the new data using
set instrument=name
- Verify that the new values have been loaded using
show block inst
Zero Conventions
- The zero convention used by the TCC and by APO guiders is: (0,0) is the lower left corner of the chip, so (0.5,0.5) is the center of the lower left pixel. However, FITS and ds9 use (1, 1) as the center of the lower left corner pixel.
Revision History
- 2.0.2 2015-09-10 R.O. Updated the information for the new tcc, including always using the Instrument panel (never the Guider panel) of the fitter, updating TCC commands (especially track/pterr) and correcting the discussion of zero convention.
- 2.0.1 2007-09-04 R.O. Minor html cleanup.
- 2.0 2001-09-28 R.O. Added support for "full-frame" guiders. One can get the gp_rot_xy from the instrument center-of-rotation data instead of having to take a redundant third set of data (or skipping that step and getting into trouble).
- 1.9 3/15/01 Minor update to comments. Final release of 1.9.
- 1.9b5 3/15/00 Added output of the desired and fit center when fitting center of rotation. Removed a constraint on the scale and orientation graph that wasn't doing anything useful. Looked for more errors like the ones fixed in 1.9b4 and found none. R.O.
- 1.9b4 3/14/00 Fixed two bugs in center of rotation fitting: the y component of new_rot_inst_xy was wrong and the desired center was being mis-displayed. Both errors were caused by typos involving confusing _y and _x. Not publicly released. R.O.
- 1.9b3 5/28/99 Improved the controls layout and documentation. The main motivation was to make it clear that xIm_Ctr must be specified before fitting scale and orientation). Also fixed a zero convention error in the balloon help. R.O.
- 1.9b2 5/19/99 Added support for new guider handling. Made separate guider and instrument panels.R.O.
- 1.8.1 6/19/97 Fixed a sign error in scale and orientation fitting. Also improved the instructions and documented the iraf/new guider zero convention. R.O.
- 1.7 11/7/96 Added handling for the binning factor. Modified the instructions so that new scale and orientation values are applied to the instrument block before measuring center-of-rotation data (to solve a problem brought to light by SPICam). Rewrote the documentation in HTML format. R.O.
- 1.6 3/25/96 Fixed sign/quadrant bugs in scale and orientation fitting. Modified so that y_scale is always positive; this is correct for drift-scanning. Added graphs to show fit and measured data (Dan Long's suggestion). R.O.
- 1.5 4/19/94 Another attempt to fix Rot_Inst_xy fitting. R.O.
- 1.4 4/14/94 Corrected bugs in Rot_Inst_xy; removed centering requirements. R.O.
- 1.3.1 4/11/94 Slight modifications to this Readme; no change to the application. R.O.
- 1.3 4/8/94 Added experimental Rot_Inst_xy; first version with revision history. R.O.