slitanglex -- Calculate the angle of the spectrograph lines in relation to AXIS1.
slitanglex input table
This program calculates the angle, in degrees, that the lines in a longslit spectrograph make in relation to AXIS1.
The user must specify which spectral line is to be measured by providing a table containing coordinate pairs on separate lines; these coordinates delineate the sides of the line. Using these positions, the program finds the centroid of the data values between each pair of points, which define a rectangle, to mark a position on the spectrum. A least squares line is fitted to every point in the set describing one line with the slope being the tangent of that line's angle. After processing all sets, the mean angle is calculated and written to the parameter file, together with the standard deviation of the set of angles.
The spectral lines can be made horizontal by applying the negative of the angle to the geometric reference grid.
- input [file name]
- The name of the input image. This program assumes that the image was corrected for PDA distortion.
- table [file name]
- The table containing the spectral line's position coordinates.
- (xcol = c1) [string]
- Column name containing the X position data.
- (ycol = c2) [string]
- Column name containing the Y position data.
- (setcol = c4) [string]
- Column name containing the line set data---this may be either an integer or a character string. Each spectrograph line must have a unique set identifier in the table.
- (angle = INDEF) [real]
- Program-defined variable containing the angle measured by slitanglex, in degrees.
- (sdangle = INDEF) [real]
- Program-defined variable containing the angle's standard deviation.
1. We have a table "tabpos" containing the following data from a spectrograph image, as measured on an image display of "spec" with the task lists.rimcursor:
210.4659 960.1243 101 a 203.9591 884.1797 101 a 144.7564 871.541 101 a 137.5658 960.1243 101 a 44.14075 931.6497 101 a 55.77615 862.0244 101 a 55.77615 691.1772 101 b 66.04392 627.8712 101 b 122.5114 627.8712 101 b 127.9818 719.6517 101 b 211.8335 719.6517 101 b 205.6686 651.6063 101 b 205.6686 539.2878 101 c 199.8562 469.6625 101 c 134.8306 433.2513 101 c 127.6399 521.8721 101 c 62.28299 521.8721 101 c 75.28599 456.9863 101 cThe last column is the key---pressed to mark the cursor position---and is the same for all positions along a particular line.
The following command will find the angle:
fo> slitangle spec tabpos xcol=c1 ycol=c2 setcol=c4
This task was written by David Giaretta.
Type "help reseau" for a description of reseau files.