[Numpy-discussion] Rebinning numpy array

2011-11-13 Thread Johannes Bauer
Hi group, I have a rather simple problem, or so it would seem. However I cannot seem to find the right solution. Here's the problem: A Geiger counter measures counts in distinct time intervals. The time intervals are not of constant length. Imaging for example that the counter would always

[Numpy-discussion] Creating a RGB-image from BW

2009-04-28 Thread Johannes Bauer
Hello group, I've been redicted from usenet (Convert numpy.ndarray into normal array, 75dgm1f16hqn...@mid.dfncis.de) here and hope this is the right place. Basically, what I have is a numpy-Array which I got from a FITS-file (it's black/white). I want to display that using GTK. Therefore every

Re: [Numpy-discussion] Creating a RGB-image from BW

2009-04-29 Thread Johannes Bauer
Hi Zach, Zachary Pincus schrieb: According to http://www.pygtk.org/pygtk2reference/class- gdkpixbuf.html , the pixels_array is a numeric python array (a predecessor to numpy). The upshot is that perhaps the nice broadcasting machinery will work fine: pb_pixels[...] = fits_pixels[...,

[Numpy-discussion] Efficient scaling of array

2009-05-04 Thread Johannes Bauer
Hello list, is there a possibility to scale an array by interpolation, automatically? For illustration a 1D-example would be an array of size 5, which is scaled to size 3: before: [ 1, 2, 3, 4, 5 ] 1/1 2/3 1/3 1 1/3 2/3 1 after : [

Re: [Numpy-discussion] Efficient scaling of array

2009-05-04 Thread Johannes Bauer
Zachary Pincus schrieb: scipy.ndimage.zoom (and related interpolation functions) would be a good bet -- different orders of interpolation are available, too, which can be useful. Thanks a lot - exactly what I was looking for! Kind regards, Johannes

[Numpy-discussion] Mirror/flip numpy array?

2009-07-17 Thread Johannes Bauer
Hello list, I have a really simple newbie question: How can I mirror/flip a numpy.ndarray? I.e. mirror switches the colums (leftmost becomes rightmost and so on), flip changes the rows (top becomes bottom and so on)? Kind regards, Joe ___