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

Home » Public Forums » archive » spherical harmonics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: spherical harmonics [message #76543 is a reply to message #21988] Thu, 16 June 2011 09:03 Go to previous messageGo to previous message
parama mukherjee is currently offline  parama mukherjee
Messages: 4
Registered: June 2011
Junior Member
Hi,
I downloaded the Spherepack application but meanwhile also chanced
upon the following code (I am posting only parts of it) in IDL that
claims to do spherical harmonic transforms. I did not want to use a
fortran/C code as I need to do transforms at every time step of my
calculation and thought going to and fro between IDL and Fortran may
not be very efficient. So if I can get this to work it will be really
helpful. The problem with the code right now is I cannot follow what
it means by collocation points, or the cp parameter that it lists as
one of its input. I post below the parts where it mentions about
collocation points :

; spherical_transform.pro - This routine performs a spherical
harmonic
; transform on a 2-D array.
;
; usage: B = spherical_transform(A,cp,lmax=lmax,period=period)
; where B(lmax,lmax) = transformed array ordered (l,m)
; A(n_phi,n_theta) = array to be transformed ordered
(phi,theta)
; cp = cosine of theta collocation points for theta grid
; lmax = maximum l in expansion (default is (2*n_theta-1)/
3)
; period = periodicity factor in phi

; This routine performs a spherical harmonic transformation on a 2-D
; (N_phi,N_theta) array. Currently all the work is done in idl, but
future
; versions may want to call C or Fortran routines for efficiency
reasons.
; The input parameters include the array A and the colocation points
for the
; grid (cos(theta)), which is of length N_theta, along with an
optional
; specification of lmax.

; preliminaries
costheta=double(cp)
------------------------------------------------------------ ----------------------
Now I was thinking maybe cp is an array of cos(theta) values for all
theta 0 - 180 but the costheta = double(cp) is unclear to me.
Please advice.
Thanks,
-Parama
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem in creating Postscript of "Transparent Histograms"
Next Topic: Re: Converting distance to degrees

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

Current Time: Sat Oct 11 09:02:14 PDT 2025

Total time taken to generate the page: 0.39590 seconds