Quadratic interpolation

Dear all,

I need to perform an linear interpolation over a 4 dimensions map.
My map is basically a 3D space (x,y,z) joined to an energy dimension ==> f(x,y,z,E)=value

I have discrete points on that map and I would like to interpolate it to have a value for all the coordinates.

Well for now I have just read my text file containing that map :

  TTree *MyTree = new TTree("MyTree", "MyTree");
  MyTree->ReadFile("all.txt", "X/I:E/I:alpha/D");

Would you happen by any chance to know whether such an function already exist in ROOT ?
I saw that the TH2F contain a method interpolation but my 4 dimensions datas won’t fit in a TH2F.
Now I found that link on GitHub with examples using #include “Math/Interpolator.h” but it is applied to 2 dimensions interpolation.

Thank you. P.


Hello @PPierre,

I am inviting @moneta to this topic as the relevant expert in this area. Unfortunately, I think he is off for a couple of days, so it might take a while to reply.

Cheers,
J.

Hi,

If you want to do linear interpolation of your data (3d data + regressor value), you can use a 3d histogram (e…g. TH3D). There is an Interpolate function, see :
https://root.cern.ch/doc/v608/classTH3.html#ad6e3388d1f127f018941f932a50a3e2d

The requirement is that you have a 3d data grid.

Lorenzo

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.