# Converted from etasymmetric.m - eta for slab, cylinder, sphereimportnumpyasnpfromscipy.specialimportivasbesselifrommiscimportsave_asciiphi=np.logspace(-2,2,50).reshape(-1,1)# scaled Bessel functions to prevent overflowbessel0=besseli(0,2*phi)*np.exp(-2*phi)bessel1=besseli(1,2*phi)*np.exp(-2*phi)eta1=(1./np.tanh(3*phi)-1./(3*phi))/phi# sphereeta2=bessel1/phi/bessel0# cylinder (scaled)eta3=np.tanh(phi)/phi# slabtmp=np.column_stack([phi,eta1,eta2,eta3])save_ascii('etasymmetric.dat',tmp)