pymiediff.special.f_der_torch

Contents

pymiediff.special.f_der_torch#

pymiediff.special.f_der_torch(n: Tensor, z: Tensor, f_n: Tensor, **kwargs)#

eval. derivatives of a spherical Bessel function (any unmodified)

last axis of z and f_n is Mie order!

use max of n as maximum order, last dimension of f_n contain the spherical bessel values at z and needs to carry all orders up to n.

d/dz f_0 = -f_n+1 + (n/z) f_n, for n=0 d/dz f_n = f_n-1 - (n+1)/z f_n, for n>0

f_n: torch.Tensor of at least n=2

Parameters:
  • n (torch.Tensor or int) – integer order(s)

  • z (torch.Tensor) – complex (or real) arguments to evalute

  • f_n (torch.Tensor) – Tensor containing f_n(z) for all z, where f_n is any unmodified spherical Bessel function (same shape as z).

  • kwargs – other kwargs are ignored

Returns:

tensor of same shape as f_n

Return type:

torch.Tensor