Hmm, this is an odd one. I believe that it should be possible to do this for FLASH data, but that it hasn't makes me nervous -- I suspect but am not totally sure that the reason it's not implemented is because we don't want to run the risk of *not* getting results in some cells.
Your best bet might be to do your own derived field that looks just like the nearest neighbor one in yt/fields/particle_fields.py , but instead of feeding in the grid's particles, feed in the particles from an externally defined all_data() object.
On Mon, Jul 27, 2020 at 2:18 PM firstname.lastname@example.org wrote:
Hi! I'm working with a FLASH dataset and am trying to use the add_nearest_neighbor_field() function as briefly described here https://yt-project.org/doc/analyzing/fields.html#computing-the-nth-nearest-n.... However, when I run the short script (with the input data replaced with my own FLASH dataset), I get the errors yt.fields.field_exceptions.NeedsGridType: (0, None) and NotImplementedError. Is this function not available for FLASH datasets, and is there a workaround? My final goal is to create a smoothed particle field, so if there is a better way than using the nearest_neighbor_distance_64 field in place of a smoothing_length field, please let me know!
Test Script: http://paste.yt-project.org/show/259/
Camryn _______________________________________________ yt-users mailing list -- email@example.com To unsubscribe send an email to firstname.lastname@example.org https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: email@example.com