<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 Andrew,<div class=""><br class=""></div><div class="">I had a look of those files and I think I get what you mean. By the way, about my second question, ‘cannot load in PartTypeN fields’, I think probably it’s because there is no definition of those fields in yt’s source code.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Yuxiang<br class="">
<br class=""><div><blockquote type="cite" class=""><div class="">On 22 Jan 2015, at 10:42, Andrew Myers <<a href="mailto:atmyers2@gmail.com" class="">atmyers2@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi <span style="font-size:13px" class="">Yuxiang,</span><div class=""><span style="font-size:13px" class=""><br class=""></span></div><div class="">There is a standard list of fields that yt automatically defines whenever you load an OWLS dataset (you can see the list in yt/frontends/owls/fields.py). You don't need to explicitly define any new fields yourself for this to happen - this all takes place under the hood. I think that the code that does this is adding all the fields twice for some reason. This is something that needs to get fixed in the OWLS frontend in yt's source code, not anything you are doing in your scripts.  </div><div class=""><br class=""></div><div class="">-Andrew</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Jan 21, 2015 at 3:30 PM, Yuxiang Qin <span dir="ltr" class=""><<a href="mailto:yuxiangq@student.unimelb.edu.au" target="_blank" class="">yuxiangq@student.unimelb.edu.au</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi,<div class=""><br class=""></div><div class="">Thanks for your help.</div><div class=""><br class=""></div><div class="">Nathan, I am using OWLS, a Gadget format data.</div><div class=""><br class=""></div><div class="">Andrew, what do you mean by ‘add a field that has already been defined’? I am not defining a new field. Does it mean there is already a new field in my data? If so, why yt says it’s a new field since it’s already there? I am kind of confused about it.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Yuxiang<div class=""><div class="h5"><br class="">
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On 22 Jan 2015, at 09:43, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" target="_blank" class="">nathan12343@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Hi Yuxiang,<div class=""><br class=""></div><div class="">What simulation code produced these files?  Judging by the naming, I'd have to guess some flavor of gadget, but it's not clear based on your e-mail.</div><div class=""><br class=""></div><div class="">-Nathan</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Jan 20, 2015 at 4:29 PM, Yuxiang Qin <span dir="ltr" class=""><<a href="mailto:yuxiangq@student.unimelb.edu.au" target="_blank" class="">yuxiangq@student.unimelb.edu.au</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><span style="font-size:14px" class="">Dear yt-users,</span><div class=""><span style="font-size:14px" class=""><br class=""></span></div><div class=""><span style="font-size:14px" class="">I have a tiny question about loading files.</span></div><div class=""><span style="font-size:14px" class=""><br class=""></span></div><div class=""><span style="font-size:14px" class="">I understand when yt load files, it will load all the files in the directory. For example: if I do </span><span style="font-size:14px;background-color:rgb(0,0,0)" class=""><font color="#29f914" face="Andale Mono" class="">ds=yt.load('snap_103.0.hdf5’)</font></span><span style="font-size:14px" class="">, then </span><span style="font-size:14px;color:rgb(41,249,20);font-family:'Andale Mono';background-color:rgb(0,0,0)" class="">ds.field_list</span><span style="font-size:14px" class=""> , yt would open all the files:</span></div><div class=""><span style="font-size:14px" class=""><br class=""></span></div><div class=""><div style="margin:0px;font-family:'Andale Mono';color:rgb(51,196,38);background-color:rgb(0,0,0)" class=""><span style="font-size:14px" class="">snap_103.0.hdf5<span style="color:#29f914" class="">*   </span>snap_103.16.hdf5<span style="color:#29f914" class="">*  </span>snap_103.22.hdf5<span style="color:#29f914" class="">*  </span>snap_103.29.hdf5<span style="color:#29f914" class="">*  </span>snap_103.6.hdf5<span style="color:#29f914" class="">*</span></span></div><div style="margin:0px;font-family:'Andale Mono';color:rgb(51,196,38);background-color:rgb(0,0,0)" class=""><span style="font-size:14px" class="">snap_103.10.hdf5<span style="color:#29f914" class="">*  </span>snap_103.17.hdf5<span style="color:#29f914" class="">*  </span>snap_103.23.hdf5<span style="color:#29f914" class="">*  </span>snap_103.2.hdf5<span style="color:#29f914" class="">*   </span>snap_103.7.hdf5<span style="color:#29f914" class="">*</span></span></div><div style="margin:0px;font-family:'Andale Mono';color:rgb(51,196,38);background-color:rgb(0,0,0)" class=""><span style="font-size:14px" class="">snap_103.11.hdf5<span style="color:#29f914" class="">*  </span>snap_103.18.hdf5<span style="color:#29f914" class="">*  </span>snap_103.24.hdf5<span style="color:#29f914" class="">*  </span>snap_103.30.hdf5<span style="color:#29f914" class="">*  </span>snap_103.8.hdf5<span style="color:#29f914" class="">*</span></span></div><div style="margin:0px;font-family:'Andale Mono';color:rgb(51,196,38);background-color:rgb(0,0,0)" class=""><span style="font-size:14px" class="">snap_103.12.hdf5<span style="color:#29f914" class="">*  </span>snap_103.19.hdf5<span style="color:#29f914" class="">*  </span>snap_103.25.hdf5<span style="color:#29f914" class="">*  </span>snap_103.31.hdf5<span style="color:#29f914" class="">*  </span>snap_103.9.hdf5<span style="color:#29f914" class="">*</span></span></div><div style="margin:0px;font-family:'Andale Mono';color:rgb(51,196,38);background-color:rgb(0,0,0)" class=""><span style="font-size:14px" class="">snap_103.13.hdf5<span style="color:#29f914" class="">*  </span>snap_103.1.hdf5<span style="color:#29f914" class="">*   </span>snap_103.26.hdf5<span style="color:#29f914" class="">*  </span>snap_103.3.hdf5<span style="color:#29f914" class="">*                   </span></span></div><div style="margin:0px;font-family:'Andale Mono';color:rgb(51,196,38);background-color:rgb(0,0,0)" class=""><span style="font-size:14px" class="">snap_103.14.hdf5<span style="color:#29f914" class="">*  </span>snap_103.20.hdf5<span style="color:#29f914" class="">*  </span>snap_103.27.hdf5<span style="color:#29f914" class="">*  </span>snap_103.4.hdf5<span style="color:#29f914" class="">*                   </span></span></div><div style="margin:0px;font-family:'Andale Mono';color:rgb(51,196,38);background-color:rgb(0,0,0)" class=""><span style="font-size:14px" class="">snap_103.15.hdf5<span style="color:#29f914" class="">*  </span>snap_103.21.hdf5<span style="color:#29f914" class="">*  </span>snap_103.28.hdf5<span style="color:#29f914" class="">*  </span>snap_103.5.hdf5<span style="color:#29f914" class="">*                   </span></span></div></div><div class=""><span style="font-size:14px" class=""> <br class=""></span><div class="">
<div style="text-align:start;text-indent:0px;word-wrap:break-word" class=""><div style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-size:14px" class=""><span style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(255,255,255)" class="">However, if our data only has one file :</span><span style="color:rgb(51,196,38);font-family:'Andale Mono';background-color:rgb(0,0,0)" class="">snap_103.hdf5</span><span style="font-family:'Andale Mono';background-color:rgb(0,0,0);color:rgb(41,249,20)" class="">*</span><span style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(255,255,255)" class="">, then if I do </span><span style="background-color:rgb(0,0,0)" class=""><font color="#29f914" face="Andale Mono" class="">ds=yt.load('snap_103.hdf5’)</font></span>, then <span style="color:rgb(41,249,20);font-family:'Andale Mono';background-color:rgb(0,0,0)" class="">ds.field_list</span>, yt would still try to open all the files from <span style="color:rgb(51,196,38);font-family:'Andale Mono';background-color:rgb(0,0,0)" class="">snap_103.0.hdf5</span>, however there is no <span style="color:rgb(51,196,38);font-family:'Andale Mono';background-color:rgb(0,0,0)" class="">snap_103.0.hdf5</span>. It would report error: </span></div><div style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-size:14px" class=""><br class=""></span></div><div style="color:rgb(41,249,20);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;margin:0px;font-family:'Andale Mono';background-color:rgb(0,0,0);min-height:14px" class=""><span style="font-size:14px" class=""><span style="color:rgb(195,55,32)" class="">IOError</span>: Unable to open file (Unable to open file: name = '/lustre/projects/p071_swin/yqin/smaug/ref_eff_l010n0128/data/snapshot_102/snap_102.0.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)                                                                            <span class=""></span></span></div><div style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(255,255,255);font-size:14px" class=""><br class=""></span></div><div class=""><font face="Helvetica, Arial, sans-serif" class=""><span style="background-color:rgb(255,255,255);font-size:14px" class="">Is there an argument saying I don’t want to do loading recursively? I can make a link named </span></font><span style="color:rgb(51,196,38);font-family:'Andale Mono';font-size:14px;background-color:rgb(0,0,0)" class="">snap_103.0.hdf5</span><span style="font-family:Helvetica,Arial,sans-serif;font-size:14px;background-color:rgb(255,255,255)" class=""> to </span><span style="color:rgb(51,196,38);font-family:'Andale Mono';font-size:14px;background-color:rgb(0,0,0)" class="">snap_103.hdf5</span><span style="background-color:rgb(255,255,255)" class=""><font face="Helvetica, Arial, sans-serif" class=""><span style="font-size:14px" class="">. But it’s kind of inconvenient.</span></font></span></div><div class=""><font face="Helvetica, Arial, sans-serif" class=""><span style="background-color:rgb(255,255,255)" class=""><span style="font-size:14px" class=""><br class=""></span></span></font></div><div class=""><font face="Helvetica, Arial, sans-serif" class=""><span style="background-color:rgb(255,255,255)" class=""><span style="font-size:14px" class="">Cheers,</span></span></font></div><div style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-size:14px" class=""><span style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(255,255,255)" class="">--</span></span></div><div style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-size:14px" class=""><span style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(255,255,255)" class="">Yuxiang Qin</span></span></div><div style="letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px" class=""><span style="font-size:14px" class=""><span style="background-color:rgb(255,255,255)" class=""><font face="Helvetica, Arial, sans-serif" class="">PhD Student</font><br style="font-family:Helvetica,Arial,sans-serif" class=""></span><span style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(255,255,255)" class="">School of Physics</span><br style="font-family:Helvetica,Arial,sans-serif" class=""><span style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(255,255,255)" class="">The University of Melbourne</span><br style="font-family:Helvetica,Arial,sans-serif" class=""><span style="font-family:Helvetica,Arial,sans-serif;background-color:rgb(255,255,255)" class="">VIC, Australia, 3010</span></span><br style="font-family:Helvetica,Arial,sans-serif;font-size:15px" class=""></div></div>
</div>
<br class=""></div></div><br 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/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<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/listinfo.cgi/yt-users-spacepope.org</a><br class=""></div></blockquote></div><br class=""></div></div></div></div><br 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" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<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="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br class=""></div></blockquote></div><br class=""></div></body></html>