<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Nathan,<div class=""><br class=""></div><div class="">Yes, I have some smaller (~85MB) sample I could upload. I guess it should ideally be HDF5? (Originally it is format 2, but I can easily convert.) What naming should I use?</div><div class="">I would guess, my format is pretty much “the standard” except for the metallicity block (which in fact is element masses for 12 different elements).</div><div class=""><br class=""></div><div class="">So again, how am I supposed the data set class I derive from GadgetHDF5Dataset? Simply replacing `yt.load` yields an exception complaining that the `bounding_box` keyword argument is unexpected.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Bernhard</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 26 Sep 2016, at 17:24, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" class="">nathan12343@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><br class="Apple-interchange-newline"><br class=""><div class="gmail_quote">On Mon, Sep 26, 2016 at 10:15 AM, Bernhard Röttgers<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:broett@mpa-garching.mpg.de" target="_blank" class="">broett@mpa-garching.mpg.de</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class="">Hi Britton,<div class=""><br class=""></div><div class="">thanks for the answer and sorry for my late answer!</div><div class=""><br class=""></div><div class="">No, I don’t have OWLS/EAGLE/Gizmo snapshots. I actually just wanted to compare my results with yt/trident, but your solution does not seem to be too complicated. How, am I supposed to use it? (Sorry for asking dump questions. I’m not familiar with yt.) I understood that I can load a Gadget snapshot with like:</div><div class=""><br class=""></div><div class=""><div class="">ds = yt.load(YT_FNAME, unit_base=UNIT_BASE, bounding_box=bbox)</div><div class="">ds.index</div></div><div class=""><br class=""></div><div class="">The data structure `ds` then is what is passed to trident. Where does the new frontend come into play?</div></div></blockquote><div class=""><br class=""></div><div class="">Right now yt makes certain assumptions about the structure and meaning of data in Gadget output files. The assumptions currently used in yt are based on the public data the yt developers have access to (e.g. the datasets on<span class="Apple-converted-space"> </span><a href="http://yt-project.org/data" class="">yt-project.org/data</a>) and are only valid in so far as those datasets are representative of Gadget data in general. Due to the history of the Gadget's code, there are in reality many different flavors of Gadget that make different assumptions about what the data they write to disk means, and it seems yt doesn't currently make incorrect assumptions for your flavor of Gadget data.</div><div class=""><br class=""></div><div class="">Do you happen to have a test dataset that you can share? In principle the necessary modification should be simple, and having a dataset to test with would be helpful. One way to share files with us is to use the yt curldrop:</div><div class=""><br class=""></div><div class=""><a href="https://docs.hub.yt/services.html#curldrop" class="">https://docs.hub.yt/services.html#curldrop</a></div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><br class=""></div><div class="">And some more questions:</div><div class="">What exactly are the code metallicity units? In my case yt says its in units of 1. Is this interpreted as absolute units or in solar metallicity?</div></div></blockquote><div class=""><br class=""></div><div class="">In units of solar metallicity. There is also the metal_density, which should have units of g/cm**3 (by default, if may be different if you specified a value for the `unit_system` keyword when you called the load() function.</div><div class=""> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Bernhard</div><div class=""><div class="gmail-h5"><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 19 Sep 2016, at 15:04, Britton Smith <<a href="mailto:brittonsmith@gmail.com" target="_blank" class="">brittonsmith@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Hi Bernhard,<div class=""><br class=""></div><div class="">Does your data come from a specific flavor of Gadget that is supported by yt?  For example, we currently support OWLS, EAGLE, and Gizmo data that have fields for individual elements.  If not, then it is probably best to try and put together a new frontend for this data.  If the type of data that you're working with is not public or widely used, the best thing may be to create a frontend that exists as a yt extension (an external module not inside the main yt codebase).  Here is an example of one that I created a while back for the FIRE simulation data:</div><div class=""><a href="https://bitbucket.org/brittonsmith/yt_fire" target="_blank" class="">https://bitbucket.org/<wbr class="">brittonsmith/yt_fire</a><br class=""></div><div class=""><br class=""></div><div class="">If the only thing that is different about your data is the way that the metallicity fields are defined, then it shouldn't be too difficult to create a subclass of an existing Gadget frontend that overrides the field definitions.  Please, let us know if you're interested in pursuing this and we can work with you.</div><div class=""><br class=""></div><div class="">Britton</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Sep 17, 2016 at 11:45 AM, Bernhard Röttgers<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:broett@mpa-garching.mpg.de" target="_blank" class="">broett@mpa-garching.mpg.de</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;" class="">Hello!<div class=""><br class=""></div><div class="">I am trying to use <a href="https://bitbucket.org/trident-project/trident" target="_blank" class="">trident</a> (yt-based code) to generate spectra out of my Gadget simulations (stored in HDF5). I could get the code running, but the spectra are scaled weirdly. I was able to track the problem down to a weirdly scaled metallicity block within yt. I am guessing that the issue is related to the fact, that my block “Metallicity” is in fact element masses for individual elements, i.e. for each particle I have an array of masses for the 12 elements He, C, Mg, O, Fe, Si, H, N, Ne, S, Ca, and the rest (I know, a crappy naming for such a block, but that’s the way it is).</div><div class=""><br class=""></div><div class="">Is there a way to force yt to create the metallicity block correctly?.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Bernhard</div></div><br class="">______________________________<wbr class="">_________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a><br class=""><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank" class="">http://lists.spacepope.org/lis<wbr class="">tinfo.cgi/yt-users-spacepope.<wbr class="">org</a><br class=""><br class=""></blockquote></div><br class=""></div>______________________________<wbr class="">_________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a><br class=""><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/<wbr class="">listinfo.cgi/yt-users-<wbr class="">spacepope.org</a><br class=""></div></blockquote></div><br class=""></div></div></div></div><br class="">______________________________<wbr class="">_________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class=""><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank" class="">http://lists.spacepope.org/<wbr class="">listinfo.cgi/yt-users-<wbr class="">spacepope.org</a><br class=""><br class=""></blockquote></div><br class=""></div></div><span style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">yt-users mailing list</span><br style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:yt-users@lists.spacepope.org" style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">yt-users@lists.spacepope.org</a><br style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" style="font-family: Helvetica; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a></div></blockquote></div><br class=""></div></body></html>