Gaussian Convolution [message #3199] |
Sun, 13 November 1994 21:24  |
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 #53174 is a reply to message #3199] |
Fri, 23 March 2007 10:03   |
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   |
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
|
|
|
|