Dear everybody,
I am currently trying to create many spectrograms for several days of data. Each spectrograms should show 1 hour of data. For this, I created a script that basically runs a loop that cuts all the data into hourly pieces and creates a spectrogram for each piece.
However, I am running into troubles since the spectrogram function seems to have a strong memory usage. The main problem is, that apparently the data that is used internaly to calculate the spectrogram is not cleared from the memory once the spectrogram is finished and the file is saved. therefore, each time i calculate a new spectrogram the memory usage grows by a substantial ammount of megabytes and very quickly my computer runs out of memory. memory usage for ipython while running this loop is already at more than 10GB after a couple of minutes.
Is there any way to save memory while calculating those spectrograms? Any way to clear the spectrogram data from the memory once the calculation is done?
Thanks a lot in advance and best regards,
Florian Fuchs