How to modify the statistics file?

Hello,

I’m a beginner at ASPECT, and I need the statistics file to watch the evolution of the temperature and the velocity during time.

The problem is the statistics file have a column with the name of the output file, at some time, but not all the time. I was searching to erase it, and it’s better if I could make that it doesn’t write it in the statistics file at all.
When I open the statistics file with python, this one believe that my numbers are strings (because of that name files, I suppose) ( And I deleted the 23 headers firsts, with the name of the columns, so it’s not that).

Also, when I opened it on LibreOfficeCalc, at the mid of the file (on row), all the data are shifted to the left, so the , for example, 1000th last data of column B are in column A … I can copy past those datas for little files, but it will be really long and reaaaally annoying for huge files. I don’t know how to solve that for huge file, nor what caused that. Have you any idea of the problem and how to solve it ?
I go through LibreOffice to open my file because it allows me to put my data in correct format and not having python believing it’s strings when I put it in a numpy array.

Also, I can’t use gnuplot for making the plot, because I don’t have the terminals needed for, even if I downloaded the last version of gnuplot. I don’t know where they are gone and what to use instead, but the tutorials in the aspect manual are obsolete.

Hope you can help me,
Emilie.

Hi Emilie,

Welcome and thanks for posting to the forum! Also, apologies it took me a while to get to this post.

When I open the statistics file with python, this one believe that my numbers are strings (because of that name files, I suppose) ( And I deleted the 23 headers firsts, with the name of the columns, so it’s not that).

numpy.loadtxt provides a workaround for this issue, as you can specify what columns you want to load and the number of header rows (no need to delete them in advance).

For example, if you wanted to skip reading the 23 header rows and analyze the first, second, fourth, and seventh columns, the command would be something like:
data = np.loadtxt('statistics.txt', skiprows=23, usecols==(0,1,5,8))

The above assumes that you used import numpy as np to load numpy, and also note that usecols starts counting at 0.

Can you give this a shot, and let us know if it works or if you run into any other issues?

Cheers,
John

It works !
You just have to use ‘usecols = (0,1,11, …)’ instead of ‘usecols == (0,1,11, …)’ , but it’s fine.

Thanks you so much ! It’s really easier like that !

Thanks again,

Emilie.