Function CreateDateTimeWave(year, dayOfYear, timeOfDay, newWaveName)Wave year
Wave dayOfYear
Wave timeOfDay // 1200 represents noonString newWaveName // Name for new waveVariable numPoints = numpnts(year)// Assume all input waves have the same number of pointsMake/O/N=(numPoints)/D $newWaveNameWave w = $newWaveName// Create wave reference to new waveSetScale d, 0, 0, "dat", w // Tell Igor it is a date/time wave
w = date2secs(year, 0, 0)// Convert to Igor date/time format (seconds since 1/1/1904)
w += dayOfYear *60*60*24// Add seconds corresponding to day of year
w += (timeOfDay /100)*60*60// Add seconds corresponding to time of dayEnd
You can use the resulting wave as the X wave of an XY pair for graphing.
You can use the resulting wave as the X wave of an XY pair for graphing.
August 16, 2008 at 06:21 am - Permalink
August 18, 2008 at 09:27 pm - Permalink