wmi-parprog/04_AWK/stars/awk_excercises.txt
2024-03-25 13:37:34 +01:00

25 lines
1.4 KiB
Plaintext

Columns description is in the beginning of the files.
1. Compute number of black holes formed per every timesteps (column timenr) from files inter-binevoldat. At the end we should see something like a histogram.
Hints:
* column 17 - initial star's type, it has to be smaller than 14
* column 37 - final star's type, it has to be 14 (internal note that we have a black hole(BH))
So, BH forms if the type was not 14 in column 17, but in the same line, in the column 37 equals 14. Number of such events (rows) have to be computed per every time step (column timenr).
2. Compute the same for inter-binsin.dat file and plot both results on the same plot (with anything). These events from inter-binsin.dat should be smaller.
3. Plot, on the same figure, the results from the 1. and 2. points. You will see when the primordial BHs merge (point 1.) and the dynamical BHs are merging (point 2.).
New task
4. Test in which places all the mergers take place.
A merger is an even in which there non-zero value in inter** columns. If there some value in such a column it means that two or more stars merged together, creating a new object. The position in which it took place in star cluster is denoted with the column 'r1'.
Compute a histogram for such events for all timesteps together (this time we do not split values into different time steps). Write everything into one file in order to plot it.