Author Topic: How to output the number of segments of different dislocation types  (Read 191 times)

wufc

  • Newbie
  • *
  • Posts: 11
Dear all,

I'm now conducting Dislocation analysis (DXA) on a metal system. I found the calculation results file by OVITO only contained the length of different dislocation type. I wonder if you could tell me how to output the number of segments of different dislocation type, which is actually visible in graphical interface. Thank you.
Regards,
Wufc


Constanze Kalcher

  • Administrator
  • Full Member
  • *****
  • Posts: 233
Re: How to output the number of segments of different dislocation types
« Reply #1 on: January 22, 2019, 10:44:37 AM »
Dear wufc,

in the latest developer version of OVITO, the number of segments found during the dislocation analysis are actually stored in "Data Series" (see attached screenshot)
from where they can be exported via the file-export function in the menu or the export button marked in the screenshot.

-Constanze

wufc

  • Newbie
  • *
  • Posts: 11
Re: How to output the number of segments of different dislocation types
« Reply #2 on: January 22, 2019, 11:44:37 AM »
Dear Constanze,

Thanks for your reply. I have tried and it did work in the latest developer version. But it seemed the dislocation counts were outputted into a series of files when multiple frames were analyzed. I also noticed that there were no segments numbers in global attributes. So I’m wondering if it’s possible using a script to output the dislocation counts into a single file like we normally do to output attributes.

Regards,
Wufc

Constanze Kalcher

  • Administrator
  • Full Member
  • *****
  • Posts: 233
Re: How to output the number of segments of different dislocation types
« Reply #3 on: January 22, 2019, 12:11:06 PM »
Dear wufc,

yes, from within a python modifier you can access any results stored in a Data Series  through data.series.
So if you e.g. want to store a specific dislocation type count as a global attribute to be able to export that via the File-export "Table of Values" function, you could try something along those lines:
Code: [Select]
def modify(frame, data):
    disl_count = data.series['disloc-counts']
    #print(disl_count.as_table())
    data.attributes["1/6<112> Shockley Count"] = disl_count.y[2]
   

See also http://www.ovito.org/manual_testing/python/modules/ovito_data.html#ovito.data.DataSeries

-Constanze
« Last Edit: January 22, 2019, 12:13:49 PM by Constanze Kalcher »

wufc

  • Newbie
  • *
  • Posts: 11
Re: How to output the number of segments of different dislocation types
« Reply #4 on: January 22, 2019, 01:10:09 PM »
Dear Constanze,

Thank you so much for the reply. It was really helpful for me.

Regards,
Wufc