Open ferdymercury opened 10 months ago
MATLAB and numpy offer numerical derivatives of an array, while ROOT does not. But it offers the opposite, TH1::Integral.
TH1::Integral
Some users do have interest in ROOT providing this method, either as TH1::Derivative or TMath::Gradient.
TH1::Derivative
TMath::Gradient
I proposed an implementation here: https://root-forum.cern.ch/t/numerical-derivative-of-an-array/57754/3?u=ferhue
ROOT v6.30/02 Built for linuxx8664gcc on Nov 27 2023, 19:50:38 From tags/v6-30-02@ With c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Binary directory: /opt/root/bin
Binary Release
Linux
https://root-forum.cern.ch/t/numerical-derivative-of-an-array/57754/3 https://numpy.org/doc/stable/reference/generated/numpy.gradient.html https://www.mathworks.com/help/matlab/ref/gradient.html
Hi @lmoneta , are you working on this one?
If you haven't started it, I'd be interested in implementing it as a first contribution to the repo.
Explain what you would like to see improved and how.
MATLAB and numpy offer numerical derivatives of an array, while ROOT does not. But it offers the opposite,
TH1::Integral
.Some users do have interest in ROOT providing this method, either as
TH1::Derivative
orTMath::Gradient
.I proposed an implementation here: https://root-forum.cern.ch/t/numerical-derivative-of-an-array/57754/3?u=ferhue
ROOT version
Installation method
Binary Release
Operating system
Linux
Additional context
https://root-forum.cern.ch/t/numerical-derivative-of-an-array/57754/3 https://numpy.org/doc/stable/reference/generated/numpy.gradient.html https://www.mathworks.com/help/matlab/ref/gradient.html