2D vs 3D plots

12 views
Skip to first unread message

Samuel Grima

unread,
Dec 23, 2022, 12:40:29 PM12/23/22
to pynbody-users
Hi, 

Can anyone explain what the difference between a 2D and 3D profile is when using the class pynbody.analysis.profile.Profile(), please? My intuition says that the latter would plot out a 3D figure of whatever I am plotting (for example the stellar radial density), but the output is still a 2D figure (only 2 axes). However, choosing either 2D or 3D, the actual plots (lines) are different.

I am quite new to this package and I am only using it to carry out a practical for one of my Physics unit. I barely have any knowledge on cosmology :(

Any help is much appreciated.

Jeremy Bailin

unread,
Dec 24, 2022, 9:03:35 AM12/24/22
to Samuel Grima, pynbody-users
Hi Samuel,

A 3D profile divides the volume up into spherical shells binned by spherical radius r.

A 2D profile that the system that you’re looking at is more or less a flat disk in the xy plane, and divides the volume up into hollow cylinders by cylindrical radius R.

Aside from the way the volume is divided up, a few quantities are actually different… most importantly, ‘density’ for a 3D profile means the volume density (e.g. in units of Msun/pc^3), i.e. the mass in the shell divided by the volume of the shell, but for a 2D profile it means surface density (e.g. in units of Msun/pc^2), i.e. the mass in the cylinder divided by the area of the annulus that is the cross-section of the cylinder (the volume of the the cylinder is technically infinite, so a volume density doesn’t make sense in that case).

Cheers,
-Jeremy.

--
Dr. Jeremy Bailin
Associate Professor, Dept of Physics and Astronomy
he / him

The University of Alabama
GL 311B, Tuscaloosa, AL 35487
office 205-348-4613
jba...@ua.edu | http://physics.ua.edu/
> --
> You received this message because you are subscribed to the Google Groups "pynbody-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pynbody-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pynbody-users/84fbcff0-9a8e-4532-806a-7dc3e9da782fn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages