amepproject / amep

The Active Matter Evaluation Package (AMEP) - a Python library for the analysis of particle-based and continuum simulation data of soft and active matter systems
https://amepproject.de/
GNU General Public License v3.0
11 stars 2 forks source link

BUG: evaluate.Psi6dist number of bins default causes error #33

Open kay-ro opened 4 months ago

kay-ro commented 4 months ago

Description:

Similar issue to #32. If the class gets a trajectory with fewer than 100 particles, the number of bins is set to 0 by default. This causes an unexpected behavior of the distribution function.

Code for reproduction:

import amep
traj = amep.load.traj("../examples/data/lammps.h5amep")
ld1 = amep.evaluate.Psi6dist(traj)

Error message:

No response

Python and AMEP versions:

any python version, AMEP 1.0.2

Additional information:

Can be easily fixed by setting the default number of bins nbins to 50 (analogous to the similar fix in evaluate.LDDist)

How did you install AMEP?

None