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_SLIT. This procedure is only run on the slit edges.
The other distorsion (based on an optical model of Keck) is done at PROJ_TO_MASK phase.