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

Home » Public Forums » archive » arrays in integration (qpint1d)
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
arrays in integration (qpint1d) [message #82004] Tue, 13 November 2012 10:28
lucylim is currently offline  lucylim
Messages: 2
Registered: November 2012
Junior Member
Hi all,

I'm trying to set up an integration of spectral emission over a sphere. The problem is that the integral has to be done over longitude and latitude "theta" and "phi", but I need a spectrum to come out as a function of wavelength, "lambda". Wavelength is NOT a variable of integration -- rather, an array of wavelengths goes in and an array of fluxes as a function of wavelength comes out.

Right now I have this implemented as a for loop over wavelength inside which are the two nested "qpint1d" function calls. The first "qpint1d" function also has a for loop in it over "theta" to make the inner "qpint1d" call work with "theta" as a scalar. It works but as you can imagine, with nested for loops this is not very efficient.

I've tried to pass the wavelength through to the inner integral as a vector within the "private" structure so that instead of a vector over "phi", the inner function would return a matrix of "phi" vs. wavelength, thus eliminating the outermost for loop (over wavelength). No luck, though -- I'm just getting the error message from QPINT1D_QKEVAL about how the integrand function must return a vector of values. Is there a better way to do this?

Many thanks,
Lucy Lim
NASA/GSFC
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Memory Allocation Problem- IDL 8.2
Next Topic: Re: Overplotting contour plot with one specific level labeled

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

Current Time: Fri Oct 10 04:59:49 PDT 2025

Total time taken to generate the page: 0.31962 seconds