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 :

connected_sets[2][1].argmax(('gas','density')) 

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.

Cheers,
_______________________________________________
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