Yup, just about -- but try instead doing all_data_level_max['elec_den'].  I *think* it will be zero in the places not included in the cutout.

On Sun, Jan 31, 2021 at 4:10 PM Salome Mtchedlidze <salomchedlidze@gmail.com> wrote:
Hi Matthew,
Did you mean something like this?

def _create_elec_den(ds):
    def _elec_den(field,data):
      -----
        return ()

all_data_level_max = ds.covering_grid(----)
cutout_obj = sph2 - sph1
all_data_level_max._data_source = cutout_obj
_create_elec_den(ds)

If it is so, then
cutout_obj['elec_den']
gives me again flattened array..
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: matthewturk@gmail.com