Author Topic: Accessing ovito source for histogram  (Read 178 times)

Kevin

  • Newbie
  • *
  • Posts: 25
Accessing ovito source for histogram
« on: February 09, 2018, 08:23:10 PM »
Dear Dr.Stukowski,

I want to access how OVITO GUI works when it outputs histogram data.
Specifically, I want to figure out what the output format is. It is because the last floating number of histogram data in the following has one less decimal, and I couldn't mimic this behavior in my scripting version of histogram output. (I am trying to implement automated testing between data outputted from GUI and data from scripting.)

I was able to locate histogram_modifier.py here:
/Applications/Ovito_3.0.0.app/Contents/Resources/python/ovito/modifiers/stdmod/histogram_modifier.py
but this file only specifies how histogram data is created.

Code: [Select]
# Position.X histogram (bin size: 2.01018)
1.09469 2
3.10487 1
5.11505 1
7.12524 0
9.13542 0
11.1456 1
13.1558 1
15.166 1

Thank you,
Kevin

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 370
Re: Accessing ovito source for histogram
« Reply #1 on: February 10, 2018, 09:22:26 AM »
Kevin,

the routine for the GUI function, which writes the histogram data to an output text file, is found on the c++ side:

https://gitlab.com/stuko/ovito/blob/master/src/plugins/stdmod/gui/HistogramModifierEditor.cpp#L260

Let me know if that doesn't fully answer your question.

-Alexander