Re: Interpolate within two data sets

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Wed, 29 Jun 2011 20:19:55 +0000


Hi Hermann,

 Hi HErmann,

 If I understood well you want to perform an interpolation in 2 dimension (length and energy). The interpolator class can be used for one-dim data, for example in your case to get new values at different length than those given.

You might want try to use the TGraph2D class and its Interpolate function.

 Regards,
 Lorenzo
On Jun 27, 2011, at 9:41 AM, Hermann Fuchs wrote:

> Dear Root-Users
>
> I do have two data sets, describing measurements at different energies,
> each data set contains a length(position) and an arbitrary value (of
> interest). The number of data points within these sets can be different
> (different positions as well).
>
> I want to interpolate values at an energy in between these two.
> To use the Interpolator function I would basically need to create a
> third data set at an energy in between these two.
>
> What I found so far: I could implement it in the following way:
> Use Interpolator class to interpolate data set A to get a fixed number
> of data points, do the same with data set B. Now call the Interpolator
> for every data point in A and B to get the new data set.
> This sounds quite inefficient to me. Is there a better way to do that?
>
> Example (I just made up the values)
> A(@100MeV)
> length value
> 0.15 23
> 0.25 26
> 0.35 43
> 0.45 44
> 0.55 50
>
> B(@200MeV)
> length value
> 0.17 24
> 0.27 27
> 0.37 44
>
> Cheers,
> Hermann
>
> --
> -------------
> DI Hermann Fuchs
> Div. Medical Radiation Physics
> Department of Radiotherapy
> Med. Univ. Vienna / AKH Vienna
> Währinger Gürtel 18-20
> A-1090 Wien
>
> Tel. + 43 / 1 / 40 400 7271
> Mail. hermann.fuchs_at_meduniwien.ac.at
>
Received on Wed Jun 29 2011 - 22:20:10 CEST

This archive was generated by hypermail 2.2.0 : Thu Jun 30 2011 - 11:50:01 CEST