Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: convolution
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 8 Topic 5672 of 5937
Post > Topic >>

Re: convolution

by sarah <sarahwiddecombe@[EMAIL PROTECTED] > May 12, 2008 at 06:56 PM

On Apr 25, 8:29 am, Vince Hradil <hrad...@[EMAIL PROTECTED]
> wrote:
> On Apr 24, 2:17 pm, sarah <sarahwiddeco...@[EMAIL PROTECTED]
> wrote:
>
> > Hi, i am IDL beginner and i do not have much sup****t. 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
 




 8 Posts in Topic:
convolution
sarah <sarahwiddecombe  2008-04-24 12:17:51 
Re: convolution
d.poreh@[EMAIL PROTECTED]  2008-04-25 01:15:51 
Re: convolution
Vince Hradil <hradilv@  2008-04-25 06:29:20 
Re: convolution
sarah <sarahwiddecombe  2008-05-12 18:56:27 
Re: convolution
David Fanning <news@[E  2008-05-12 20:31:34 
Re: convolution
sarah <sarahwiddecombe  2008-05-19 15:32:26 
Re: convolution
Chris <cnb4ster@[EMAIL  2008-05-20 03:49:48 
Re: convolution
Chris <cnb4ster@[EMAIL  2008-05-20 04:31:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 6:26:42 CDT 2008.