Fix to selection of static periods for stimulus updates

also minor fix to grating stim to alleviate meaningless warnings