Methods#

class kerpy.objs.Kernel.Kernel(content)#

Bases: object

divergence()#

Compute the divergence kernel of a complex kernel

Returns:

a real Kernel object

Return type:

Kernel

flip()#

Flip a kernel

Returns:

a Kernel object

Return type:

Kernel

pad(top=0, right=0, bot=0, left=0, value=0)#

Add padding to a Kernel

Parameters:
  • top (int) – Adds top padding

  • right (int) – Adds right padding

  • bot (int) – Adds bot padding

  • left (int) – Adds left padding

  • value (int) – Padding value

Returns:

a Kernel object

Return type:

Kernel

rot90()#

Rotate by 90 degrees

Returns:

a Kernel object

Return type:

Kernel

stride(strides=1, value=0)#

Add regularly new constant value between coefficients

Parameters:
  • strides (int) – Margin width to add between coefficients

  • value (int) – Strided value

Returns:

a Kernel object

Return type:

Kernel

to_reals()#

Compute the real and imaginary part of a complex Kernel

Returns:

a dict of real Kernel object

Return type:

dict