VSHCoeff

class pylayers.antprop.spharm.VSHCoeff(Br, Bi, Cr, Ci)[source]

Bases: object

Vector Spherical Harmonics Coefficients class

Methods Summary

drag3(Emin)

thresholded coefficient conversion

energy([typ])

returns aggregated energy over all coefficients

plot([typ, titre, log, stem, subp])

plot coeff

put3(i, i3)

put 3

s1tos2([L2])

convert shape 1 to shape 2

s2tos3([threshold])

convert vector spherical coefficients from shape 2 to shape 3

s2tos3_new(k)

convert vector spherical coefficient from shape 2 to shape 3

s3tos2()

shape 3 to shape 2

show([typ, k, N, M, kmax, seuildb, animate, …])

show VSH coeff

strip3()

Thresholded coefficient conversion

Methods Documentation

drag3(Emin)[source]

thresholded coefficient conversion

Emin : Minimum energy

energy(typ='s1')[source]

returns aggregated energy over all coefficients

typstring

{‘s1’|’s2’|’s3’}

Enp.array in the same shape as typ

s1 : (f,l,m) s2 : (f,l*m) s3 : (f,ncoeff<lm)

plot(typ='s3', titre='titre', log=False, stem=True, subp=True)[source]

plot coeff

typ titre log stem subp

put3(i, i3)[source]

put 3

i : int i3 : int

s1tos2(L2=-1)[source]

convert shape 1 to shape 2

shape 1 array [ Nf x (L+1) x (M+1) ] shape 2 array [ Nf x (L+1)*(M+1) ]

L2max level

default (-1 means all values)

s2tos3(threshold=-1)[source]

convert vector spherical coefficients from shape 2 to shape 3

thresholdfloat

default 1e-20

Energy thresholded coefficients

s2tos3_new(k)[source]

convert vector spherical coefficient from shape 2 to shape 3

k : number of coeff

s3tos2()[source]

shape 3 to shape 2

show(typ='s1', k=1, N=-1, M=-1, kmax=1000, seuildb=50, animate=False, title='')[source]

show VSH coeff

typstr

{‘s1’,’s2’,’s3’}

kint

frequency index

N : int M : int kmax : int

maximum of the unfolded coefficient axes

seuildB : float animate : boolean

default False

title : string

strip3()[source]

Thresholded coefficient conversion

The s3 minimum energy coefficient is deleted

ind : int ind3 : int