Do I need equally paced values to do a Fourier Cosine Transform? I am gathering data from a sensor, but the data gathering depends on a code running, so the timing is not precise to make it equally paced.

What I mean is this, the time it takes to do measurement #1 and #2 is not exactly the same between measurement #2 and #3 and so one.

I may have data like this:

value = 20 taken at t=0s
value = 21 taken at t=0.2s
value = 44 taken at t=0.44s
value = 22 taken at t=0.67s
value = 33 taken at t=0.9s
value = 32 taken at t=1.3s


As you can see the time between measurements is not exactly the same and can vary slightly.

The idea is to perform a Fourier Cosine Transform on the discreet values.

First question is:


will this not equally time between the measurements affect the DCT?
what can be done to "normalize" the data to have constant times?
All standard transforms in DSP (including Fourier transforms or Cosine transforms etc.) assume uniformly sampled (time, space or frequency) input data.

When your data is nonuniformly sampled, you cannot directly use the standard algorithms. 

You should either convert them into uniform samples and then use the standard algorithms or use specific algorithms that work on nonuniform data directly.

For the conversion, look for non-uniform to uniform interpolators.