[yt-users] phase plot and time series

Britton Smith brittonsmith at gmail.com
Sun Feb 28 09:19:51 PST 2016


Hi Mateusz,

Below is a reasonably simple way that someone might do something like
this.  This makes use of some newer functionality that currently only
exists in the development branch, so you would have to update to that to
use it.  This results in the following plot:
http://i.imgur.com/Qlgg6sV.png

To do this, I first made some profiles over a time-series of datasets with
the following script:
http://paste.yt-project.org/show/6278/

The last line is the new functionality, which saves all of the compiled
profile data in a way that it can be reloaded as a yt dataset.  You can see
more information about that here:
http://yt-project.org/docs/dev/analyzing/saving_data.html

Now, yt is awfully close to being able to plot this itself, but not quite
there yet, so I plotted this using matplotlib.  The plotting script is here:
http://paste.yt-project.org/show/6279/

At the top of that script, you can see how I get access to the data that
was saved by the first script.  All that needs to be done is to call
yt.load with the file that was created and the data fields are all
accessible with full unit support through ds.data.  So, for example,
ds.data["density"].

I hope this is helpful.

Britton

On Sat, Feb 27, 2016 at 2:44 AM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> While I think this is a really cool idea, I don't think this is possible
> within yt right now. Britton Smith might know a trick to do this though...
>
> On Fri, Feb 26, 2016 at 3:59 PM, Mateusz Ruszkowski <mateuszr at umich.edu>
> wrote:
>
>>
>>    Hi,
>>
>> Is there a simple way in yt to generate a "phase plot" of the gas
>> density, with time and radius on the axes, using a time series of data
>> files?
>>
>>    Thanks,
>>       Mateusz
>>
>>
>>
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160228/a579225e/attachment.htm>


More information about the yt-users mailing list