comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » spherical harmonic representation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
spherical harmonic representation [message #67227] Tue, 21 July 2009 05:07
maurya is currently offline  maurya
Messages: 16
Registered: February 2009
Junior Member
Hi everybody,

I want to display spherical harmonics on a sphere, as given on web
page:

http://en.wikipedia.org/wiki/File:Spherical_harmonics.png (
http://en.wikipedia.org/wiki/Spherical_harmonics )

For this, I have written an IDL routine:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
pro sph_plot

l=5 ;harmonic degree
m=2 ;azimuthal order |m| <= l
nc=20 ;No. of contours
np = 100 ;No. of inclination angle(theta) and azimuthal angle(phi)

theta=-90+indgen(np)*(90-(-90))/float((np-1)) ;theta = -90,90
phi=-90+indgen(np)*(90-(-90))/float((np-1)) ;phi =-90,90

ff=fltarr(np,np)
for i=0,np-1 do for j=0,np-1 do ff[i,j]=real_part(spher_harm(theta[i]*!
dtor,phi[j]*!dtor,l,m,/doub))

window, 0, xsize = 512, ysize = 512, title = 'Spherical Harmonic'

MAP_SET,/HAMMER, /HORIZON, TITLE= 'Hammer-Aitoff Projection'

mx=max(ff)
lev=-mx+indgen(np)*(mx-(-mx))/float((nc-1)) ;levels: -mx to mx = nc
levels
pve=intarr(nc/2)
nve=intarr(nc/2)+1
contour,ff,theta,phi,/ove,levels=lev,c_linestyle=[pve,nve]

end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;

But, it is not giving results as expected (as given on the above web
page).

Can anyone help me.

Thanks
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Update PostScript
Next Topic: Re: spherical harmonic representation

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:46:29 PDT 2025

Total time taken to generate the page: 0.00567 seconds