[SciPy-user] Smoothing of a signal
Gael Varoquaux
gael.varoquaux at normalesup.org
Mon Nov 5 10:50:40 EST 2007
Hi,
On Mon, Nov 05, 2007 at 07:20:35AM -0800, Marc Beck wrote:
> I am a graduate assistant at the Space Science Center at Morehead State
> University. I am currently writing a program to convert raw data from our
> 21m antenna into a *.FITS image using numpy and scipy. I need to convolve
> the pixels of my image. I have three arrays: one for the x- coordinate,
> one for the y- coordinate and one for the brightness of the pixel. I need
> to feed those three arrays into a function to convolve the pixels and I
> need to get the same three arrays out with the new values, or the rest of
> the program does not work. Someone from the python forum referred me to
> some code you wrote at [1]http://www.scipy.org/Cookbook/SignalSmooth
> but I don't understand which variable is what and how to integrate this
> into my program. Please explain to me how I can make my program work. I
> hope that I have described clearly enough what I am planning to do.
Your are better off asking the mailing list for these kind of question. I
am terribly busy currently (important deadlines) and almost deleted you
message before realising it had been sent only to me.
Is you data on a regular grid ? You currently have an (X, Y, V) data
layout, and it would be much easier to have a 2D array as a layout for
your data, where the row and column index would give the X and Y position
(scaled so that they fit in consecutive integers). With some luck you can
convert you V array to a properly-shaped 2D array simply using "reshape".
This correpsonds to the Z array in the code on the page you reference.
Hope this helps,
Gaël
More information about the SciPy-User
mailing list