<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 9, 2017 at 9:11 AM,  <span dir="ltr"><<a href="mailto:yt-users-request@lists.spacepope.org" target="_blank">yt-users-request@lists.spacepope.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send yt-users mailing list submissions to<br>
        <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.<wbr>spacepope.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:yt-users-owner@lists.spacepope.org">yt-users-owner@lists.<wbr>spacepope.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of yt-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Normalized axis (Sushilkumar)<br>
   2. Re: Normalized axis (Nathan Goldbaum)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Fri, 9 Jun 2017 09:08:36 -0500<br>
From: Sushilkumar <<a href="mailto:sushil.sush19us@gmail.com">sushil.sush19us@gmail.com</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: [yt-users] Normalized axis<br>
Message-ID:<br>
        <<wbr>CAKARaKWnE99yKGhb8yQTQY7zYkwe+<wbr>oBNbqJtPRUHcZ2KT=f=<a href="mailto:dQ@mail.gmail.com">dQ@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear yt<br>
<br>
How do I label the axis of a plot in normalized values?<br>
<br>
On my plot I want to label my x and y axis in terms of the vertical line.<br>
<br>
Do I use convert_to_plot under streamlines?<br>
<br>
Link to the plot and script is below<br>
<br>
<a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank">https://drive.google.com/open?<wbr>id=<wbr>0B4g8shg4DL7oak5PLWVVdG5UMHc</a><br>
<br>
Thanks in advance<br>
<br>
<br>
<br>
On Thu, Jun 8, 2017 at 1:01 PM, <<a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.<wbr>spacepope.org</a>><br>
wrote:<br>
<br>
> Send yt-users mailing list submissions to<br>
>         <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
><br>
> To subscribe or unsubscribe via the World Wide Web, visit<br>
>         <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
> or, via email, send a message with subject or body 'help' to<br>
>         <a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.<wbr>spacepope.org</a><br>
><br>
> You can reach the person managing the list at<br>
>         <a href="mailto:yt-users-owner@lists.spacepope.org">yt-users-owner@lists.<wbr>spacepope.org</a><br>
><br>
> When replying, please edit your Subject line so it is more specific<br>
> than "Re: Contents of yt-users digest..."<br>
><br>
><br>
> Today's Topics:<br>
><br>
>    1. Re: selecting data by refinement level (Klaus Weide)<br>
>    2. Re: selecting data by refinement level (Matthew Turk)<br>
>    3. Re: selecting data by refinement level (Nathan Goldbaum)<br>
>    4. Re: selecting data by refinement level (Klaus Weide)<br>
><br>
><br>
> ------------------------------<wbr>------------------------------<wbr>----------<br>
><br>
> Message: 1<br>
> Date: Wed, 7 Jun 2017 13:53:49 -0500 (CDT)<br>
> From: Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu">klaus@flash.uchicago.edu</a>><br>
> To: Discussion of the yt analysis package<br>
>         <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
> Subject: Re: [yt-users] selecting data by refinement level<br>
> Message-ID: <<a href="mailto:Pine.LNX.4.64.1706071350010.1322@flash.uchicago.edu">Pine.LNX.4.64.1706071350010.<wbr>1322@flash.uchicago.edu</a>><br>
> Content-Type: TEXT/PLAIN; charset=US-ASCII<br>
><br>
> On Wed, 7 Jun 2017, Matthew Turk wrote:<br>
><br>
> > Hi Klaus,<br>
> ><br>
> > Whoops, I said "grid_collection" but I meant "data_collection".<br>
><br>
> Thanks Matt. I have not tried the 'collection of grids' approach yet, but<br>
> the following does what I want:<br>
><br>
>         ds = yt.load(dump_path)<br>
><br>
>         ad = ds.all_data()<br>
>         if fine_only:<br>
>             maxreflevel = ad.index.grid_levels.max()<br>
>             print '*** Filtering data so that only FLASH refinement level<br>
> {} cells are used'.format(maxreflevel+1)<br>
>             ad.min_level = maxreflevel<br>
>             ad.max_level = maxreflevel<br>
>             print 'These cover a volume of %s' % ad['cell_volume'].sum()<br>
>         # .....<br>
>         data = {}<br>
>         data['dens'] = ad['dens'].to_ndarray()<br>
>         # .....<br>
><br>
><br>
> Klaus<br>
><br>
><br>
> ------------------------------<br>
><br>
> Message: 2<br>
> Date: Wed, 7 Jun 2017 13:56:51 -0500<br>
> From: Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>><br>
> To: Discussion of the yt analysis package<br>
>         <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
> Subject: Re: [yt-users] selecting data by refinement level<br>
> Message-ID:<br>
>         <CALO3=<wbr>5HbBWfPj8hf5KEwMq1CiU932Q_u+=<wbr>hHcBzYirQzGYCm3A@mail.<br>
> <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>><br>
> Content-Type: text/plain; charset="UTF-8"<br>
><br>
> Great!  As a quick note, you can use `.d` as shorthand for<br>
> `to_ndarray()`.  The YTArray it returns is a subclass of ndarray, so<br>
> should in general be usable in both ways; as you probably figured out,<br>
> if you do any manipulation of individual elements it adds overhead and<br>
> (often frustrating, but hopefully ultimately helpful), restrictions on<br>
> combining incorrect units unless you look at it as a strict ndarray.<br>
><br>
> On Wed, Jun 7, 2017 at 1:53 PM, Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu">klaus@flash.uchicago.edu</a>><br>
> wrote:<br>
> > On Wed, 7 Jun 2017, Matthew Turk wrote:<br>
> ><br>
> >> Hi Klaus,<br>
> >><br>
> >> Whoops, I said "grid_collection" but I meant "data_collection".<br>
> ><br>
> > Thanks Matt. I have not tried the 'collection of grids' approach yet, but<br>
> > the following does what I want:<br>
> ><br>
> >         ds = yt.load(dump_path)<br>
> ><br>
> >         ad = ds.all_data()<br>
> >         if fine_only:<br>
> >             maxreflevel = ad.index.grid_levels.max()<br>
> >             print '*** Filtering data so that only FLASH refinement<br>
> level {} cells are used'.format(maxreflevel+1)<br>
> >             ad.min_level = maxreflevel<br>
> >             ad.max_level = maxreflevel<br>
> >             print 'These cover a volume of %s' % ad['cell_volume'].sum()<br>
> >         # .....<br>
> >         data = {}<br>
> >         data['dens'] = ad['dens'].to_ndarray()<br>
> >         # .....<br>
> ><br>
> ><br>
> > Klaus<br>
> > ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
><br>
><br>
> ------------------------------<br>
><br>
> Message: 3<br>
> Date: Wed, 7 Jun 2017 12:00:44 -0700<br>
> From: Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
> To: Discussion of the yt analysis package<br>
>         <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
> Subject: Re: [yt-users] selecting data by refinement level<br>
> Message-ID:<br>
>         <CAJXewO=gk4Fqrh_<wbr>fKxmgKVu9vgu53TVQd0P0-<wbr>Ra5wBBSPm-_Gg@mail.<br>
> <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> On Wed, Jun 7, 2017 at 11:56 AM, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>><br>
> wrote:<br>
><br>
> > Great!  As a quick note, you can use `.d` as shorthand for<br>
> > `to_ndarray()`.  The YTArray it returns is a subclass of ndarray, so<br>
> > should in general be usable in both ways; as you probably figured out,<br>
> > if you do any manipulation of individual elements it adds overhead and<br>
> > (often frustrating, but hopefully ultimately helpful), restrictions on<br>
> > combining incorrect units unless you look at it as a strict ndarray.<br>
> ><br>
><br>
> One tiny note:<br>
><br>
> YTArray.d is short for YTArray.ndarray_view(), which returns a view onto<br>
> the array. This doesn't copy the underlying data.<br>
><br>
> YTArray.to_ndarray() is equivalend to YTArray.value or YTArray.v, whcih<br>
> returns an ndarray containing a copy of the underlying array data. Getting<br>
> a copy sometimes adds overhead.<br>
><br>
> Choosing whether or now you want a copy comes down to what exactly you are<br>
> doing, since copying adds overhead, but it also prevents silently<br>
> overwriting data in an unexpected, nonlocal fashion.<br>
><br>
><br>
> ><br>
> > On Wed, Jun 7, 2017 at 1:53 PM, Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu">klaus@flash.uchicago.edu</a>><br>
> > wrote:<br>
> > > On Wed, 7 Jun 2017, Matthew Turk wrote:<br>
> > ><br>
> > >> Hi Klaus,<br>
> > >><br>
> > >> Whoops, I said "grid_collection" but I meant "data_collection".<br>
> > ><br>
> > > Thanks Matt. I have not tried the 'collection of grids' approach yet,<br>
> but<br>
> > > the following does what I want:<br>
> > ><br>
> > >         ds = yt.load(dump_path)<br>
> > ><br>
> > >         ad = ds.all_data()<br>
> > >         if fine_only:<br>
> > >             maxreflevel = ad.index.grid_levels.max()<br>
> > >             print '*** Filtering data so that only FLASH refinement<br>
> > level {} cells are used'.format(maxreflevel+1)<br>
> > >             ad.min_level = maxreflevel<br>
> > >             ad.max_level = maxreflevel<br>
> > >             print 'These cover a volume of %s' %<br>
> ad['cell_volume'].sum()<br>
> > >         # .....<br>
> > >         data = {}<br>
> > >         data['dens'] = ad['dens'].to_ndarray()<br>
> > >         # .....<br>
> > ><br>
> > ><br>
> > > Klaus<br>
> > > ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
> > ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
> ><br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>pipermail/yt-users-spacepope.<wbr>org</a><br>
> /attachments/20170607/<wbr>6450bc9f/attachment.html><br>
><br>
> ------------------------------<br>
><br>
> Message: 4<br>
> Date: Wed, 7 Jun 2017 14:45:52 -0500 (CDT)<br>
> From: Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu">klaus@flash.uchicago.edu</a>><br>
> To: Discussion of the yt analysis package<br>
>         <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
> Subject: Re: [yt-users] selecting data by refinement level<br>
> Message-ID: <<a href="mailto:Pine.LNX.4.64.1706071443510.1322@flash.uchicago.edu">Pine.LNX.4.64.1706071443510.<wbr>1322@flash.uchicago.edu</a>><br>
> Content-Type: TEXT/PLAIN; charset=US-ASCII<br>
><br>
> On Wed, 7 Jun 2017, Nathan Goldbaum wrote:<br>
> > On Wed, Jun 7, 2017 at 11:56 AM, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>><br>
> wrote:<br>
> ><br>
> > > Great!  As a quick note, you can use `.d` as shorthand for<br>
> > > `to_ndarray()`.<br>
><br>
> > One tiny note:<br>
> ><br>
> > YTArray.d is short for YTArray.ndarray_view(), which returns a view onto<br>
> > the array. This doesn't copy the underlying data.<br>
><br>
> Matt and Nathan,<br>
><br>
> Thanks for the additional info, I think it's very useful to know.<br>
><br>
> Klaus<br>
><br>
><br>
> ------------------------------<br>
><br>
> Subject: Digest Footer<br>
><br>
> ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
><br>
><br>
> ------------------------------<br>
><br>
> End of yt-users Digest, Vol 112, Issue 5<br>
> ******************************<wbr>**********<br>
><br>
<br>
<br>
<br>
--<br>
*SK2*<br>
<br>
*"**Claiming that something can move faster than light is a good<br>
conversation-stopper in physics. People edge away from you in cocktail<br>
parties; friends never return phone calls. You just don?t mess with Albert<br>
Einstein.**"*<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170609/f3381db8/attachment-0001.htm" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>pipermail/yt-users-spacepope.<wbr>org/attachments/20170609/<wbr>f3381db8/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 09 Jun 2017 14:10:49 +0000<br>
From: Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
To: Discussion of the yt analysis package<br>
        <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
