added function to create laser frequency vs time