Forum Navigation
You need to log in to create posts and topics.

very tiny bug report with histogram modifier

Dear Alexander, Constanze,

I am under the Version 3.0.0-dev493. Thanks for your excellent work, I still enjoy pushing the boundary of what Ovito is capable of !

I would like to report a very tiny bug in the histogram modifier.

First let me explain what I do :

  1. Loading a xyz file with an extra column containing the local concentration of species B up to a certain threshold in angstrom in a binary AB.
  2. Use the histogram modifier to compute and display it (in a python script overlay)
  3. Lets call this "read_setup"

Also, Ovito itself can do that basically by using  :

  1. Use the Coordination analysis Modifier to compute Coordination variable
  2. then use the  compute property Modifier with 0 and  Neighbor (Particle Type == 1)/(Coordination).
  3. Use the histogram modifier to compute and display it with python script overlay
  4. Lets call this "compute_setup"

Now the bug seems to be in the inclusion of exclusion of the boundary value in the plot axes when fixed for the "compute_setup".

In fact, local concentration of a certain species is bounded between 0 and 1 include because normalized by the total Coordination so for both histogram, I fix the x interval between 0 and 1.

With the "read_setup" there is no problem and the first and last bin of the histogram is well defined. However, with "compute_setup" the last bin is not present.

I find that fixing the x interval bewteen 0 and 1.0005 resolves the problem.

I even check the data Series table to see if there is the same count number and use two expressions selections to check the count of my last bin without any histogram modifiers.

Hope, it is already fixed in newer version or at least can be useful to you.

I provide you two figures the focus is on the two histogram and especially the last bin.

Sincerely Mickaël.

 

Uploaded files:
  • fig_histo_ovito.png
  • fig_histo_ovito_with10005.png

Thanks for the report, Mickaël. I will look into this when I am back from vacation, two weeks from now, and see if anything can be done. I will get back to you if I have any further questions.

Thanks Alexander,

I did more tests and I realized that is just a problem of floating point round up inside the Histogram Plot axe fix range.

Basically, if you type 1.00000001 it print a 1 after you press enter and the last bin is present, but you can also type 0.99999999 and it will round up to 1 but the last bin will be missing.

The problem is if you type the integer 1 it will not work properly ! and since in the compute property the last bin will be 58/58 = 1 ((Particle Type == 1)/Coordination ) all in integer, it can absent if 0.9999999 or present if 1.0000001 is the actual values hidden in ovito and display as 1.

Sincerely Mickaël.