Hello Ralph,
thanks again for your kind help. But when I apply this to the values I got for the zell pointers, I come to weird results. Here is an example:
dimX = 100 cells or 6 µm (grid spacing = 0.06)
zp for seed 1: 13187
For z:
zp = 13187 - 1 = 13186
z = 13186 / (100 + 2) = 129.2745
For x:
zp = 13187 - 129.2745 * (100 + 2) = 1.001
x = zp = 1.001
If I do this for every seed that I have, for z I get values between 1 and slightly above 833, which makes sense as I have 833 cells in z direction.
But the value for x stays the same. This is confusing, as it should also change up to 100, as this is the number of cells in x direction.
Do you have an idea, what could be the problem?
Best regards,
Moritz
Extracting nuleation positions
Re: Extracting nuleation positions
Hi Moritz,
As Ralph said above, the trick is to use integer division...
Bernd
As Ralph said above, the trick is to use integer division...
Bernd
Re: Extracting nuleation positions
... or in other words:
Take the whole number part before the decimal point for the coordinates.
This can be done by an integer division, type casting of the result or cutting by a function (e.g. math.floor() in Python).
Best,
Ralph
Take the whole number part before the decimal point for the coordinates.
This can be done by an integer division, type casting of the result or cutting by a function (e.g. math.floor() in Python).
Best,
Ralph
Re: Extracting nuleation positions
Dear Bernd and Ralph,
thank you very much for your patience! I did not pu tmuch attention on the integer division and for some reason thought, that this was a "normal" division. Now everything makes sense and the visualisation works.
Best regards
Moritz
thank you very much for your patience! I did not pu tmuch attention on the integer division and for some reason thought, that this was a "normal" division. Now everything makes sense and the visualisation works.
Best regards
Moritz