| yp2d | stsdas.hst_calib.fos | yp2d |
yp2d -- Convert from image pixel number to FOS diode number.
yp2d pixel
yp2d is a script to help determine which diodes contribute to a specific pixel. The pattern information can either be obtained from an observation or from the task parameters. Pixels can be anything greater than 0; i.e. if an observation has more than one YSTEP, pixels will exist greater than 2064. These numbers can be entered without needing to convert.
Either a single pixel can be converted, or a file containing a list of pixels can be converted. The range of diodes are written to the task parameters dbeg and dend. In case of a list, only the last pixel in the list will be reflected in the parameters.
yp2d can also produce text output to standard output. The form of the text output is suitable for other tasks that use tables as input.
If a file is specified, it is expected to contain one column of pixel numbers. Comment lines are allowed.
1. Determine which diodes contribute to pixel 364
cl> yp2d 364 # yp2d: nxsteps = 4 overscan = 5 fchnl = 1 nchnls = 512 # pixel dbeg dend 364 87 91 cl> lpar yp2d pixel = 364 Input pixel number (obs = "") Observation to get step pattern from (plist = "") File containing a list of pixels to convert (nxsteps = 4) NX steps if no obs specified (overscan = 5) OVERSCAN if no obs specified (fchnl = 1) First channel (diode) to be read (nchnls = 512) Number of channels (diodes) to be read (dbeg = 87) Output: First diode contributing to pixel (dend = 91) Output: Last diode contributing to pixel (verbose = yes) Write results to standard output
2. Determine diodes for a list of pixels.
cl> for (i=1000; i<1500; i=i+5) print (i, >> "plist.txt") cl> yp2d plist=plist.txt # yp2d: nxsteps = 4 overscan = 5 fchnl = 1 nchnls = 512 # pixel dbeg dend 1000 246 250 1005 248 252 1010 249 253 ...
3. Get the pattern information from an observation.
cl> yp2d 364 obs=y2observ.c1h
This task is implemented as a cl script and hence is not very fast or robust.
Jonathan Eisenhamer
For assistance using this or any other tasks, please contact help@stsci.edu or call the help desk at 410-338-1082.