astrocut icon indicating copy to clipboard operation
astrocut copied to clipboard

Precision on timestamps in Tess data

Open benmontet opened this issue 5 years ago • 6 comments

Hello!

We've come across an issue in the timestamps in TessCut frames (TessCut is a wonderful service, by the way!)

When I look the astrocut file timestamps, there is a digitization that I can see in them when we plot the difference in time between consecutive frames. We think this is a floating point rounding error in the timestamps, somewhere they are being stored as 32-bit floats and since the time values have four digits before the decimal place, this limits the precision to ~10 seconds on any individual data point.

You can see what I mean in figure form at https://github.com/afeinstein20/eleanor/issues/119. The code to reproduce this is below:

tc = fits.open('tess-s0001-4-3_97.842681_-68.044906_10x15_astrocut.fits')
plt.plot(np.diff(86400*tc[1].data['time']), '.')
plt.ylim(1795, 1805)
plt.xlabel('Cadence', fontsize=20)
plt.ylabel('Delta Time (sec)', fontsize=20)

image

The TASOC light curve times look proper, so we think it's a processing issue along the way rather than the way the telescope is recording data. If you think it's something upstream from astrocut where the bug is then I'm happy to work my way up the chain until we figure out where this is being induced.

Thanks so much! Ben

benmontet avatar Sep 05 '19 02:09 benmontet

Thanks for pointing this out!

Can you just clarify what you would expect to see if this bug was not present?

ceb8 avatar Sep 12 '19 13:09 ceb8

Yes of course! If the bug weren't present, the difference in time between cadences should be nearly constant. In the frame of the spacecraft, they should be exactly constant, plus then there will be a smooth correction due to changes in barycentric correction as the spacecraft orbits the earth---and there shouldn't be any structure on shorter timescales.

Here's a plot for two minute data binned down to 30 minute cadence. Note the y-scale, the change over an orbit is only 0.005 seconds or so!

image

benmontet avatar Sep 20 '19 17:09 benmontet

Great, thanks! I'll put this on my list of things to fix.

ceb8 avatar Sep 20 '19 18:09 ceb8

Hi @ceb8, just wondering if there's been any progress on this?

danhey avatar Jul 03 '20 04:07 danhey

@danhey There has not been. Apologies. It's still on my list, I promise.

ceb8 avatar Jul 10 '20 16:07 ceb8

@danhey This is fixed in the code and on master, but it hasn't bubbled up to TESScut yet. Also, because of where the bug was, I will have to go back and fix all existing TESS FFI cubes on our systems, which will take a bit. I will keep you updated.

ceb8 avatar Aug 02 '20 03:08 ceb8