Subject: Re: [yt-users] Normalized axis<br>
Message-ID:<br>
        <<a href="mailto:CAJXewOk5YFHL90v0dRwJZL5M5OzQypAh6iNabrUm-W7EJ0BaMg@mail.gmail.com">CAJXewOk5YFHL90v0dRwJZL5M5OzQ<wbr>ypAh6iNabrUm-W7EJ0BaMg@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Try to use plot.set_axes_unit("unitary").<br>
On Fri, Jun 9, 2017 at 9:08 AM Sushilkumar <<a href="mailto:sushil.sush19us@gmail.com">sushil.sush19us@gmail.com</a>><br>
wrote:<br>
<br>
> Dear yt<br>
><br>
> How do I label the axis of a plot in normalized values?<br>
><br>
> On my plot I want to label my x and y axis in terms of the vertical line.<br>
><br>
> Do I use convert_to_plot under streamlines?<br>
><br>
> Link to the plot and script is below<br>
><br>
> <a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank">https://drive.google.com/open?<wbr>id=<wbr>0B4g8shg4DL7oak5PLWVVdG5UMHc</a><br>
><br>
> Thanks in advance<br>
><br>
><br>
><br>
> On Thu, Jun 8, 2017 at 1:01 PM, <<a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.<wbr>spacepope.org</a>><br>
> wrote:<br>
><br>
>> Send yt-users mailing list submissions to<br>
>>         <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>><br>
>> To subscribe or unsubscribe via the World Wide Web, visit<br>
>>         <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
>> or, via email, send a message with subject or body 'help' to<br>
>>         <a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.<wbr>spacepope.org</a><br>
>><br>
>> You can reach the person managing the list at<br>
>>         <a href="mailto:yt-users-owner@lists.spacepope.org">yt-users-owner@lists.<wbr>spacepope.org</a><br>
>><br>
>> When replying, please edit your Subject line so it is more specific<br>
>> than "Re: Contents of yt-users digest..."<br>
>><br>
>><br>
>> Today's Topics:<br>
>><br>
>>    1. Re: selecting data by refinement level (Klaus Weide)<br>
>>    2. Re: selecting data by refinement level (Matthew Turk)<br>
>>    3. Re: selecting data by refinement level (Nathan Goldbaum)<br>
>>    4. Re: selecting data by refinement level (Klaus Weide)<br>
>><br>
>><br>
>> ------------------------------<wbr>------------------------------<wbr>----------<br>
>><br>
>> Message: 1<br>
>> Date: Wed, 7 Jun 2017 13:53:49 -0500 (CDT)<br>
>> From: Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu">klaus@flash.uchicago.edu</a>><br>
>> To: Discussion of the yt analysis package<br>
>>         <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
>> Subject: Re: [yt-users] selecting data by refinement level<br>
>> Message-ID: <<a href="mailto:Pine.LNX.4.64.1706071350010.1322@flash.uchicago.edu">Pine.LNX.4.64.1706071350010.<wbr>1322@flash.uchicago.edu</a>><br>
>> Content-Type: TEXT/PLAIN; charset=US-ASCII<br>
>><br>
>> On Wed, 7 Jun 2017, Matthew Turk wrote:<br>
>><br>
>> > Hi Klaus,<br>
>> ><br>
>> > Whoops, I said "grid_collection" but I meant "data_collection".<br>
>><br>
>> Thanks Matt. I have not tried the 'collection of grids' approach yet, but<br>
>> the following does what I want:<br>
>><br>
>>         ds = yt.load(dump_path)<br>
>><br>
>>         ad = ds.all_data()<br>
>>         if fine_only:<br>
>>             maxreflevel = ad.index.grid_levels.max()<br>
>>             print '*** Filtering data so that only FLASH refinement level<br>
>> {} cells are used'.format(maxreflevel+1)<br>
>>             ad.min_level = maxreflevel<br>
>>             ad.max_level = maxreflevel<br>
>>             print 'These cover a volume of %s' % ad['cell_volume'].sum()<br>
>>         # .....<br>
>>         data = {}<br>
>>         data['dens'] = ad['dens'].to_ndarray()<br>
>>         # .....<br>
>><br>
>><br>
>> Klaus<br>
>><br>
>><br>
>> ------------------------------<br>
>><br>
>> Message: 2<br>
>> Date: Wed, 7 Jun 2017 13:56:51 -0500<br>
>> From: Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>><br>
>> To: Discussion of the yt analysis package<br>
>>         <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
>> Subject: Re: [yt-users] selecting data by refinement level<br>
>> Message-ID:<br>
>>         <CALO3=<wbr>5HbBWfPj8hf5KEwMq1CiU932Q_u+=<br>
>> <a href="mailto:hHcBzYirQzGYCm3A@mail.gmail.com">hHcBzYirQzGYCm3A@mail.gmail.<wbr>com</a>><br>
>> Content-Type: text/plain; charset="UTF-8"<br>
>><br>
>> Great!  As a quick note, you can use `.d` as shorthand for<br>
>> `to_ndarray()`.  The YTArray it returns is a subclass of ndarray, so<br>
>> should in general be usable in both ways; as you probably figured out,<br>
>> if you do any manipulation of individual elements it adds overhead and<br>
>> (often frustrating, but hopefully ultimately helpful), restrictions on<br>
>> combining incorrect units unless you look at it as a strict ndarray.<br>
>><br>
>> On Wed, Jun 7, 2017 at 1:53 PM, Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu">klaus@flash.uchicago.edu</a>><br>
>> wrote:<br>
>> > On Wed, 7 Jun 2017, Matthew Turk wrote:<br>
>> ><br>
>> >> Hi Klaus,<br>
>> >><br>
>> >> Whoops, I said "grid_collection" but I meant "data_collection".<br>
>> ><br>
>> > Thanks Matt. I have not tried the 'collection of grids' approach yet,<br>
>> but<br>
>> > the following does what I want:<br>
>> ><br>
>> >         ds = yt.load(dump_path)<br>
>> ><br>
>> >         ad = ds.all_data()<br>
>> >         if fine_only:<br>
>> >             maxreflevel = ad.index.grid_levels.max()<br>
>> >             print '*** Filtering data so that only FLASH refinement<br>
>> level {} cells are used'.format(maxreflevel+1)<br>
>> >             ad.min_level = maxreflevel<br>
>> >             ad.max_level = maxreflevel<br>
>> >             print 'These cover a volume of %s' % ad['cell_volume'].sum()<br>
>> >         # .....<br>
>> >         data = {}<br>
>> >         data['dens'] = ad['dens'].to_ndarray()<br>
>> >         # .....<br>
>> ><br>
>> ><br>
>> > Klaus<br>
>> > ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
>><br>
>><br>
>> ------------------------------<br>
>><br>
>> Message: 3<br>
>> Date: Wed, 7 Jun 2017 12:00:44 -0700<br>
>> From: Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
>> To: Discussion of the yt analysis package<br>
>>         <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
>> Subject: Re: [yt-users] selecting data by refinement level<br>
>> Message-ID:<br>
>>         <CAJXewO=<br>
>> <a href="mailto:gk4Fqrh_fKxmgKVu9vgu53TVQd0P0-Ra5wBBSPm-_Gg@mail.gmail.com">gk4Fqrh_fKxmgKVu9vgu53TVQd0P0-<wbr>Ra5wBBSPm-_Gg@mail.gmail.com</a>><br>
>> Content-Type: text/plain; charset="utf-8"<br>
>><br>
>> On Wed, Jun 7, 2017 at 11:56 AM, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>><br>
>> wrote:<br>
>><br>
>> > Great!  As a quick note, you can use `.d` as shorthand for<br>
>> > `to_ndarray()`.  The YTArray it returns is a subclass of ndarray, so<br>
>> > should in general be usable in both ways; as you probably figured out,<br>
>> > if you do any manipulation of individual elements it adds overhead and<br>
>> > (often frustrating, but hopefully ultimately helpful), restrictions on<br>
>> > combining incorrect units unless you look at it as a strict ndarray.<br>
>> ><br>
>><br>
>> One tiny note:<br>
>><br>
>> YTArray.d is short for YTArray.ndarray_view(), which returns a view onto<br>
>> the array. This doesn't copy the underlying data.<br>
>><br>
>> YTArray.to_ndarray() is equivalend to YTArray.value or YTArray.v, whcih<br>
>> returns an ndarray containing a copy of the underlying array data. Getting<br>
>> a copy sometimes adds overhead.<br>
>><br>
>> Choosing whether or now you want a copy comes down to what exactly you are<br>
>> doing, since copying adds overhead, but it also prevents silently<br>
>> overwriting data in an unexpected, nonlocal fashion.<br>
>><br>
>><br>
>> ><br>
>> > On Wed, Jun 7, 2017 at 1:53 PM, Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu">klaus@flash.uchicago.edu</a>><br>
>> > wrote:<br>
>> > > On Wed, 7 Jun 2017, Matthew Turk wrote:<br>
>> > ><br>
>> > >> Hi Klaus,<br>
>> > >><br>
>> > >> Whoops, I said "grid_collection" but I meant "data_collection".<br>
>> > ><br>
>> > > Thanks Matt. I have not tried the 'collection of grids' approach yet,<br>
>> but<br>
>> > > the following does what I want:<br>
>> > ><br>
>> > >         ds = yt.load(dump_path)<br>
>> > ><br>
>> > >         ad = ds.all_data()<br>
>> > >         if fine_only:<br>
>> > >             maxreflevel = ad.index.grid_levels.max()<br>
>> > >             print '*** Filtering data so that only FLASH refinement<br>
>> > level {} cells are used'.format(maxreflevel+1)<br>
>> > >             ad.min_level = maxreflevel<br>
>> > >             ad.max_level = maxreflevel<br>
>> > >             print 'These cover a volume of %s' %<br>
>> ad['cell_volume'].sum()<br>
>> > >         # .....<br>
>> > >         data = {}<br>
>> > >         data['dens'] = ad['dens'].to_ndarray()<br>
>> > >         # .....<br>
>> > ><br>
>> > ><br>
>> > > Klaus<br>
>> > > ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
>> > ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
>> ><br>
>> -------------- next part --------------<br>
>> An HTML attachment was scrubbed...<br>
>> URL: <<br>
>> <a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170607/6450bc9f/attachment.html" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>pipermail/yt-users-spacepope.<wbr>org/attachments/20170607/<wbr>6450bc9f/attachment.html</a><br>
>> ><br>
>><br>
>> ------------------------------<br>
>><br>
>> Message: 4<br>
>> Date: Wed, 7 Jun 2017 14:45:52 -0500 (CDT)<br>
>> From: Klaus Weide <<a href="mailto:klaus@flash.uchicago.edu">klaus@flash.uchicago.edu</a>><br>
>> To: Discussion of the yt analysis package<br>
>>         <<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>><br>
>> Subject: Re: [yt-users] selecting data by refinement level<br>
>> Message-ID: <<a href="mailto:Pine.LNX.4.64.1706071443510.1322@flash.uchicago.edu">Pine.LNX.4.64.1706071443510.<wbr>1322@flash.uchicago.edu</a>><br>
>> Content-Type: TEXT/PLAIN; charset=US-ASCII<br>
>><br>
>> On Wed, 7 Jun 2017, Nathan Goldbaum wrote:<br>
>> > On Wed, Jun 7, 2017 at 11:56 AM, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>><br>
>> wrote:<br>
>> ><br>
>> > > Great!  As a quick note, you can use `.d` as shorthand for<br>
>> > > `to_ndarray()`.<br>
>><br>
>> > One tiny note:<br>
>> ><br>
>> > YTArray.d is short for YTArray.ndarray_view(), which returns a view onto<br>
>> > the array. This doesn't copy the underlying data.<br>
>><br>
>> Matt and Nathan,<br>
>><br>
>> Thanks for the additional info, I think it's very useful to know.<br>
>><br>
>> Klaus<br>
>><br>
>><br>
>> ------------------------------<br>
>><br>
>> Subject: Digest Footer<br>
>><br>
>> ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
>><br>
>><br>
>> ------------------------------<br>
>><br>
>> End of yt-users Digest, Vol 112, Issue 5<br>
>> ******************************<wbr>**********<br>
>><br>
><br>
><br>
><br>
> --<br>
> *SK2*<br>
><br>
> *"**Claiming that something can move faster than light is a good<br>
> conversation-stopper in physics. People edge away from you in cocktail<br>
> parties; friends never return phone calls. You just don?t mess with Albert<br>
> Einstein.**"*<br>
><br>
> ______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170609/f3281531/attachment.htm" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>pipermail/yt-users-spacepope.<wbr>org/attachments/20170609/<wbr>f3281531/attachment.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<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/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of yt-users Digest, Vol 112, Issue 6<br>
******************************<wbr>**********<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><span style="border-collapse:collapse"><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><i>SK<sup>2</sup></i></b></span></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><i><sup><br></sup></i></b></span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;border-collapse:collapse"><b><sup>"</sup></b></span><font color="#500050" face="arial, sans-serif"><b>Claiming that something can move faster than light is a good conversation-stopper in physics. People edge away from you in cocktail parties; friends never return phone calls. You just don’t mess with Albert Einstein.</b></font><b style="color:rgb(80,0,80);font-family:arial,sans-serif"><sup>"</sup></b></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><br></div></span></div>
</div></div>