`Notebook Download <https://hub.yt-project.org/go/mf0ba2>`_
want to add particles to an already existing set but make sure they have
Next, we'll set up a uniform grid with some random density data:
assign\_indices assigns the indices (using numpy.arange by default).
apply\_to\_stream applies the particle fields to the grid.
Now that the particles are part of the parameter file, they may be
add\_indices function we defined earlier to assign indices that are all
different from the ones the already existing particles have.
We now have both sets of particles:
And by sorting all of the indices we can check that all of them are
distribution and refine the grid based on the overdensity over some
these particles, we will set the optional argument clobber=True, which
will remove the particles we already created.
due to the fact that they are taken from a thick slab and only a slice
of the grid-based field is shown.