-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add three new derived fields to the AREPO frontend #3815
Conversation
# Since the AREPO gas "particles" are Voronoi cells, we can | ||
# define a volume here | ||
def _volume(field, data): | ||
return data[ptype, "mass"] / data[ptype, "density"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both mass and density are in the file, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not opposing that the new field be named "cr_pressure"
but could it be aliased to a more explicit name "cosmic_ray_pressure"
?
@neutrinoceros if we're going to do that, we should probably also change |
Oh yes, I didn't notice these existed already. I would be in favour of adding aliases for them too indeed. |
"ArepoCosmicRays.tar.gz": { | ||
"hash": "e664ea7f634fff778511e9ae7b2e375ba9c5099e427f7c037d48bba9944388f4", | ||
"load_kwargs": {}, | ||
"load_name": "snapshot_039.hdf5", | ||
"url": "https://yt-project.org/data/ArepoCosmicRays.tar.gz" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked that this new dataset loads perfectly with yt.load_sample
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked this over, and everything looks good. Great to have CR support for AREPO as well as cell_volume and gas pressure fields for AREPO datasets.
PR Summary
PR Checklist
("PartType0","pressure")
field to("gas","pressure")
(not sure why this wasn't already one"cell_volume"
field"cosmic_ray_pressure"
field"cr_energy_density"
and"specific_cr_energy"
to"cosmic_ray_energy_density"
and"specific_cosmic_ray_energy"