You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it's possible to create a state with particles well outside the padded region, without any error being thrown. However as soon as an update on the particles is attempted, an UpdateError gets raised because the particles are outside the box. This is confusing to the user.
I think a MWE would be (not by a computer with PERI)
fromperi.compimportobjsfromperiimportstates, util, modelspos=np.array([10,10,1000]).reshape(-1,3)
obj=objs.PlatonicSpheresCollection(pos, 5.0)
st=states.ImageState(util.NullImage(shape=(30,30,30)), [obj], models.ParticlesOnlyModel())
# no problemst.update('sph-0-x', st.get_values('sph-0-x') -1e-3) # problem
I think the best solution is to check for bad particles the first time that PlatonicSpheresCollection has set_shape called, and raise an error then if there are bad positions / positions outside the padded image shape. Thoughts?
The text was updated successfully, but these errors were encountered:
Currently, it's possible to create a state with particles well outside the padded region, without any error being thrown. However as soon as an update on the particles is attempted, an UpdateError gets raised because the particles are outside the box. This is confusing to the user.
I think a MWE would be (not by a computer with PERI)
I think the best solution is to check for bad particles the first time that PlatonicSpheresCollection has set_shape called, and raise an error then if there are bad positions / positions outside the padded image shape. Thoughts?
The text was updated successfully, but these errors were encountered: