<div dir="ltr">Hi Dan,<div><br></div><div>I did indeed write the frontend for Gadget FOF catalogs and I would be glad to help you get your data loaded in.</div><div><br></div><div>For Gadget FOF datasets, all of the cosmological parameters are stored as hdf5 attributes in a group called Header.  In the bit of code you posted, hvals is a dictionary containing all of the hdf5 attributes read in from the Header group.  It's possible that the name of the attribute storing omega_lambda has simply been changed from <span style="font-size:12.8px">OmegaLambda to something else.  Variable name changes have been known to happen in the Gadget codebase, so it's definitely possible.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">If this is all it is, then what we should do is alter this frontend to try a few different names to get the various cosmological parameters.  That should be quite easy to do and I could show you where to make the necessary changes and you could issue a pull request.  If there are further differences, it may be best to create a new frontend specifically for this data type.  I can't imagine there would be huge differences in the data format, so this shouldn't be too hard either.  If you were able to provide me with a sample dataset to test against, I would be happy to look at this.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Britton</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 22, 2016 at 3:23 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@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 Dan,<div><br></div><div>This means that yt isn't able to infer cosmological parameters for that dataset. It looks like you're trying to load a groups file, which is a subset of the full dataset, and it's being read in by the Gadget FOF frontend, which handles group datasets like this for the Gadget simulation code. Arepo and Gadget are supposed to share identical output formats, but it looks like the groups file you're trying to load is subtly different from the sorts of Gadget groups files that yt can already natively load.<br></div><div><br></div><div>Looking at the Gadget FOF frontend, there doesn't appear to be a way to set cosmology parameters by hand. I think the best approach here is probably to modify the Gadget FOF frontend to handle Arepo data.</div><div><br></div><div>Unfortunately I don't know much about the Gadget FOF frontend - Britton Smith is the author of that frontend and he may be able to chime in here.</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Feb 22, 2016 at 1:16 AM, D Mick <span dir="ltr"><<a href="mailto:danomick@gmail.com" target="_blank">danomick@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hello all, yt has some of the greatest plotting capabilities, and I greatly enjoy working with yt! Recently I have begun to work with hdf5 data from a large scale galaxy simulation (illustris) and I was wondering how I can work with the data, is there a general munging procedure for getting it into the correct yt format? When I try to plot <div><br></div><div><div>import yt</div><div><br></div><div>ds = yt.load("Groups_hdf5_plt_cnt_0150")</div><div>yt.SlicePlot(ds, 'x', "density", width = (800.0, 'kpc')).save()</div><div>yt.SlicePlot(ds, 'y', "density", width = (800.0, 'kpc')).save()</div><div>yt.SlicePlot(ds, 'z', "density", width = (800.0, 'kpc')).save()</div><div><br></div></div><div>I get the following error:</div><div><br></div><div>







<p><span>/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/yt/frontends/gadget_fof/data_structures.pyc</span><span> in </span><span>_parse_parameter_file</span><span>(self)</span></p>
<p><span><b>    151</b></span><span>         self</span><span>.</span><span>periodicity </span><span>=</span><span> </span><span>(</span><span>True</span><span>,</span><span> True</span><span>,</span><span> True</span><span>)</span></p>
<p><span><b>    152</b></span><span>         self</span><span>.</span><span>current_redshift </span><span>=</span><span> hvals</span><span>["Redshift"]</span></p>
<p><span>--> 153</span><span>         </span><span>self</span><span>.</span><span>omega_lambda </span><span>=</span><span> hvals</span><span>["OmegaLambda"]</span></p>
<p><span><b>    154</b></span><span>         self</span><span>.</span><span>omega_matter </span><span>=</span><span> hvals</span><span>["Omega0"]</span></p>
<p><span><b>    155</b></span><span>         self</span><span>.</span><span>hubble_constant </span><span>=</span><span> hvals</span><span>["HubbleParam"]</span></p>
<p><span></span><br></p>
<p><span>KeyError</span><span>: 'OmegaLambda'</span></p><p><span><br></span></p><p><span><br></span></p><p><span><br></span></p><p><span>I am guessing this is because the field entries do not match up.</span></p><p><span><br></span></p><p><span>Any help is much appreciated!</span></p><p><span><br></span></p><p><span>Dan</span></p></div></div>
<br></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>
<br></blockquote></div><br></div>
<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>