Nathan, Done (I tared 4 files together): /data/gnedin/REI/TMP >tar cvf gnedin_hop.tar hop.* hop.0.h5 hop.1.h5 hop.2.h5 hop.3.h5 /data/gnedin/REI/TMP >yt upload gnedin_hop.tar Stream body handler: received 9687040 bytes http://use.yt/upload/318d837f The files are available on BlueWaters at: /mnt/c/scratch/sciteam/ngnedin/PERM/B40/A.DMO/a=1.0008/hop/hop.*.h5 Thanks a lot. Nick On 05/16/2018 09:38 AM, Nathan Goldbaum wrote:
Hi,
Is there any chance you can share the hdf5 file? I'm not able to reproduce this warning using a test dataset I have so it might have something to do with the data.
You can share a dataset with "yt upload path/to/data.h5". That will upload to a server at NCSA and then print a link out to share here once its done.
If the data cannot be shared publicly you can send me an e-mail off-list with e.g. a dropbox link.
-Nathan
On Wed, May 16, 2018 at 10:32 AM, Nick Gnedin
mailto:ngnedin@gmail.com> wrote: I am trying to make a plot of all halos found by HOP. I copied your example from http://yt-project.org/doc/cookbook/simple_plots.html http://yt-project.org/doc/cookbook/simple_plots.html
If I just plot partile positions:
--------------------- script ------------------- import yt import numpy as np
# load the dataset ds = yt.load('../B40/A.DMO/a=1.0008/hop/hop.0.h5')
# create our plot p = yt.ParticlePlot(ds, 'particle_position_x', 'particle_position_y')
m = ds.all_data()[('all', 'particle_mass')] print(np.amin(m),np.amax(m))
# pick some appropriate units p.set_axes_unit('Mpc') p.set_unit('particle_mass', 'Msun')
#save result p.save() -----------------------------------------------
then everything works fine. However, if I use mass weighting:
p = yt.ParticlePlot(ds, 'particle_position_x', 'particle_position_y', 'particle_mass')
I get the following error:
... yt : [INFO ] 2018-05-16 09:27:39,004 Allocating for 1.997e+05 particles (index particle type 'all') yt : [INFO ] 2018-05-16 09:27:39,381 Identified 5.972e+04 octs yt : [INFO ] 2018-05-16 09:27:40,021 xlim = 0.000000 199229564535610884216586240.000000 yt : [INFO ] 2018-05-16 09:27:40,021 ylim = 0.000000 199229564535610884216586240.000000 yt : [INFO ] 2018-05-16 09:27:40,023 xlim = 0.000000 199229564535610884216586240.000000 yt : [INFO ] 2018-05-16 09:27:40,023 ylim = 0.000000 199229564535610884216586240.000000 yt : [INFO ] 2018-05-16 09:27:40,042 Splatting (('all', 'particle_mass')) onto a 800 by 800 mesh 4.1036023233207635e+41 g 1.921697915571756e+47 g yt : [INFO ] 2018-05-16 09:27:44,084 Saving plot hop.0.h5_Particle_z_particle_mass.png /u/sciteam/ngnedin/.local/lib/python3.5/site-packages/matplotlib/colors.py:1020: RuntimeWarning: invalid value encountered in less_equal mask |= resdat <= 0
Notice, that there are no nonpositive masses in the catalog print(np.amin(m),np.amax(m)): 4.1036023233207635e+41 g 1.921697915571756e+47 g
_______________________________________________ yt-users mailing list -- yt-users@python.org mailto:yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org mailto:yt-users-leave@python.org