set instrument state variable for CAL calculate angle of incidence on gratings alpha calculate dispersion angle beta from dispersion equation convert coordinates