I think it is very difficult to interpolate your data, since they are varying a lot. It is also true that the plot is in log scale so it is not easy to judge. It will depend on how many data points you have where you have all those peaks.
thank you for your answer.
I have too many points but the peaks are very sharp.
the interpolation function you posted, I could not run it,
the output is that the math libraries don’t work.
and i am not familiar with the GLS libraries
do you have an Idea how to use the interpolation code?? please
regards
Can you please upload your data points or just the TGraph object you have used in the figure above and I can provide you an example on how to use the GSL based code.
Otherwise your can find examples also here,
Thank you for your code. The problem is due to the low number of points used to draw the spline. (by default is 100).
If you increase it by calling for example TSpline::SetNpx(10000) you will increase it .
I attach a new version of your code where I use also the ROOT::Math::Interpolator class. In this case you can specify directly the points you want to evaluate your interpolation.
Hello,
Thank you for help and collaboration, this is very useful.
Yes. “TSpline::SetNpx(10000)” solved the problem.
and thank you for the modification, on my root version “Math/Interpolation” class is not installed in my root version.
for this I need to reinstall root from scratch.
It is not needed to reinstall from scratch. You need only to re-configure ROOT with the option -mathmore=ON and being sure to have a GSL version installed in your system. If GSL is not found, you need to download and install it, but it is a simple and straightforward procedure. If you need help for this please let me know.
Best regards
Mathmore should be in the binary distribution. Which version are you using ? It is possible you are using an old ROOT version, that was shipped without the library.
In that case the easier is to update, if you can, to a newer version of ROOT, otherwise you cannot add package to an existing binary distributions
Sorry, yes, mathmore is there, I am using binary root6.18/04, but I don’t have GSL,
so can not run your histogram1.C.
Since I don’t have the root password of the PC, I can install the GSL only in my home directory.
Could you please tell, how can I force the binary root to use the GSL from my home directory?
[smbat@localhost ~]$ ldd ${ROOTSYS}/lib/*so|grep -i gsl
libgsl.so.0 => not found
libgslcblas.so.0 => not found
libgsl.so.0 => not found
libgslcblas.so.0 => not found
libgsl.so.0 => not found
libgslcblas.so.0 => not found
libgsl.so.0 => not found
libgslcblas.so.0 => not found
ldd: warning: you do not have execution permission for `/home/smbat/Downloads/root/lib/libtbbmalloc_proxy.so'
ldd: warning: you do not have execution permission for `/home/smbat/Downloads/root/lib/libtbbmalloc.so'
ldd: warning: you do not have execution permission for `/home/smbat/Downloads/root/lib/libtbb.so'
ldd: warning: you do not have execution permission for `/home/smbat/Downloads/root/lib/libvdt.so'
................................................
..............................................
I guess the best idea would be to ask the “administrator” of your PC to install the missing operating system provided / default “libgsl” package (it aill automatically install “libgslcblas”, too).
Actually, you should ask them to install all “missing” system packages: ldd ${ROOTSYS}/lib/*.so | grep "found" | sort -u
Thanks a lot, after installation of the “libgsl” I can run the histogram1.C.
Could you please explain, why I need to install other packages given by ldd ${ROOTSYS}/lib/*.so | grep "found" | sort -u