Hi Guido,

Sorry, just seeing this now.  That's the center, but I don't think it's what you want.  You probably want to access the center_of_mass quantity, which should be available either on the connected set *or* the data object associated with it -- I can't recall which it is, but it's definitely in there.

On Tue, Aug 16, 2022 at 12:50 PM Guido Granda Muñoz <guidogranda@gmail.com> wrote:
Hello Matthew,
Thanks for answering. I have an additional question about using the center_of_mass(). I didn't find that option, I only found connected_sets[i][j].center which is the center of the region used to get the contours and I'm using the last version of yt. So, I'm using instead :


so, I wonder if this will also consider cells that belong to the next contour levels e.g. connected_sets[3][1] and connected_sets[4][1]. I'm asking this because sometimes when doing connected_sets["max level"][1] I get strange coordinates that don't belong to the clump, probably because of the problem of unresolved contours that you mentioned.

yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
Member address: matthewturk@gmail.com