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

Home » Public Forums » archive » Gaussian Convolution
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
Gaussian Convolution [message #3199] Sun, 13 November 1994 21:24 Go to next message
Thomas Edgar Nichols is currently offline  Thomas Edgar Nichols
Messages: 2
Registered: November 1994
Junior Member
I have checked the FAQ and poked around the suggested FTP sites and have
not come up with a
Gaussian Blur function (in 3D)
along the lines of smooth() which uses a uniform kernal instead of a
Gaussian one.

I still can't believe that this isn't part of the standard library; I
have tried smooth2(), which LOOKS fine, but it is only "approximately"
Gaussian, which doesn't cut it (try writing a methodology section of a
medical imaging paper saying you used "approximately" gaussian
smoothing).

A valid respons would be: DIY! Yes, I am working on a function that
uses Gaussint() to make a kernal to convolve with convol(), but I hate
reiventing the wheel when I know someone else MUST have had this exact
same need.


-Tom
Re: gaussian convolution [message #53164 is a reply to message #3199] Sat, 24 March 2007 09:20 Go to previous messageGo to next message
news.verizon.net is currently offline  news.verizon.net
Messages: 47
Registered: August 2003
Member
> My first guess would be to use a gaussian filter in order to reduce
> the resolution. The spectrum is (intensity vs. wavelength),so I
> think 1D gaussian filter would be OK. Is there anyone with experience
> on it ?
>
There are several IDL procedures on the Web to convolve a spectrum
with a Gaussian; you might try gaussfold.pro at

http://astro.uni-tuebingen.de/software/idl/aitlib/misc/gauss fold.pro

which requires the procedure psf_gaussian.pro to create the kernel

http://idlastro.gsfc.nasa.gov/ftp/pro/image/psf_gaussian.pro

If your spectrum has 1 Angstrom resolution, and you want to degrade it
to 3 Angstrom resolution, you should convolve it with a Gaussian with
a FWHM of sqrt(3^2-1^2) = 2.82 Angstrom,e.g.

fsmooth = gaussfold(w,f,2.82)

(The wavelength vector and FWHM should have the same units.) --Wayne
Re: gaussian convolution [message #53174 is a reply to message #3199] Fri, 23 March 2007 10:03 Go to previous messageGo to next message
helaha is currently offline  helaha
Messages: 26
Registered: March 2004
Junior Member
Hello Tim,
If lower resolution means, that you want to reduce the number of
wavelength bins, then I think interpolation (INTERPOLATE, REBIN, or
CONGRID) is the way.
e.g.:
Spec = FLOATARR(100) ;100 initial intensity values
Spec =............. ; Set Spec with your values
Spec = CONGRID(Spec, 50, /INTERP);now the spectrum has only 50
wavelength bins

hope this helps,
helaha

On Mar 23, 4:00 pm, mikeinthe...@yahoo.com wrote:
> Hi there,
>
> I have a (theoretically computed) spectrum and I would like to degrade
> it to a lower resolution.
>
> I was wondering if there is any standard procedure to do it and/or
> some "pre-cooked" routine in IDL. Is there any gaussian filter
> routine?
>
> My first guess would be to use a gaussian filter in order to reduce
> the resolution. The spectrum is (intensity vs. wavelength),so I
> think 1D gaussian filter would be OK. Is there anyone with experience
> on it ?
>
> Suggestions are welcome, thanks! Cheers,
> Tim
Re: gaussian convolution [message #94751 is a reply to message #53164] Wed, 27 September 2017 03:37 Go to previous messageGo to next message
Kaushal Sharma is currently offline  Kaushal Sharma
Messages: 12
Registered: August 2013
Junior Member
Dear Wayne,

Could you please explain the mathematics (or refer to some paper) behind convolving with a Gaussian of sqrt(b^2-a^2) to change the resolution from a Angstrom to b Angstrom?


Thanks,

On Saturday, March 24, 2007 at 9:50:51 PM UTC+5:30, Wayne Landsman wrote:
>> My first guess would be to use a gaussian filter in order to reduce
>> the resolution. The spectrum is (intensity vs. wavelength),so I
>> think 1D gaussian filter would be OK. Is there anyone with experience
>> on it ?
>>
> There are several IDL procedures on the Web to convolve a spectrum
> with a Gaussian; you might try gaussfold.pro at
>
> http://astro.uni-tuebingen.de/software/idl/aitlib/misc/gauss fold.pro
>
> which requires the procedure psf_gaussian.pro to create the kernel
>
> http://idlastro.gsfc.nasa.gov/ftp/pro/image/psf_gaussian.pro
>
> If your spectrum has 1 Angstrom resolution, and you want to degrade it
> to 3 Angstrom resolution, you should convolve it with a Gaussian with
> a FWHM of sqrt(3^2-1^2) = 2.82 Angstrom,e.g.
>
> fsmooth = gaussfold(w,f,2.82)
>
> (The wavelength vector and FWHM should have the same units.) --Wayne
Re: gaussian convolution [message #94752 is a reply to message #94751] Wed, 27 September 2017 10:15 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Wednesday, September 27, 2017 at 6:37:23 AM UTC-4, KS1989 wrote:
> Dear Wayne,
>
> Could you please explain the mathematics (or refer to some paper) behind convolving with a Gaussian of sqrt(b^2-a^2) to change the resolution from a Angstrom to b Angstrom?

One place is in the "proof using convolutions" section of

https://en.wikipedia.org/wiki/Sum_of_normally_distributed_ra ndom_variables

--Wayne
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL graphics & LaTeX
Next Topic: ISA documentation

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

Current Time: Wed Oct 08 05:20:03 PDT 2025

Total time taken to generate the page: 0.00390 seconds