Grain segmentation modifier

Quote from Prashant Dwivedi on November 3, 2021, 1:14 pmHello Constanze,
I'm using a Grain segmentation modifier as it is in the experimental phase. So, before using it I checked it with my calculation a few times and it works perfectly.
Now, I want to calculate the average grain size from it.
I can see the grain size for each individual grain in the Data table --> Grain list. I tried to use time averaging, but it does not work because the grain size does not appear in the available values. I guess because it is not a global variable.
So, can you please suggest a way to extract it?
Thank you
Best
Prash
Hello Constanze,
I'm using a Grain segmentation modifier as it is in the experimental phase. So, before using it I checked it with my calculation a few times and it works perfectly.
Now, I want to calculate the average grain size from it.
I can see the grain size for each individual grain in the Data table --> Grain list. I tried to use time averaging, but it does not work because the grain size does not appear in the available values. I guess because it is not a global variable.
So, can you please suggest a way to extract it?
Thank you
Best
Prash

Quote from Constanze Kalcher on November 3, 2021, 1:34 pmHi Prash,
The Time Averaging modifier should allow you to average the complete
Data Table
called "Grain List", including the column "Grain Size".
In the Time Averaging modifier settings please choose operate on -> Data table: Grain List.
Then, open the Data inspector by clicking "Show in data inspector". You will see a new Data Table called "Grain List - Time Averaging" appear that also contains the average grain size.Does that work for you?
-Constanze
Hi Prash,
The Time Averaging modifier should allow you to average the complete Data Table
called "Grain List", including the column "Grain Size".
In the Time Averaging modifier settings please choose operate on -> Data table: Grain List.
Then, open the Data inspector by clicking "Show in data inspector". You will see a new Data Table called "Grain List - Time Averaging" appear that also contains the average grain size.
Does that work for you?
-Constanze

Quote from Prashant Dwivedi on November 3, 2021, 1:47 pmHello,
I'm attaching here the screen shot. No, it doesn't work for me.
Hello,
I'm attaching here the screen shot. No, it doesn't work for me.
Uploaded files:
Quote from Constanze Kalcher on November 3, 2021, 2:05 pmHi,
did you maybe mean the average particle size in one animation frame then? That's unclear from your question.
In that case, remove the Time averaging modifier and use a Python script modifier. You can compute the average value of the column "Grain Size" like this:
from ovito.data import * import numpy as np def modify(frame: int, data: DataCollection): print(np.mean(data.tables['grains']['Grain Size']))
Hi,
did you maybe mean the average particle size in one animation frame then? That's unclear from your question.
In that case, remove the Time averaging modifier and use a Python script modifier. You can compute the average value of the column "Grain Size" like this:
from ovito.data import * import numpy as np def modify(frame: int, data: DataCollection): print(np.mean(data.tables['grains']['Grain Size']))

Quote from Prashant Dwivedi on November 3, 2021, 2:12 pmYes, that's true. Sorry for not being clear.
Actually I wanted to see the evaluation of average grain size. So, I needed the average grain size per frame.
Thank you for the suggestion.
Yes, that's true. Sorry for not being clear.
Actually I wanted to see the evaluation of average grain size. So, I needed the average grain size per frame.
Thank you for the suggestion.
新的OVITO微信频道!
New for our users in China: OVITO on WeChat
Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.
