light pulse generation