SCoeff

class pylayers.antprop.spharm.SCoeff(typ='s2', fmin=0.6, fmax=6, lmax=20, data=array([], dtype=float64), ind=array([], dtype=float64), k=array([], dtype=float64))[source]

Bases: pylayers.util.project.PyLayers

scalar Spherical Harmonics coefficients

d = np.array [Nf,N+1,M+1]

s2 shape 2 np.array [ Nf x (N+1)*(M+1) ] s3 shape 3 np.array [ Nf x K ] ind [ K x 2]

Methods Summary

delete(ind, typ)

delete coeff

delete3(ind)

delete coeff.s3

inits2(data, ind)

initialize shape 2 format

inits3(data, ind, k)

initialize shape 3 format

plot([typ, title, xl, yl, log, stem, color])

plot coeff

put(typ)

recover last deleted coeff

put3(i, i3)

function put3

s3tos2()

transform shape3 to shape 2

show([typ, k, L, M, kmax, seuildb, titre, …])

show coeff

Methods Documentation

delete(ind, typ)[source]

delete coeff

ind : int typ : int

2 shape 2 (Nf , N*M ) 3 shape 3 (Nf , K ) T ( K x 2 )

delete3(ind)[source]

delete coeff.s3

ind : int

inits2(data, ind)[source]

initialize shape 2 format

data : shape 2 data ind : np.array

index for shape 2

inits3(data, ind, k)[source]

initialize shape 3 format

data : shape 3 data ind : shape 3 indexing k : k

plot(typ='s3', title='', xl=False, yl=False, log=False, stem=True, color='b')[source]

plot coeff

typstring

‘s3’

title xl yl log stem: boolean color

put(typ)[source]

recover last deleted coeff

typint

2 : shape 2 (Nf , N*M ) 3 : shape 3 (Nf , K ) T ( K x 2 )

put3(i, i3)[source]

function put3

i : int i3 : int

s3tos2()[source]

transform shape3 to shape 2

s2 shape 2 array [ Nf x (L+1)*(M+1) ] s3 shape 3 array [ Nf x K ] ind [ K x 2]

The shape of s2 is (Lmax+1)*(Lmax+2)/2

k2 : is the list of conserved indices in shape 3 ind3 : np.array (K3, 2) are the conserved (l,m) indices

ind3 and k2 have one common dimension

show(typ='s1', k=0, L=-1, M=-1, kmax=1000, seuildb=50, titre='SHC', xl=True, yl=True, fontsize=14, dB=True, cmap=<matplotlib.colors.LinearSegmentedColormap object>, anim=True)[source]

show coeff

typstring

default (‘s1’) ‘s1’ shape 1 (Nf , L , M ) ‘s2’ shape 2 (Nf , L*M ) ‘s3’ shape 3 (Nf , K ) and ( K x 2 )

kinteger

frequency index default 0

N, M = maximal value for degree, mode respectively (not to be defined if ‘s2’ or ‘s3’)