stilt.transforms.ak_weights#

stilt.transforms.ak_weights(particles, levels, values, coordinate='xhgt')[source]#

Return the averaging kernel at each particle’s release coordinate.

The kernel is interpolated linearly to each particle’s release value of coordinate and repeated on every row of that particle. Outside levels it is held at its end values.

Parameters:
  • particles (DataFrame) – Particle table with indx and coordinate.

  • levels (list[float]) – Levels the kernel is given on, in the units of coordinate.

  • values (list[float]) – Kernel value at each level.

  • coordinate (str) – Particle column to interpolate on: xhgt (release height, m) or pres (hPa).

Returns:

Kernel value for each row of particles.

Return type:

ndarray