Real-time, portable optical chemical sensing