On my machine (32-bit Fedora 10 with 2GB RAM), it chugs along swapping
for a loooong time and then fails with a Python MemoryError exception --
which is at least reasonable.
I suspect you're running on a 64-bit machine and we're running into some
sort of non-64-bit-clean issue. We try to be 64-bit clean, but it
doesn't get verified on a regular basis, and not all of us (myself
included) are running 64-bit OSes.
Can you try running python inside of gdb and getting a traceback? That
might provide some clues.
We can estimate a little bit as to the memory requirements -- though
it's hard to account for everything.
Input array is (10370, 9320) x 4 = 386MB
This array is always converted to doubles to convert to colors (this is
probably a place ripe for opimtization) so you get also 786MB.
Then this gets converted to an RGBA array for another 386MB
Mike
Adam Ginsburg wrote:
> Hi, I've been getting a segmentation fault when trying to display
> large images. A transcript of a sample session is below. I'm using
> the TkAgg backend, and I am using numpy, but otherwise I have made no
> modifications to the matplotlib setup.
>
>
> milkyway /data/glimpseii $ alias pylab
> alias pylab='/usr/local/adm/config/python/bin/ipython -pylab -log'
> milkyway /data/glimpseii $ pylab
> Activating auto-logging. Current session state plus future input saved.
> Filename : ipython_log.py
> Mode : rotate
> Output logging : False
> Raw input log : False
> Timestamping : False
> State : active
> Python 2.5 (r25:51908, Dec 22 2006, 16:08:43)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.9.1 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
>
> Welcome to pylab, a matplotlib-based Python environment.
> For more information, type 'help(pylab)'.
>
> In [1]: import matplotlib,pyfits,numpy,scipy
>
> In [2]: scipy.__version__
> Out[2]: '0.7.0'
>
> In [3]: numpy.__version__
> Out[3]: '1.3.0'
>
> In [4]: matplotlib.__version__
> Out[4]: '0.98.5.2'
>
> In [5]: f = pyfits.open('GLM_00600+0000_mosaic_I3.fits')
>
> In [6]: f[0].data.shape
> Out[6]: (10370, 9320)
>
> In [7]: f[0].data.dtype
> Out[7]: dtype('>f4')
>
> In [8]: imshow(f[0].data)
> Segmentation fault
>
>
> Any ideas?
>
> Thanks,
> Adam
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users