Le vendredi 03 février 2012 à 12:11 +0000, David Craig a écrit : > Hi, I am using matplotlib to produce some spectrograms for seismic > data. I am looking at a 10 day period with a sample rate of 20sps. I > would like to have my spectrogram to be composed of 10 minute windows > with an overlap of 90%. However when I try and run my script I run out > of memory. I can produce the spectrogram for a maximum of 3 days > before an error occurs. > I have also tried to produce a spectrogram for each day and stick them > together using subplot, but I then get the error given below. Anyone > know a way around this?? > Thanks, > David
It seems that the MemoryError does not occur when computing the spectrogram, but when rendering it. A quick rule of a thumb tells me that you have to display an image that is 12000x14400: 12000 frequencies, as you are using windows with 12000 samples (no padded assumed) 14400 windows, due to the 90% overlap Having a 4-channel for the RGBA image may throw the MemoryError. Can you check by trying to "imshow" such an array ? You can also reduce the overlap, the one you used lead to a spectrum computation each minute... ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users