<div dir="ltr">Hi Semyeong,<div><br></div><div>Yes, this is issue 823:</div><div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/issues/823">https://bitbucket.org/yt_analysis/yt/issues/823</a><br></div><div><br></div><div>If you're up for it, adding a print_stats method for SPH data would be a great first contribution to yt.</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 11:59 AM, Semyeong Oh <span dir="ltr"><<a href="mailto:semyeong.oh@gmail.com" target="_blank">semyeong.oh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nathan,<br><br><br>I can run the script, and I think it just must have been something I did before running this part of the code<br>that produced the problem (not sure exactly what..). Sorry for the trouble.<br><br><br>I just wanted to report that even if the dataset is correctly loaded, print_stats for this and also the example at yt<br>(<a href="http://yt-project.org/data/GadgetDiskGalaxy.tar.gz" target="_blank">http://yt-project.org/data/GadgetDiskGalaxy.tar.gz</a>)<br>seem to give AttributeError<br><pre style="overflow:auto;font-size:14px;padding:0px;margin-top:0px;margin-bottom:0px;line-height:17.0001px;word-break:break-all;word-wrap:break-word;border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><span style="color:darkred">---------------------------------------------------------------------------</span>
<span style="color:darkred">AttributeError</span> Traceback (most recent call last)
<span style="color:darkgreen"><ipython-input-5-d2b97580ae55></span> in <span style="color:steelblue"><module><span style="color:darkblue">()</span>
<span style="color:darkgreen">----> 1<span style="color:darkred"> </span>ds<span style="color:darkblue">.</span>print_stats<span style="color:darkblue">(</span><span style="color:darkblue">)</span><span style="color:darkblue"></span>
<span>/Users/semyeong/miniconda2/envs/yt/lib/python2.7/site-packages/yt/utilities/parallel_tools/parallel_analysis_interface.pyc</span> in <span style="color:steelblue">root_only<span style="color:darkblue">(*args, **kwargs)</span>
<span style="color:darkgreen"> 317</span> <span style="color:darkgreen">def</span> root_only<span style="color:darkblue">(</span><span style="color:darkblue">*</span>args<span style="color:darkblue">,</span> <span style="color:darkblue">**</span>kwargs<span style="color:darkblue">)</span><span style="color:darkblue">:</span><span style="color:darkblue"></span>
<span style="color:darkgreen"> 318</span> <span style="color:darkgreen">if</span> <span style="color:darkgreen">not</span> parallel_capable<span style="color:darkblue">:</span><span style="color:darkblue"></span>
<span style="color:darkgreen">--> 319<span style="color:darkred"> <span style="color:darkgreen">return</span> func<span style="color:darkblue">(</span><span style="color:darkblue">*</span>args<span style="color:darkblue">,</span> <span style="color:darkblue">**</span>kwargs<span style="color:darkblue">)</span><span style="color:darkblue"></span>
<span style="color:darkgreen"> 320</span> comm <span style="color:darkblue">=</span> _get_comm<span style="color:darkblue">(</span>args<span style="color:darkblue">)</span><span style="color:darkblue"></span>
<span style="color:darkgreen"> 321</span> rv <span style="color:darkblue">=</span> None<span style="color:darkblue"></span>
<span style="color:darkgreen">/Users/semyeong/miniconda2/envs/yt/lib/python2.7/site-packages/yt/data_objects/static_output.pyc</span> in <span style="color:steelblue">print_stats<span style="color:darkblue">(self)</span>
<span style="color:darkgreen"> 357</span> <span style="color:darkblue">@</span>parallel_root_only<span style="color:darkblue"></span>
<span style="color:darkgreen"> 358</span> <span style="color:darkgreen">def</span> print_stats<span style="color:darkblue">(</span>self<span style="color:darkblue">)</span><span style="color:darkblue">:</span><span style="color:darkblue"></span>
<span style="color:darkgreen">--> 359<span style="color:darkred"> </span>self<span style="color:darkblue">.</span>index<span style="color:darkblue">.</span>print_stats<span style="color:darkblue">(</span><span style="color:darkblue">)</span><span style="color:darkblue"></span>
<span> 360</span> <span style="color:darkblue"></span>
<span> 361</span> <span style="color:darkblue">@</span>property<span style="color:darkblue"></span>
<span style="color:darkred">AttributeError</span>: 'ParticleIndex' object has no attribute 'print_stats'
</span></span></span></span></span></span></span></pre><div><span style="color:steelblue"><span style="color:darkgreen"><span style="color:steelblue"><span style="color:darkgreen"><span style="color:darkred"><span style="color:steelblue"><span style="color:darkgreen"><br></span></span></span></span></span></span></span></div><br>Thanks,<div>Semyeong<div><div class="h5"><br><br><br><div class="gmail_quote"><div dir="ltr">On Tue, May 3, 2016 at 12:33 PM Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Semyeong,<div><br></div><div>Hmm, so I just tried with yt 3.2.3, and I'm unable to reproduce this using the following script (and with the snapshot you uploaded in the same directory as the script):</div><div><br></div><div><a href="http://paste.yt-project.org/show/6455/" target="_blank">http://paste.yt-project.org/show/6455/</a><br></div><div><br></div><div>So I'm not sure what's going wrong on your setup. Are you unable to run my pasted script?</div></div><div dir="ltr"><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 11:13 AM, Semyeong Oh <span dir="ltr"><<a href="mailto:semyeong.oh@gmail.com" target="_blank">semyeong.oh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It is<div><br></div><div><div>yt module located at:</div><div> /Users/semyeong/miniconda2/envs/yt/lib/python2.7/site-packages</div><div><br></div><div>The current version and changeset for the code is:</div><div><br></div><div>---</div><div>Version = 3.2.3</div><div>Changeset = None</div><div>---</div></div><div><br></div><div>Semyeong</div></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 3, 2016 at 12:09 PM Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Semyeong,<div><br></div><div>I'm not able to reproduce this behavior in yt 3.3dev. Any chance you can share what yt version you're using? The output of "yt version", run from the command line, should be sufficient.</div></div><div dir="ltr"><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 11:06 AM, Semyeong Oh <span dir="ltr"><<a href="mailto:semyeong.oh@gmail.com" target="_blank">semyeong.oh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sure, this is the link <a href="http://use.yt/upload/28d51f76" target="_blank">http://use.yt/upload/28d51f76</a><span><font color="#888888"><div><br></div><div>Semyeong</div></font></span></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 3, 2016 at 12:05 PM Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Any chance you can link to the HDF5 file? I don't have a gadget development environment set up.<div><br></div><div>You can use the yt curldrop:</div><div><br></div><div>$ curl -T <span style="font-size:12.8px">snapshot_000.hdf5 <a href="http://use.yt/upload/" target="_blank">http://use.yt/upload/</a></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">And then share the link this prints out here.</span></div></div><div dir="ltr"><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">-Nathan</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 11:02 AM, Semyeong Oh <span dir="ltr"><<a href="mailto:semyeong.oh@gmail.com" target="_blank">semyeong.oh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nathan,<div><br></div><div>The dataset is just from <a href="http://wwwmpa.mpa-garching.mpg.de/gadget/gadget-2.0.7.tar.gz" target="_blank">http://wwwmpa.mpa-garching.mpg.de/gadget/gadget-2.0.7.tar.gz</a> ICs/gassphere_littleendian.dat, and output from running the simulation (using /Gadget2/parameterfiles/gassphere.{Makefile/param} with format=2 (hdf5)</div><div><br></div><div>Semyeong</div></div><div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 3, 2016 at 11:54 AM Matthew Turk <<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Semyeong,<div><br></div><div>Looks like the bounding box is getting confused somehow, and it's seeing it as the same value for left/right edge. I think your ordering of the bbox is correct (if it weren't, then changing the ordering to be [[-bbox_lim, -bbox_lim, -bbox_lim], [bbox_lim, bbox_lim, bbox_lim]] would fix it) but I'm not sure why it's failing.</div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Tue, May 3, 2016 at 10:46 AM, Semyeong Oh <span dir="ltr"><<a href="mailto:semyeong.oh@gmail.com" target="_blank">semyeong.oh@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I'm having trouble reading gadget-2 both binary and hdf5 format, and</div><div>was wondering if I could get some help.</div><div>I'm testing out with the example distributed with gadget code, the gas sphere example which only</div><div>contains ~1500 gas particles.</div><div><br></div><div>- If I try to read the initial condition (distributed with gadget) binary file with yt.load, this command seems to</div><div>execute fine, but the field_list returns empty list.</div><div><br></div><div>- If I try to read the output of the simulation in hdf5 format,</div><div><div>fname = 'output/snapshot_000.hdf5'</div><div>unit_base = {'UnitLength_in_cm' : 1.,</div><div> 'UnitMass_in_g' : 1.,</div><div> 'UnitVelocity_in_cm_per_s' : 1.}</div><div><br></div><div>bbox_lim = 5</div><div>bbox = [[-bbox_lim,bbox_lim],</div><div> [-bbox_lim,bbox_lim],</div><div> [-bbox_lim,bbox_lim]]</div><div> </div><div>ds = yt.load(fname,unit_base=unit_base, bounding_box=bbox)</div></div><div><br></div><div>and try ds.field_list or ds.print_stats,</div><div>I end up getting something like this <a href="https://gist.github.com/smoh/7779e9ef546f9b05565aef86893dccd2" target="_blank">https://gist.github.com/smoh/7779e9ef546f9b05565aef86893dccd2</a></div><div>which is obscure.</div><div><br></div><div>What am I doing wrong?</div><div><br></div><div>Thanks,</div><div>Semyeong</div></div><span><font color="#888888"><div dir="ltr">-- <br></div><div dir="ltr">Semyeong</div>
</font></span><br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div></div>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div></div></div><span><font color="#888888"><div dir="ltr">-- <br></div><div dir="ltr">Semyeong</div>
</font></span><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><div dir="ltr">-- <br></div><div dir="ltr">Semyeong</div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><div dir="ltr">-- <br></div><div dir="ltr">Semyeong</div>
</div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div></div></div></div></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div dir="ltr">Semyeong</div>
</font></span><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>