Hello All,
I have a question about the Projection plot function in yt. I have a script that plots the smallest mass darkmatter particles of a simulation in all 3 of the 2-d coordinate projections, and overplots the halos found by a halo finder. This script works, and currently plots the colorbar based on the mass in a given 2-d bin as done in some of the basic yt plots included in the website. I am wondering if it is possible to have the color scheme of the particles be based on the squared mass or squared density of the particles in any given 2-d bin, so that the higher density regions are highlighted compared to the background lower density regions. I have included the plotting part of my script below, in case it is helpful.
I hope everyone is having a great New Year!
ds = yt.load(VELA_snaps[position[0]])
domain_width = float(ds.domain_width.in_units('Mpc/h')[0])
ad = ds.all_data()
masses = yt.np.unique(ad[('darkmatter', 'particle_mass')])
#filter out the darkmatter0 particles
def mass_filter(pfilter, data):
filter = data[(pfilter.filtered_type, 'particle_mass')] == masses[0]
return filter
yt.add_particle_filter('darkmatter0', function=mass_filter, filtered_type='darkmatter', requires=['particle_mass'])
ds.add_particle_filter('darkmatter0')
scale = float(ds.scale_factor)
fig = plt.figure()
grid = AxesGrid(fig, (0.075,0.075,10,5),
nrows_ncols = (3, 1),
axes_pad = 1.0,
label_mode = "L",
share_all = False,
cbar_location="right",
cbar_mode="each",
cbar_size="3%",
cbar_pad="0%")
zoom = 10
x0 = float(consistent.halo_data_sorted[index][0][17]) * scale / domain_width
y0 = float(consistent.halo_data_sorted[index][0][18]) * scale / domain_width
z0 = float(consistent.halo_data_sorted[index][0][19]) * scale / domain_width
center = [x0, y0, z0]
a = yt.ParticlePlot(ds, ('darkmatter0', 'particle_position_x'), ('darkmatter0', 'particle_position_y'),\
('darkmatter0', 'particle_mass'), center=center)
a.set_unit(('darkmatter0','particle_mass'), 'Msun')
a.zoom(zoom)
b = yt.ParticlePlot(ds, ('darkmatter0', 'particle_position_y'), ('darkmatter0', 'particle_position_z'),\
('darkmatter0', 'particle_mass'), center=center)
b.set_unit(('darkmatter0','particle_mass'), 'Msun')
b.zoom(zoom)
c = yt.ParticlePlot(ds, ('darkmatter0', 'particle_position_z'), ('darkmatter0', 'particle_position_x'),\
('darkmatter0', 'particle_mass'), center=center)
c.set_unit(('darkmatter0','particle_mass'), 'Msun')
c.zoom(zoom)
for halos in consistent.halo_data_sorted[index]:
x = float(halos[17]) * scale / domain_width
y = float(halos[18]) * scale / domain_width
z = float(halos[19]) * scale / domain_width
r = float(halos[11]) * scale / .7
center = [x, y, z]
a.annotate_sphere(center, radius=(r, 'kpc'), circle_args={'color':'red'})
b.annotate_sphere(center, radius=(r, 'kpc'), circle_args={'color':'red'})
c.annotate_sphere(center, radius=(r, 'kpc'), circle_args={'color':'red'})
index = 0
for letter in [a,b,c]:
plot = letter.plots[('darkmatter0', 'particle_mass')]
plot.figure = fig
plot.axes = grid[index].axes
plot.cax = grid.cbar_axes[index]
letter._setup_plots()
index = index + 1
plt.savefig('{}/CatalogProjectionYT_VELA{}_Scale{}.png'.format(out_dir, VELA_number, str(scale)[2:5]), bbox_inches='tight')
plt.close()
Hi, Everybody!
Does anyone out there have a technique for getting the variance out of
a profile object? A profile object is good at getting <X> vs. B, I'd
then like to get < (X - <X>)^2 > vs B. Matt and I had spittballed the
possibility some time ago, but I was wondering if anyone out there had
successfully done it.
Thanks,
d.
--
Sent from my computer.
Hello all,
Apologies for crossposting.
-
Melissa Weber Mendonça
Scipy 2020 Diversity Committee Co-Chair
=====
SciPy 2020, the 19th annual Scientific Computing with Python conference,
will be held July 6-12, 2020 in Austin, Texas. The annual SciPy Conference
brings together over 900 participants from industry, academia, and
government to showcase their latest projects, learn from skilled users and
developers, and collaborate on code development. The call for SciPy 2020
talks, posters, and tutorials is now open through February 11, 2020.
Talks and Posters (July 8-10, 2020)
In addition to the general track, this year will have the following
specialized tracks, mini symposia, and sessions:
Tracks
High Performance Python
Machine Learning and Data Science
Mini Symposia
Astronomy and Astrophysics
Biology and Bioinformatics
Earth, Ocean, Geo and Atmospheric Science
Materials Science
Special Sessions
Maintainers Track
SciPy Tools Plenary Session
For additional details and instructions, please see the conference website.
<https://www.scipy2020.scipy.org/>
Tutorials (July 6-7, 2020)
Tutorials should be focused on covering a well-defined topic in a hands-on
manner. We are looking for awesome techniques or packages, helping new or
advanced Python programmers develop better or faster scientific
applications. We encourage submissions to be designed to allow at least 50%
of the time for hands-on exercises even if this means the subject matter
needs to be limited. Tutorials will be 4 hours in duration. In your
tutorial application, you can indicate what prerequisite skills and
knowledge will be needed for your tutorial, and the approximate expected
level of knowledge of your students (i.e., beginner, intermediate,
advanced). Instructors of accepted tutorials will receive a stipend.
For examples of content and format, you can refer to tutorials from past
SciPy tutorial sessions (SciPy 2018
<https://na-admin.eventscloud.com/emarketing/go.php?i=735095&e=amlsbGNAZW50a…>,
SciPy2019
<https://na-admin.eventscloud.com/emarketing/go.php?i=735095&e=amlsbGNAZW50a…>
) and some accepted submissions
<https://na-admin.eventscloud.com/emarketing/go.php?i=735095&e=amlsbGNAZW50a…>.
For additional details and instructions see the conference website
<https://na-admin.eventscloud.com/emarketing/go.php?i=735095&e=amlsbGNAZW50a…>
.
Submission page: https://easychair.org/conferences/?conf=scipy2020
Submission Deadline: February 11, 2020
I'm trying to retrieve the list of halo IDs for all particles from a HaloCatalog object. I think it is stored in something like "tags" (if I'm correctly reading yt_astro_analysis/halo_finding/halo_objects.py) but the following did *not* work:
from yt.extensions.astro_analysis.halo_analysis.api import HaloCatalog
data_ds = yt.load(snapname)
hc = HaloCatalog(data_ds=data_ds, finder_method='hop')
hc.create()
fof_tags = hc.tags
The error was:
AttributeError: 'HaloCatalog' object has no attribute 'tags'
Is it possible to access tags somehow? Or is there another way to get the halo ID list?
Thanks.
Hi all,
I feel like this should be relatively straightforward, but I have a lot of
rather small clouds that I have identified already. I can get info about
them by using their position and then creating a sphere around it.
I already have the maximum density and minimum temperature values for these
clouds. All I want to do is see if these are the same cell, and if not,
what the difference in temp (or density) is. So I know how to find a
maximum quantity, but not how to then find values of other variables in
that cell. I was thinking that I basically want an array with max density,
min temperature, density at min temperature, temperature at max density.
So can anyone point me to how to find the temperature of the cell with the
highest density in a sphere object?
Thanks!
Stephanie
--
--
Dr. Stephanie Tonnesen
Associate Research Scientist
CCA, Flatiron Institute
New York, NY
stonnes(a)gmail.com
Dear all,
Registration is open for the upcoming "yAC: yt at CCA" workshop, to take
place at the Flatiron Institute from Monday March 23rd through Wednesday
March 25th:
https://forms.gle/56bmuYKcX5NCDF5aA
This workshop will introduce the yt visualization and analysis tool (
https://yt-project.org/), provide tutorials and example workflows, and time
to interact with the developers. Additionally, there will be ample free
time for practice and hacking in the afternoons.
Participation is limited to ~40, so please register early if you are
interested. More details and a schedule will come in a few weeks.
local organizers:
Stephanie Tonnesen
Michael Zingale
--
Michael Zingale
Associate Professor
Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY
11794-3800
*phone*: 631-632-8225
*e-mail*: Michael.Zingale(a)stonybrook.edu
*web*: http://www.astro.sunysb.edu/mzingale
github: http://github.com/zingale
Dear Yt users,
I am trying to install YT with the attached installing script. I got the
following error message.
*Error::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
Installing yt
Testing that yt can be imported
install_script.sh: line 414: 45562 Illegal instruction (
${DEST_DIR}/bin/${PYTHON_EXEC} -c "import yt" 2>&1 ) >> ${LOG_FILE}
********************************************
FAILURE REPORT:
********************************************
yt conda-forge/linux-64::yt-3.5.1-py37hc1659b7_0
Downloading and Extracting Packages
yt-3.5.1 | 9.4 MB | ########## | 100%
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
********************************************
********************************************
Failure. Check /export/home/minato/yt2020/yt-conda/yt_install.log. The
last 10 lines are above.
*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
I also attached the log file for your reference. Please help me.
Many thanks,
-Prateek