adding user definable starting phase for grating experiments