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

Home » Public Forums » archive » Convolution
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: convolution [message #60416 is a reply to message #60053] Mon, 12 May 2008 18:56 Go to previous messageGo to previous message
sarah[1] is currently offline  sarah[1]
Messages: 3
Registered: April 2008
Junior Member
On Apr 25, 8:29 am, Vince Hradil <hrad...@yahoo.com> wrote:
> On Apr 24, 2:17 pm, sarah <sarahwiddeco...@yahoo.com> wrote:
>
>> Hi, i am IDL beginner and i do not have much support. I am trying to
>> convolve 2 spectral datasets using the convol function and I cannot
>> get it to work. I have tried everything! Does anyone know the best way
>> to do this? maybe convol is the wrong thing to use I am very lost.
>
>> Thanks
>
> What _exactly_ have you tried? What was the result? i.e. explain "I
> cannot get it to work.". Code snippets always help.

Sorry it has taken me so long to reply. (I have been sick). I have
tried writing my own convolution function and using CONVOL. It is a
very short code, here it is:

pro conv1

Openr, lun, 'model.dat', /Get_Lun

Point_Lun, lun, 0
ReadF, lun, adim, bdim, num_columns
array = fltarr(2, 1024)

readf,lun,array
a = array(0,*)
b = array(1,*)
Free_Lun, lun


Openr, lun, 'data.dat', /Get_Lun
Point_Lun, lun, 1
ReadF, lun, cdim, ddim, num_columns
array2 = fltarr(2, 1024)


readf,lun,array
c = array(0,*)
d = array(1,*)

x=make_array(1024)
sigma=15
mu =15
const=1/(sigma*sqrt(2*!pi))
for i = 0,1024 do x[i]= array[0,*]
f= const*( EXP(-1.0*(x - mu)^2/(2*sigma^2)))

z = convol(array,array2,/center)
z = z*2
print,f
end

here is the message I get:% Out of range subscript encountered: X.
% Execution halted at: CONV1 29
/Users/Dave/Desktop/conv1.pro
% $MAIN$

I don't see why this doesn't work? I am very frustrated

Sarah
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to export programmatically a volume with IVOLUME to images
Next Topic: Re: Least square fitting

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

Current Time: Fri Oct 10 13:39:15 PDT 2025

Total time taken to generate the page: 0.72054 seconds