marrink-lab / bentopy

Packs stuff in boxes
4 stars 0 forks source link

Remove padding scheme and rely on valid mode for convolution #18

Closed ma3ke closed 4 months ago

ma3ke commented 4 months ago

This change reverts the padding scheme I had introduced earlier to circumvent an issue that I now know can be solved much more simply and elegantly.

Closes #16

ma3ke commented 4 months ago

That was surprisingly easy. Seems to check out well in my local test-cases. These include spherical systems (analytical and from prepared voxel masks of spheres) and cuboids.

Some changes between the produced placement lists are to be expected, since the random number generator can be hit in a different order due to removing the previous padding scheme. In case there is a difference in the produced placement lists, an inspection of the rendered structure is warranted. Nevertheless, I do not foresee much trouble.

ma3ke commented 4 months ago

Also interesting: there appears to be a runtime improvement associated with this change. Initially, I had also added the sliced padding system in order to bring about some memory-footprint improvements as well as a hopeful runtime improvement. The former was negligible, as was the latter. Rolling back that earlier change shows that with the current state of the project, it had actually become a slight performance disadvantage.