HELP · SEE_ALSO
ybase -- Determine FOS Y-bases for aperture centers.
ybase input ybasetab profile bintable aper_pos pass_dir
Using a verticle scan across a Faint Object Spectrograph (FOS) aperture in the Y-direction, the center Y-position (i.e., the Y-base) of the aperture is determined by the following process:
1) A table of total counts in the input data as a function of the Y-position is created and sorted by ascending Y-position. 2) The location of the two Y positions are computed where the total is the average of the minimum and maximum total. The aperture center is then computed as the average of the two Y positions. 3) The centroid of the profile in Y is also computed. 4) The center is then computed using cross correlation of a template with all values equal to the maximum of the profile.
- input [file name template]
- The file names of the input Y-scan observations (all files must be for the same detector, grating, aperture, and polarizer mode combination). Each input file or group contains data for a single Y-step. Data must be supplied in ascending Y-position order and must have the same first channel and number of channels. The template may contain data for a maximum of 200 Y-positions.
- ybasetab = ybase [file name]
- Name of the output table file that will contain the results. This
table will have the following columns:
'DETECTOR' - Detector, i.e., AMBER or BLUE (char*5). 'FGWA_ID' - Grating, prism, or mirror mode, e.g, CAM, H13, or H19 (char*3). 'APER_ID' - Aperture, e.g., A-1, A-2, or B-2 (char*3). 'APER_POS' - Aperture position, i.e., UPPER, LOWER, or SINGLE (char*6). 'POLAR_ID' - Polarizer id, i.e., A, B, or C (char). 'PASS_DIR' - Pass direction 0 (for polarizer id=C), 1, or 2 (integer). 'DIODE1' - First diode used to compute Y-profile (integer). 'DIODE2' - Last diode used to compute Y-profile (integer). 'CENTER' - Aperture center computed from the edge locations (double). 'CROSSCOR' - Aperture center computed using cross-correlation (double). 'CENTROID' - Centroid of the Y-profile (double).
- profile = "profile" [file name]
- Name of the output table containing the profile (i.e., the total counts between DIODE1 and DIODE2) tabulated as a function of the Y-position. This output table has columns, YPOS and TOTAL, and is sorted by ascending Y-position.
- bintable = "bintable" [file name]
- Name of the output table containing the Y-bases as a function of
diode position. The input data between d1 and d2 is divided into
the number of bins specified by nbins and then Y-bases
are computed for each bin. The number of rows in this column is equal
to the value of nbins. The columns of this table are:
'DIODE' - Center diode position for each bin (double). 'CENTER' - Aperture center computed from the edge locations (double). 'CROSSCOR' - Aperture center computed using cross-correlation (double). 'CENTROID' - Centroid of the Y-profile (double).
- aper_pos = "lower" [string, allowed values: lower | upper]
- Aperture position identification for paired apertures. This parameter is ignored for single apertures.
- pass_dir = [integer, min=0, max=2]
- Pass direction of the polarizer mode. This parameter is ignored if the observation's POLAR_ID header keyword has a value of "C".
- (d= 0) [integer, min=0, max=512]
- First diode in the range used to compute the Y-profile.
The Y-profile is the total of input data between diodes d1
and d2. If d1 is set to zero, it will default to the values
in the following table.
AMBER DETECTOR BLUE DETECTOR fgwa_id d1 d2 d1 d2 CAM 260 280 230 250 H13 1 512 111 512 H19 1 461 1 512 H27 1 512 1 512 H40 1 512 1 512 H57 1 512 1 311 H78 101 512 1 512 L15 1 121 326 512 L65 61 216 291 391 PRI 366 496 26 147
- (d= 0) [integer, min=0, max=512]
- The last diode in the range used for computing the Y-profile. The value of d2 must be greater than or equal to that of d1. If d2 = 0, then its value will be taken from the preceding table.
- (nbins = 16) [integer, min=1, max=50]
- The number of bins into which to divide the data between d1 and d2 when calculating the output values for bintable.
- (y= -2048) [integer, min=-2048, max=2047]
- The first Y-position in the profile that is to be used in computing the center, centroid, and cross correlation center. The y1 parameter is needed when both apertures of a paired aperture, or both pass directions of a polarizer mode observation are contained in the profile.
- (y= 2047) [integer, min=-2048, max=2047]
- The last Y-position in the profile to be used in computing the center, centroid, and cross correlation center.
- (twidth = 256) [integer, min=1, max=INDEF]
- Size of the cross correlation template in Y-base units. The actual template size will be computed by dividing twidth by the average Y-step size of the input obsevations.
- (tabstat = "write") [string, allowed values: write | append]
- Method used to write output data to the ybasetab file. If set to "write", a new table will be created having the name specified by ybasetab. If set to "append", the results will be written to the end of an existing file.
1. Compute the Y-base for the detector, grating, or aperture observed in the file yscan1 (each Y-position is in a separate group). The results will be placed in a table file called ybtab1. The verticle profile will be stored in a table called yprof1.
fo> ybase yscan1.hhh[*] ybtab1 yprof1
If the increment between Y-steps in the input data is not relatively constant, then the center computed by cross correlation will be unpredictable.
Howard Bushouse, STSDAS
For assistance using this or any other tasks, please contact email@example.com or call the help desk at 410-338-1082.