|
From: Guillaume G. <gui...@mi...> - 2012-05-23 15:27:30
|
Le 23/05/2012 15:04, Sergi Pons Freixes a écrit :
> On Wed, May 23, 2012 at 11:00 AM, Guillaume Gay
> <gui...@mi...> wrote:
>> Hello
>>
>>
>> What is the size of a single image file? If they are very big, it is
>> better to do everything from processing to ploting at once for each file.
> As stated below, each image is single-channel, of 4600x3840 pixels. As
> you can see on the code, there is not much processing, just loading
> the images and plotting them. What it's slow is not the execution of
> the code, is the interactive zooming and panning once the plots "are
> in the screen".
>
>>> It's 15 images, single-channel, of 4600x3840 pixels each.
>> This is a lot of data. 8bit or 16bit ?
> They are floating point values (for example, from 0 to 45.xxx). If I
> understood correctly, setting the vmin and vmax, matplotlib should
> normalize the values to an appropriate number of bits.
>
>>> for f in filelist:
>> everything should happen in this loop
>>
>>> dataset = ncdf.Dataset(os.path.join(sys.argv[1],f), 'r')
>>> data.append(dataset.variables[variable][:])
>> instead of creating this big list, use a temporary array (which will be
>> overwritten)
>>> dataset.close()
>>> dates.append((f.split('_')[2][:-3],f.split('_')[1]))
> Why? It's true that this way at the beginning it eats a lot of RAM,
> but then it is released after each pop()
oh I didn't see the pop()...
So now then I don't know...
Do you have to show them full-scale? Maybe you can just use thumbnails
of sort?
G.
> (and calculating the maximum
> of all the data without plotting is needed to use the same
> normalization level on all the plots). Anyway, the slowness ocurrs
> during the interaction of the plot, not during the execution of the
> code.
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|