[Numpy-discussion] Convolve returning zero array

Nadav Horesh nadavh at visionsense.com
Mon Dec 15 05:16:01 CST 2003


1. Can you post an example?
2. Whenever convolution runs slow because the arrays are large, use FFT 
(with a proper padding) --- it can be an order of magnitude (or more) 
faster.

   Nadav.

R.Jager at mapperlithography.com wrote:
> Hi Peter,
> 
> At first I used numarray 0.6. This morning I have installed 0.8 but the
> results are the same. I will try the convolve functions in the nd_image
> package.
> 
> Thanks,
> 
> Remco Jager
> 
> MAPPER Lithography
> Lorentzweg 1
> 2628 CJ Delft, The Netherlands
> tel.: +31 (0)15 2789439
> fax: +31 (0)15-2789473
> http://www.mapperlithography.com
> 
> This e-mail, attachments and (any part of) its content are (i) intended for
> the named addressee(s) only and (ii) strictly confidential and proprietary.
> All rights are reserved by MAPPER Lithography. Any unauthorized use,
> disclosure and/or copying are strictly prohibited, except with prior and
> express written permission by MAPPER Lithography. Should you have received
> this e-mail, attachments and its content by mistake, please bring this to
> our attention and destroy this e-mail and attachments in full. Thank you.
> 
> 
> |---------+---------------------------->
> |         |           Peter Verveer    |
> |         |           <verveer at embl-hei|
> |         |           delberg.de>      |
> |         |                            |
> |         |           15/12/2003 12:04 |
> |         |                            |
> |---------+---------------------------->
>   >------------------------------------------------------------------------------------------------------------------------------|
>   |                                                                                                                              |
>   |       To:       R.Jager at mapperlithography.com, numpy-discussion at lists.sourceforge.net                                        |
>   |       cc:                                                                                                                    |
>   |       Subject:  Re: [Numpy-discussion] Convolve returning zero array                                                         |
>   >------------------------------------------------------------------------------------------------------------------------------|
> 
> 
> 
> 
> Hi Remco,
> 
> Sounds like a bug. Which version of numarray do you use? Version 0.8 of
> numarray should have appeared on sourceforge now. If the convolve in that
> version does still not work, you could try out the convolution function in
> the new nd_image package that is part of numarray 0.8. If that does not
> work,
> let me know since I am the author of that package, and will fix problems
> with
> it.
> 
> Cheers, Peter
> 
> On Monday 15 December 2003 11:24, R.Jager at mapperlithography.com wrote:
> 
>>Hi list,
>>
>>I already posted this on the numarray forum on freshmeat, but Jay T
> 
> Miller
> 
>>advised me to post my problem to this list. OK, now for the problem: I
> 
> try
> 
>>to convolve a Gaussian distribution with a binary pattern. For small
> 
> values
> 
>>of the sigma of the Gaussian distribution the convolution returns an
> 
> array
> 
>>of zeros. For a large value the results are OK.
>>I did some more research and found out that the zero array is returned if
>>the length of the Gaussian is smaller than the length of the binary
>>pattern. In the function call the Gaussian is the kernel and the binary
>>pattern is the data. The convolution mode is 'SAME'. I have swapped the
>>data and kernel in the convolve function call, but this has no influence
> 
> on
> 
>>the result, as this is swapped again in convolve.py. A quick and dirty
>>workaround is to always make the Gaussian distribution longer than the
>>binary pattern, but for very large binary patterns this increases the
>>calculation time significantly. Does anyone have an idea how to solve
> 
> this
> 
>>properly?
>>
>>Met vriendelijke groeten,
>>
>>Remco Jager
>>
>>MAPPER Lithography
>>Lorentzweg 1
>>2628 CJ Delft, The Netherlands
>>tel.: +31 (0)15 2789439
>>fax: +31 (0)15-2789473
>>http://www.mapperlithography.com
>>
>>This e-mail, attachments and (any part of) its content are (i) intended
> 
> for
> 
>>the named addressee(s) only and (ii) strictly confidential and
> 
> proprietary.
> 
>>All rights are reserved by MAPPER Lithography. Any unauthorized use,
>>disclosure and/or copying are strictly prohibited, except with prior and
>>express written permission by MAPPER Lithography. Should you have
> 
> received
> 
>>this e-mail, attachments and its content by mistake, please bring this to
>>our attention and destroy this e-mail and attachments in full. Thank you.
>>
>>
>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: SF.net Giveback Program.
>>Does SourceForge.net help you be more productive?  Does it
>>help you create better code?  SHARE THE LOVE, and help us help
>>YOU!  Click Here: http://sourceforge.net/donate/
>>_______________________________________________
>>Numpy-discussion mailing list
>>Numpy-discussion at lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> 
> 
> --
> Dr. Peter J. Verveer
> Cell Biology and Cell Biophysics Programme
> European Molecular Biology Laboratory
> Meyerhofstrasse 1
> D-69117 Heidelberg
> Germany
> Tel. : +49 6221 387245
> Fax  : +49 6221 387306
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> 





More information about the Numpy-discussion mailing list