
lost ten seconds

PhysixDad
I am just trying to find the midpoint in a wave that has time in seconds from the beginning of 1904.
I tell it to print the value: I get 21:34:46
I tell it to assign it to a global variable and i print it and i get 21:34:46
I assign it to a wave and then put it in a table and I get 21:34:56
Print secs2time(Mean(wTimeTest),3) Variable/G midpoint=median(wTimeTest) Print secs2time(midpoint,3) Make/O/N=1 NewWave NewWave[0]= midpoint Edit NewWave
There has to be a simple explanation to this related to the formatting in IGOR or that they are accounting for the change in the size of the universe since 1904.
Any help would be appreciated.
Waves to receive date/time values need to be double precision. Change your Make command to Make/D. There are a lot of seconds since 1904!
February 1, 2024 at 05:03 pm - Permalink
That did it. Thanks so much. Secretly I was hoping it was because of some change in the universe that Igor Pro was accounting for...
February 1, 2024 at 05:46 pm - Permalink
Igor is quite fast, but not that fast!
February 2, 2024 at 10:26 am - Permalink
Single precision date waves do not consider leap years. :)
February 4, 2024 at 03:53 pm - Permalink