I need to pass the value of the available/derived field corresponds to the
index selected based on some criterion (using numpy.where()) to a scalar
function. It should list out the indexes wheres the condition satisfies. It
happens when this has been done outside the field but instead of getting 3D
indexes it gives 1D YT_Array indexes I think.
But I need to pass this value of field corresponds to the selected index to
scalar function inside the field, which may give some problem (please find
the attachment to see what exactly I am trying to do).
The attached script can run on the ENZO test data set, enzo_tiny_cosmology.
Many thanks and regards
What: yt user/developer workshop
Where: Edinburgh, UK
When: June 29 to July 3, 2020
I'm very pleased to announce that there will be a yt user/developer
workshop at the Higgs Centre for Theoretical Physics at University of
Edinburgh from June 29 to July 3, 2020. The workshop will begin with a
couple days of tutorials for new users and then transition into development
activities. This will be a good opportunity to meet and join the yt
community. More information to follow, but mark your calendars and diaries
now. I hope to see you next summer!
We've been working on updating our governance model for the yt-project to
help our project grow, to codify our decision-making process, and to
outline the governance structure of the project. I've submitted two
companion pull requests with drafts of this updated documentation:
(you can see the contents of the pull requests if you click on the "files
changed" tab; text highlighted in green is an addition and in red is
Our existing governance document is located at
The first pull request is to a new governance repository, where our
governance documentation will live separately from the YTEPs (yt
enhancement proposals). This will allow us to maintain and minorly update
our governance without having to update YTEP. The second pull request is to
the YTEP repository and generally outlines the core values and ideas we
want our governance structure to reflect. Hopefully all of the things I've
listed in the YTEP are reflected in the governance docs.
As members of the community, I'd like to solicit feedback from all of you
about these governance documents. Do these reflect our community values?
Should we add anything? Do you feel everything is clear? Is this too much
governance for our community right now? Is there something that's missing?
As users, do you feel our governance structure is supportive to you, or do
you think there is a way we could improve it to do so?
Feel free to reply here or comment on the pull requests! Our governance
will be better with your feedback.
Hello hope you are doing well. I am trying to save some projection and
slice field data within a sphere by doing the following :
my_sphere = stuff.sphere([0.5,0.5,0.5],(214,"kpc"))
prj1 = yt.SlicePlot(stuff,'z',('gas','radius'),data_source=my_sphere)
rad = prj1.frb['gas','radius']
I then save rad to a pickle file to read in by another code. The full
simulation domain is 800 kpc. When I load the pickle file and print out the
values I am getting many 0's. And this is also the same when I make a
projection of some field and save it in the same way to a pickle file.
My question is, even though I am limiting the data to within a sphere, does
rad also hold values that are not within that sphere and saving them as
0's? Is there a better way to go about this?
Edward N. Buie II,
School of Earth and Space Exploration (SESE)
Arizona State University
I would like to create a new filed, but I encounter one problem here.
The dataset is in Arepo format, and there is one field ('PartType0', 'GFM_Metals'), the dimension of this field is (2716294, 10). For normal field, like ('PartType0', 'Masses'), the dimension is (2716294, ). So field ('PartType0', 'GFM_Metals') has more dimensions.
Below is how I create the new field. As I only need one row from ('PartType0', 'GFM_Metals') , so that:
def _nOxy(field, data):
X_Oxygen = data['PartType0', 'GFM_Metals'][:,4]
rho = data['PartType0', 'Density']
nOxy = X_Oxygen *rho/ ds.quan(mh,'g')
ds.add_field(('PartType0', 'nOxy'), function=_nOxy,
However, it shows error:
IndexError: too many indices for array
The error is from data['PartType0', 'GFM_Metals'][:,4], where yt does not support using [:,4].
So I am wondering if there is any other method to handle this.
I am grateful for your suggestions.
Dear yt users and developers,
we would like to draw your attention on two upcoming papers of ours on
performance studies of yt. The first one will be on ArXiv on Friday
("Speeding simulation analysis up with yt and Intel Distribution for
Python", authors: S. Cielo, L. Iapichino and F. Baruffa) and shows the
performance gained when installing yt on top of a Conda environment
based on the Intel Distribution for Python, rather than on the
traditional Anaconda-based environment. The second paper is more general
in scope (code optimisation of astrophysical codes on Intel Xeon Phi
Knights Landing) but has a whole section on tests of different
parallelisation strategies in yt (including Cython and OpenMP). This
paper is still under review and we share a semi-final version with you
under this link:
The aim of both works is to explore the potential offered by the
software stack of modern HPC systems for applications like yt. Besides a
custom installation procedure, no modification of the source code was
required. We see these works as potential contributions to the yt user
community, and therefore we would welcome comments, discussions and
follow-up ideas about them. For those of you attending SC19 in November,
one of us (Salvatore) will be there and is available for face-to-face
Looking forward to your feedback,
Luigi and Salvatore
Dr. Luigi Iapichino
High Performance Systems Division
Boltzmannstr. 1, 85748 Garching, Germany
Tel: +49 89 35831 7824
Hadoop is a member degree, open supply package framework made for storage and process of huge scale type of data on clusters of artifact hardware. The Apache Hadoop application library is a framework that allows the data distributed processing across clusters for computing using easy programming models called Map Reduce
Hello yt users,
I would like to know how data is arranged on yt arrays given a data container. For example, if I have a disk data container
And I want to obtain the density:
Lets say that gives me a YT.array of shape (4000,). What I would like to know is how the 3D density is storage into this 1D array, for example if
the density is storage first along the 'x' axis, then the 'y' axis, and finally the 'z' axis, e.g. :
for i in range(x_dims):
for j in range(y_dims):
for k in range(z_dims):
disk['dens'] = density_inside_disk[i,j,k]
I don't know where to find that information in the yt source code. Do you know that? I'm not sure if the array disk.icoords provides that information.