<div dir="ltr">I was able to get the following script to work locally using yt 3.4-dev. Unfortunately I hit a cython type error on yt 3.3.5 when yt tries to read the particle radial velocities off disk.<div><br></div><div><a href="https://gist.github.com/ngoldbaum/9506a215c8ae5770e0149dccde8ed012">https://gist.github.com/ngoldbaum/9506a215c8ae5770e0149dccde8ed012</a><br></div><div><br></div><div>I think what was happening with your memory error is that you either weren't loading the dataset with the .midx10 file or you weren't loading it with a sufficiently small bounding box.</div><div><br></div><div>Back to your original question - "radial_velocity" is a field defined for gas fields in AMR or SPH datasets. For particle data like dark_skies, you're going to need to use the "particle_radial_velocity" field.</div><div><br></div><div>Sorry that took a little while to figure out, I haven't touched the dark skies data or thingking in years so it took me a while to figure out how to properly load the data.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 1, 2017 at 7:50 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"><div>Is this one of the public dark skies datasets? How are you loading it (a full script one of us can run locally would be perfect)? What yt version are you using?</div><div><div class="h5"><br><div class="gmail_quote"><div>On Sat, Jul 1, 2017 at 7:15 PM ALEXANDROS TSOUROS <<a href="mailto:ph4602@edu.physics.uoc.gr" target="_blank">ph4602@edu.physics.uoc.gr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am terribly sorry for not being clear!<br>
<br>
Gadget has nothing to do with the problem, I merely mentioned it because<br>
when (in a completely unrelated problem) I use datasets derived from it,<br>
there's no problem using the 'radial_velocity' field. So Gadget is<br>
irrelevant to the query.<br>
<br>
The memory error comes by merely invoking the datasets via thingking and<br>
printing field_lists.<br>
<br>
Are you aware of anything I can do to get around this?<br>
<br>
Thank you for your time!<br>
<br>
On 2017-07-02 02:56, Nathan Goldbaum wrote:<br>
> Sorry, I'm confused.<br>
><br>
> In your first email you said you were having issues with the dark<br>
> skies simulation, but it seems you're trying to load it using the<br>
> Gadget frontend somehow? Or is this a different Gadget dataset?<br>
><br>
> As far as I'm aware, Dark Skies is available in the SDF output format,<br>
> or streaming over HTTP via thingking.<br>
><br>
> If it's just a big Gadget dataset, the issue is that it's too big to<br>
> load given the memory available on your machine. Right now you need<br>
> enough memory to store the Morton indices for all the particles (one<br>
> int64 per particle). We are actively working on improving this<br>
> situation by making yt use compressed bitmaps to store the Morton<br>
> indices, but that work won't be done for several months at least.<br>
><br>
> You should be able to stream the dark skies data over HTTP though<br>
> without having a ton of memory, there were some clever tricks applied<br>
> to get around the memory limit I described above.<br>
><br>
> The reason I was asking about the field_list for dark skies is because<br>
> I'd like to see what fields are available. The error message you saw<br>
> indicates that one or more of the fields necessary to calculate the<br>
> radial velocity is not available (or yt is not aware of an alias from<br>
> a field name on disk to yt's internal field name).<br>
><br>
> On Sat, Jul 1, 2017 at 6:46 PM ALEXANDROS TSOUROS<br>
> <<a href="mailto:ph4602@edu.physics.uoc.gr" target="_blank">ph4602@edu.physics.uoc.gr</a>> wrote:<br>
><br>
>> Thanks for your prompt reply!<br>
>><br>
>> So this is another problem. I'm using a 64-bit python installation,<br>
>> yet<br>
>> the output of 'print ds.file_list' is<br>
>><br>
>> "<br>
>> (...)<br>
>> Traceback (most recent call last):<br>
>> File "ds.py", line 5, in <module><br>
>> print ds.field_list<br>
>> File<br>
>><br>
> "/home/atsouros/gadget2/yt/yt-<wbr>conda/src/yt-git/yt/data_objec<wbr>ts/static_output.py",<br>
>> line 545, in field_list<br>
>> return self.index.field_list<br>
>> File<br>
>><br>
> "/home/atsouros/gadget2/yt/yt-<wbr>conda/src/yt-git/yt/data_objec<wbr>ts/static_output.py",<br>
>> line 503, in index<br>
>> self, dataset_type=self.dataset_type<wbr>)<br>
>> File<br>
>><br>
> "/home/atsouros/gadget2/yt/yt-<wbr>conda/src/yt-git/yt/geometry/p<wbr>article_geometry_handler.py",<br>
>> line 39, in __init__<br>
>> super(ParticleIndex, self).__init__(ds, dataset_type)<br>
>> File<br>
>><br>
> "/home/atsouros/gadget2/yt/yt-<wbr>conda/src/yt-git/yt/geometry/g<wbr>eometry_handler.py",<br>
>> line 50, in __init__<br>
>> self._setup_geometry()<br>
>> File<br>
>><br>
> "/home/atsouros/gadget2/yt/yt-<wbr>conda/src/yt-git/yt/geometry/p<wbr>article_geometry_handler.py",<br>
>> line 50, in _setup_geometry<br>
>> self._initialize_particle_hand<wbr>ler()<br>
>> File<br>
>><br>
> "/home/atsouros/gadget2/yt/yt-<wbr>conda/src/yt-git/yt/geometry/p<wbr>article_geometry_handler.py",<br>
>> line 104, in _initialize_particle_handler<br>
>> self._initialize_indices()<br>
>> File<br>
>><br>
> "/home/atsouros/gadget2/yt/yt-<wbr>conda/src/yt-git/yt/geometry/p<wbr>article_geometry_handler.py",<br>
>> line 126, in _initialize_indices<br>
>> morton = np.empty(self.total_particles, dtype="uint64")<br>
>> MemoryError<br>
>> "<br>
>><br>
>> I would assume that the problem is that it's running out of ram. In<br>
>> general, I am able to produce the examples provided by Dark Sky, so<br>
>> I<br>
>> can in general load data from the dataset. But I cannot use 'print<br>
>> ds.field_list'.<br>
>><br>
>> TL;DR<br>
>><br>
>> The output is 'MemoryError'.<br>
>><br>
>> On 2017-07-02 01:34, Nathan Goldbaum wrote:<br>
>>> What's the output of "print(ds.field_list)" with the loaded<br>
>> dataset?<br>
>>><br>
>>> On Sat, Jul 1, 2017 at 4:21 PM ALEXANDROS TSOUROS<br>
>>> <<a href="mailto:ph4602@edu.physics.uoc.gr" target="_blank">ph4602@edu.physics.uoc.gr</a>> wrote:<br>
>>><br>
>>>> Hello all!<br>
>>>><br>
>>>> I am quite new to yt, so please bear with my ignorance!<br>
>>>><br>
>>>> I need to perform analysis on the open data of the Dark Sky<br>
>>>> Simulation<br>
>>>> (<a href="http://darksky.slac.stanford.edu" rel="noreferrer" target="_blank">http://darksky.slac.stanford.<wbr>edu</a>). In particular I need to<br>
>> create 1<br>
>>>> dimensional profiles of the radial velocity of dark matter<br>
>> particles<br>
>>>> around halos.<br>
>>>><br>
>>>> Attached, you'll find my attempt at producing such a profile.<br>
>>>><br>
>>>> When I do this on a GADGET2 simulation I've run, I can use the<br>
>>>> 'radial_velocity' field without a problem. However, this script,<br>
>>>> where<br>
>>>> the data is that of the Dark Sky simulation, produces the<br>
>> following<br>
>>>> output :<br>
>>>><br>
>>>> '<br>
>>>> (...)<br>
>>>> yt.utilities.exceptions.YTFiel<wbr>dNotFound: Could not find field<br>
>>>> '('all',<br>
>>>> 'radial_velocity')' in ds14_a_1.0000.'<br>
>>>><br>
>>>> However, as I understand it, the field 'radial_velocity' is<br>
>> native<br>
>>>> to<br>
>>>> yt. How can I surpass this problem?<br>
>>>><br>
>>>> Any help will be appreciated.<br>
>>>><br>
>>>> Thank you very much for your time,<br>
>>>> Tsouros Alexandros<br>
>>>> ______________________________<wbr>_________________<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/lis<wbr>tinfo.cgi/yt-users-spacepope.<wbr>org</a><br>
>>> ______________________________<wbr>_________________<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/lis<wbr>tinfo.cgi/yt-users-spacepope.<wbr>org</a><br>
>> ______________________________<wbr>_________________<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/lis<wbr>tinfo.cgi/yt-users-spacepope.<wbr>org</a><br>
> ______________________________<wbr>_________________<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/lis<wbr>tinfo.cgi/yt-users-spacepope.<wbr>org</a><br>
______________________________<wbr>_________________<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/lis<wbr>tinfo.cgi/yt-users-spacepope.<wbr>org</a><br>
</blockquote></div></div></div></div>
</blockquote></div><br></div>