I am using yt slices and projections with scale annotation. I have my plots in comoving units ("Mpccm/h") but whenever I want to use the same units for annotation:
slc.annotate_scale(corner='lower_right', coeff=10, units='Mpccm/h'),
yt does not recognize these units. Am I missing something or only the physical scale annotation is possible ?
I have a question regarding how yt finds the cell_mass of a sphere in ART simulations. I am currently doing an analysis of the mass profiles within the virial radius of a galaxy, finding the masses using these commands:
sp_new_rvir = ds.sphere(center, (float(new_rvir.in_units('kpc')), 'kpc'))
sp_new_rvir_010 = ds.sphere(center, (float(new_rvir.in_units('kpc'))*.1, 'kpc'))
sp_new_rvir_015 = ds.sphere(center, (float(new_rvir.in_units('kpc'))*.15, 'kpc'))
sp_new_rvir_020 = ds.sphere(center, (float(new_rvir.in_units('kpc'))*.2, 'kpc'))
stellar_mass_rvir, darkmatter_mass_rvir, gas_mass_rvir = sp_new_rvir.quantities.total_quantity([('stars', 'particle_mass'),\
stellar_mass_010, gas_mass_010 = sp_new_rvir_010.quantities.total_quantity([('stars', 'particle_mass'),\
stellar_mass_015, gas_mass_015 = sp_new_rvir_015.quantities.total_quantity([('stars', 'particle_mass'),\
stellar_mass_020, gas_mass_020 = sp_new_rvir_020.quantities.total_quantity([('stars', 'particle_mass'),\
These work just fine, and return results, but when I compare these values to ones collected by a collaborator, I disagree on the total masses within each sphere by a small amount. I imagine that there might be a difference in how yt calculates these quantities compared to the other methodology, which I would like to understand, as both are probably acceptable methods, but understanding the difference seems important. I have a gut feeling that gas mass is probably the cause of this difference, as I dont see how a difference in the particle fields could arise. I was looking through the yt fields list page (https://yt-project.org/doc/reference/field_list.html) to see how the cell_mass paramater was defined to compare to this other method, and saw that it is multiplying the density and cell volume field. On that page, it lists the method for the density field as follows:
def _TranslationFunc(field, data):
# We do a bunch of in-place modifications, so we will copy this.
I am not sure where to look to see where the method for the density field calculation is stored. I looked a bit around the ART frontend here https://github.com/yt-project/yt/tree/master/yt/frontends/art but could not find anything. I was wondering if anyone could point me to where this is?
I am working with pyxsim and have had no issues for the past year or so, however recently after switching to the YT development build on the server I use, and then back to my own install of the stable build I am getting an issue in importing YT into my script. I get the error that the fnv_hash module doesn't exist.
When looking in the directory it is attempting to find fnv_hash I find fav_hash.pyx.
I was hoping anyone may have some insight into how this error may have arisen and how I might be able to fix it.
I've looked at the documentation and it seems that octree datasets are
loadable for a few specific codes, but not in general. I have an
octree that represents galaxy simulation data, but it's produced as an
output of an analysis script. It would be nice to take advantage of yt's
capabilities to do analysis.
Is there a simple way to load an generic octree or would I have to write a
front-end myself (as described in the documentation and by looking at ART,
I am so excited to announce a virtual meeting on Dec 9-11 called *RHytHM*:
*R*esearc*H *using *yt* *H*ighlights *M*eeting! It will be the first (that
I know of) meeting where we all just share how we use yt (and hopefully
cool images). The summary is:
Answering scientific questions using large datasets rich with information
is often a matter of examining data in a new and informative way. The
ability to analyze and visualize data in physically-meaningful ways is one
of the most powerful uses of yt and has allowed for its use across many
scientific domains. In this meeting, we aim to share the ways in which yt
has been used to enhance research.
We plan to have a series of talks in which people introduce their
scientific problem to a diverse group of scientists (domain amateurs) and
highlight how yt was used in their research. We look forward to hearing
about how yt slices, phaseplots, and volume-rendering have been used,
interesting ways to select data or an extension based on yt. We also hope
to hear about yt uses we have not yet considered!
*Please take a look and register (by Nov 9) if interested! Share with your
*Note: We do not yet have times set for the meeting. We are asking
participants for their timezones so we can try and strike a good balance.
Looking forward to zooming with you in December!
Stephanie (for the SOC)
Dr. Stephanie Tonnesen
Associate Research Scientist
CCA, Flatiron Institute
New York, NY
I'm a beginner with YT, and trying to analyze the GIZMO output with it. I
can understand that the default 'YT derived fields' creates a mesh and
outputs the averaged particle values (either simple neighboring particle
averaging or kernel averaging, etc), but I'm not sure which particular
method has been used to create the GIZMO output data-mesh. Is it kernel
smoothing like GADGET data or finding neighbors and simply averaging over
the number of NGB particles? Where to find the detailed mesh creating
routines in YT other than this place
Any help is appreciated!
Dr. Arpita Roy,
Research School of Astronomy & Astrophysics,
Mount Stromlo Observatory,
Australian National University,
Cotter Road, Weston Creek,
Canberra, ACT 2611, Australia.