3D Interpolation

Hi,


my question refers to 3D interpolation. I am working with a dataset of four weeks with a 1 min time resolution. This dataset was created with a scientific instrument and I calibrated the instrument at the beginning and at the end of the four week period. The sensitivity of the instrument depends on humidity and time. During the first calibration I measured at four different humidities and during the last one I measured at three different humidities. The humidity dependency is exponential. Furthermore the sensitivity decreases linearly over time. Now I would like to interpolate the calibration factor linearly regarding time with an increment of 1 min and exponentially regarding humiditiy with an increment of 1 or 2 % relative humiditiy. I tried some things using Interp3DPath, but it didn't work. I am not very experienced in Igor programming and I hope someone can help me.
Thank you for your time.


Best,


Bettina
Hello Bettina,

The built-in 3D interpolation tools are all assuming that you have a set of scalar values say {fi} sampled at a set of XYZ locations {xi,yi,zi}. The sampling can be on a grid or at random locations. This does not seem to apply in your case.

If I understood your application correctly it sounds as if you would might be able to compute your calibration factor in two steps:

1. Apply the exponential model once to the responses you measured at the start and a second time to the responses you measured at the end. If you succeed in fitting this exponential curves you should have waves representing the fit: one for the start (say w1) and one for the end of the experiment (say w2). Make sure that they cover the same range!

2. If your model says that the calibration factor changes linearly with time, you can use standard linear interpolation between every pair of points in w1 and w2. You would then generate a 2D array of values where the Y-axis corresponds to humidity and the X-axis corresponds to time. The code would look something like:
Variable detlaT=...  // total time from start to end
Variable dt=... // sampling time interval desired in output
Variable tStart=...  // the time at the first sample

Make/N=(nTimes,DimSize(w1,0)) responseWave   // create output
SetScale/P x tStart,dt,"", responseWave               // set the x-axis scaling to appropriate time range
SetScale/P y DimOffset(w1,0),DimDelta(w1,0),"", responseWave  // set the y-axis to that of w1,w2 scaling
responseWave=w1[q]+(w2[q]-w1[q])(p*dt)/deltaT  // linear interpolation


I hope this helps,

A.G.
WaveMetrics, Inc.