This is a flow chart for dsimulator.
Some notes about it.
The input/output in light blue is in the sky plane. The input/output in green is the mask plane.
Iraf procedures are in CAPITAL letters.
The only use of actual distorsions is in LEN_SLITS. This procedure is only run on the slit edges.
# Open X-Projection mapping fdx = open (XPROJ_MAP, READ_ONLY, TEXT_FILE) call gs_ingest (fdx, asfx, asfy) ...... # We will need to recalculate something ... xlow = X2(sdat,ndx1) + SLIT_GAP(indat) xupp = X1(sdat,ndx2) - SLIT_GAP(indat) xcen = 0.5 * (xlow + xupp) yas = Y2(sdat,ndx1) dxlow = gseval (asfx, xcen, yas) yas = Y1(sdat,ndx2) dxupp = gseval (asfx, xcen, yas) dxavg = 0.5 * (dxupp + dxlow) dxlow = dxlow - dxavg dxupp = dxupp - dxavg call eprintf ("%6.3f %6.3f\n") call pargr (dxlow) call pargr (dxupp) if (pc1 == CODE_AS) { del1 = 0. del2 = X1(sdat,ndx2) - xlow - (dxupp - dxlow) } else if (pc2 == CODE_AS) { del1 = xupp - X2(sdat,ndx1) + (dxlow - dxupp) del2 = 0. } else { del1 = xcen - 0.5*SLIT_GAP(indat) - X2(sdat,ndx1) + dxlow del2 = X1(sdat,ndx2) - (xcen + 0.5*SLIT_GAP(indat)) - dxupp } X2(sdat,ndx1) = X2(sdat,ndx1) + del1 if (del1 != 0. && RELPA(sdat,ndx1) != INDEF) { tana = tan (RELPA(sdat,ndx1)) Y2(sdat,ndx1) = Y2(sdat,ndx1) + del1 * FLIP * tana } X1(sdat,ndx2) = X1(sdat,ndx2) - del2 if (del2 != 0. && RELPA(sdat,ndx2) != INDEF) { tana = tan (RELPA(sdat,ndx2)) Y1(sdat,ndx2) = Y1(sdat,ndx2) - del2 * FLIP * tana }
The other distorsion (based on an optical model of Keck) is done at PROJ_TO_MASK phase.