Hi Chris,

From a projection, you can get the x and y positions *in the plane of the image* by looking at the fields `px`, `py` (for 'pixel') and the fields `pdx` and `pdy` give the cell half-widths.  Does that help?

On Fri, Feb 3, 2023 at 4:56 AM Chris Jessop <up765045@myport.ac.uk> wrote:
Hi everyone,

I have some density-weighted projection plots that I would like to export as ASCII. More specifically, I would like to export the x, y, and z positions and at each of those positions values for gas energy, density, and the 9 primordial species for example. I see there is a way to generate a 2d profile and then export that to a QTable but I am not sure that's what I'm looking for. I also can't get the script to work as it returns "ValueError: zero-size array to reduction operation minimum which has no identity
" when trying to use:

profile2d = source.profile(
    [
        ("gas", "density"),
        ("gas", "temperature"),
    ],  # the x bin field  # the y bin field
    [("gas", "cell_mass")],  # the profile field
    weight_field=None,
)

Is there any method for what I'm trying to look for? Any help would be appreciated.

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