Re: Segfault when smoothing image [message #69773 is a reply to message #69772] |
Mon, 15 February 2010 03:05   |
thoeger
Messages: 4 Registered: February 2010
|
Junior Member |
|
|
Sorry if I'm not precise enough;
The data I have is an array that is later to be exported to an image.
The array is generated by simply making a 2200x2200 float array of
0's, and then changing the values to 1.0 at certain coordinates that
are given in a list of objects in a different image. That gives a 2D
array of 0's with a few 1's here and there, which is then to be
smoothed, so each pixel gets a value between 0 and 1, depending on how
far they are from the pixels originally of value 1.
The code line I have used is:
imgdata2 = filter_image( imgdata, FWHM_GAUSSIAN=300, /
ALL_PIXELS)
imgdata being the name of the array I've previously generated.
From GDL, I receive the messages
% Compiled module: FILTER_IMAGE.
% Compiled module: FACTOR.
% Compiled module: PRIME.
% Compiled module: PSF_GAUSSIAN.
% Compiled module: GAUSSIAN.
% Program caused arithmetic error: Floating underflow
% Compiled module: CONVOLVE.
Segmentation fault
and then it exits. In real IDL, it simply stalls indefinitely after "%
Compiled module: GAUSSIAN."
On Feb 14, 6:51 pm, Gianguido Cianci <gianguido.cia...@gmail.com>
wrote:
> What is your input for all this, a bunch of x,y coords? And you want a
> certain value at each coord in a "fake" 2200x2200 iamge?
> Could you post examples of input and especially the code you are
> using?
>
> --Gianguido
>
> On Feb 14, 4:54 am, thoeger <lusepus...@gmail.com> wrote:
>
>
>
>> Hello newsgfroup;
>
>> I hope this question isn't too basic.
>
>> As part of my master thesis in astronomy, I have to make an image
>> consisting of 2200x2200 pixels having the value zero except certain
>> pixels, representing each the center of tan astronomical objects,
>> having the value one. The goal is to get an idea of the number density
>> of objects in the field, so I try to do a gaussian smoothing using
>> the filter_image function, but end up with a segfault and IDL
>> quitting due to floating underflow. (To be precise, this is GDL on my
>> laptop. True IDL on the university computers just stalls
>> indefinitely). So it seems I'm doing something wrong here. Does anyone
>> have an idea how to implement the smoothing, if not by filter_image?
|
|
|