Hi SK,

I'm going to reference this example:

specifically this snippet:

for stream in streamlines.streamlines:
stream = stream[np.all(stream != 0.0, axis=1)]
ax.plot3D(stream[:,0], stream[:,1], stream[:,2], alpha=0.1)

Here, the 'stream' object is just a Nx3 numpy array, where N is the number of points sampled along the streamline. So each row of the numpy array is just the coordinates of the streamline along one direction.

To answer your question, no, there's nothing in yt that will rotate the streamlines into a new coordinate system. Fortunately you should be able to do it yourself using e.g. an Euler angle rotation matrix. You will need to identify the new coordinate system you would like to transform to, calculate a 3D rotation matrix, then apply it using matrix multiplication (e.g. np.dot, which supports broadcasting) to each coordinate along the streamline.

Hope that helps,

Nathan

On Thu, Mar 31, 2016 at 8:56 AM, Sushilkumar wrote:
Dear Matt:

Pleas correct me if I am wrong but "off axis slices" takes slices of the plot that is already plotted.

However, I would like to plot my data in a new coordinate frame (x`,y`,z`) which is inclined at an angle of say alpha from the default (x,y,z) frame.

Or I would like to plot my data in a rotated frame (x`,y`,z`), which is rotated at an angle of alpha from (x,y,z).

On Wed, Mar 30, 2016 at 5:01 PM, wrote:
Send yt-users mailing list submissions to
yt-users@lists.spacepope.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
or, via email, send a message with subject or body 'help' to
yt-users-request@lists.spacepope.org

You can reach the person managing the list at
yt-users-owner@lists.spacepope.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of yt-users digest..."

Today's Topics:

1. Re: load spherical polar coordinate data with mesh refinement
in HDF5 (Jiang, Yanfei)
2. Re: load spherical polar coordinate data with mesh refinement
in HDF5 (Matthew Turk)
3. Re: Inclination problem (Matthew Turk)
4. Re: load spherical polar coordinate data with mesh refinement
in HDF5 (Jonah Miller)

----------------------------------------------------------------------

Message: 1
Date: Wed, 30 Mar 2016 15:49:26 -0400
From: "Jiang, Yanfei" <yanfei.jiang@cfa.harvard.edu>
To: Discussion of the yt analysis package
<yt-users@lists.spacepope.org>
Subject: Re: [yt-users] load spherical polar coordinate data with mesh
refinement in HDF5
Message-ID:
<CANixPav-VmbXfhNvmA5wb5gj19mF+-Ryq5YD-LrYrByDe3Ne7A@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Jonah,

I am able to load the data to yt now using load_amr_grids(). I notice
that it can also set geometry to spherical. This is great. But to make life
more complicate. Is it possible to let yt know that the grid is
logarithmic? Currently, load_amr_grids() just take left and right edges of
each block. I guess yt assumes the grid is uniform between left and right
edges. Is it possible to provide arrays of coordinate values for each cell
in each block?

Thanks.

On Tue, Mar 29, 2016 at 6:58 PM, Jonah Miller <
jonah.maxwell.miller@gmail.com> wrote:

> Hi Yan-Feng,
>
> I haven't tried it, but I think there is functionality for this. You can
> use the load_amr_grids() function which can load amr data in Cartesian,
> spherical, or polar coordinates. Here's the documentation:
>
>
>
>
> Best,
> Jonah
>
> On Tue, Mar 29, 2016, 6:35 PM Jiang, Yanfei <yanfei.jiang@cfa.harvard.edu>
> wrote:
>
>> Hi,
>>          I have some data from a new version of Athena simulations. It is
>> in spherical polar coordinate with mesh refinement written in HDF5. The
>> data structure is similar to flash data but not the same. Does anyone have
>> suggestions to load such data to yt directly?
>>
>> Thank you.
>> --
>> Yan-Fei Jiang
>>
>> Einstein Fellow
>> Harvard-Smithsonian Center for Astrophysics
>> 60 Garden Street, Cambridge MA USA 02138
>> _______________________________________________
>> yt-users mailing list
>> yt-users@lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users@lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>

--
Yan-Fei Jiang

Einstein Fellow
Harvard-Smithsonian Center for Astrophysics
60 Garden Street, Cambridge MA USA 02138
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160330/aedc3b19/attachment-0001.htm>

------------------------------

Message: 2
Date: Wed, 30 Mar 2016 16:15:30 -0500
From: Matthew Turk <matthewturk@gmail.com>
To: Discussion of the yt analysis package
<yt-users@lists.spacepope.org>
Subject: Re: [yt-users] load spherical polar coordinate data with mesh
refinement in HDF5
Message-ID:
<CALO3=5F1-_9V5XHS4vF_eXvKoPerz3Zo20X8uPtcFjQSAQS1MA@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi Yanfei,

This is possible -- but it will also slow some things down.  You can
use the load_hexahedral_mesh function, and there're examples of this.
This takes away some of the optimizations that regular grids can do,
but we're hoping to add them back in shortly.  Like the other
functions it too takes a geometry argument.

-Matt

On Wed, Mar 30, 2016 at 2:49 PM, Jiang, Yanfei
<yanfei.jiang@cfa.harvard.edu> wrote:
> Hi Jonah,
>
>    I am able to load the data to yt now using load_amr_grids(). I notice
> that it can also set geometry to spherical. This is great. But to make life
> more complicate. Is it possible to let yt know that the grid is logarithmic?
> Currently, load_amr_grids() just take left and right edges of each block. I
> guess yt assumes the grid is uniform between left and right edges. Is it
> possible to provide arrays of coordinate values for each cell in each block?
>
> Thanks.
>
> On Tue, Mar 29, 2016 at 6:58 PM, Jonah Miller
> <jonah.maxwell.miller@gmail.com> wrote:
>>
>> Hi Yan-Feng,
>>
>> I haven't tried it, but I think there is functionality for this. You can
>> use the load_amr_grids() function which can load amr data in Cartesian,
>> spherical, or polar coordinates. Here's the documentation:
>>
>>
>>
>>
>>
>> Best,
>> Jonah
>>
>> On Tue, Mar 29, 2016, 6:35 PM Jiang, Yanfei <yanfei.jiang@cfa.harvard.edu>
>> wrote:
>>>
>>> Hi,
>>>          I have some data from a new version of Athena simulations. It is
>>> in spherical polar coordinate with mesh refinement written in HDF5. The data
>>> structure is similar to flash data but not the same. Does anyone have
>>> suggestions to load such data to yt directly?
>>>
>>> Thank you.
>>> --
>>> Yan-Fei Jiang
>>>
>>> Einstein Fellow
>>> Harvard-Smithsonian Center for Astrophysics
>>> 60 Garden Street, Cambridge MA USA 02138
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users@lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users@lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
>
>
> --
> Yan-Fei Jiang
>
> Einstein Fellow
> Harvard-Smithsonian Center for Astrophysics
> 60 Garden Street, Cambridge MA USA 02138
>
> _______________________________________________
> yt-users mailing list
> yt-users@lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>

------------------------------

Message: 3
Date: Wed, 30 Mar 2016 16:16:22 -0500
From: Matthew Turk <matthewturk@gmail.com>
To: Discussion of the yt analysis package
<yt-users@lists.spacepope.org>
Subject: Re: [yt-users] Inclination problem
Message-ID:
<CALO3=5HMB=joejr6BBh+zdxkwGzJS2NPrkK9tvMJnbch5-7BgQ@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi SK,

I'm not sure I totally understand, but if you have an inclination
angle you can use this directly in yt in the off axis slices and so
on.  They typically take a vector, but you should be able to convert
one to the other.

-Matt

On Tue, Mar 29, 2016 at 1:37 PM, Sushilkumar <sushil.sush19us@gmail.com> wrote:
> Dear yt:
>
> I am trying to numerically solve the region around a pulsar. Now since
> pulsar is an inclined rotator with inclination angle between rotation axis
> and dipole axis I would like to include in my yt script.
>
> My original code written in FORTRAN incorporated this inclination but how
> would I incorporate it into my visualization using yt without changing my
> data.
>
> Could you suggest ways for the same?
>
> The google drive link to my script (streamline.py) and streamline plot
> (streamline_t000.png) is included
>
>
> Thanks in advance
>
> On Tue, Mar 29, 2016 at 12:54 PM, <yt-users-request@lists.spacepope.org>
> wrote:
>>
>> Send yt-users mailing list submissions to
>>         yt-users@lists.spacepope.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> or, via email, send a message with subject or body 'help' to
>>         yt-users-request@lists.spacepope.org
>>
>> You can reach the person managing the list at
>>         yt-users-owner@lists.spacepope.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of yt-users digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: gadget onto unigrid (Carla Bernhardt)
>>    2. Re: gadget onto unigrid (Matthew Turk)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Tue, 29 Mar 2016 15:55:27 +0200
>> From: Carla Bernhardt <carla.j.bernhardt@gmail.com>
>> To: Discussion of the yt analysis package
>>         <yt-users@lists.spacepope.org>
>> Subject: Re: [yt-users] gadget onto unigrid
>> Message-ID:
>>
>> <CAFK0O=2vH24ViqeZ5QS3DY3uido0kEaF=UhyGS_beuiUMbw7Ag@mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hi All,
>>
>> A follow-up question: In using arbitrary_grid (but with enzo data), how
>> does one then extract a field of an arbitrary_grid? I tried
>> arbgrid["density"] as I have done with a smoothed_covering_grid object,
>> but
>> it does not work (here is the traceback <http://pastebin.com/afgcgpp0> I
>> got).
>>
>> Thanks,
>> Carla
>>
>> 2016-02-23 17:21 GMT+01:00 Matthew Turk <matthewturk@gmail.com>:
>>
>> > Hi Desika,
>> >
>> > Yup, this can be done reasonably easily using either the
>> > .arbitrary_grid object (which was designed for this) or the interface
>> > to the arbitrary grid that's in the development version, which is
>> > ds.r[ ... ] where the ... is some combination of bounds and steps.
>> >
>> > http://yt-project.org/docs/dev/analyzing/objects.html#arbitrary-grid
>> >
>> >
>> > http://yt-project.org/docs/dev/analyzing/objects.html#slicing-syntax-for-selecting-data
>> >
>> > On Tue, Feb 23, 2016 at 10:18 AM, Desika Narayanan
>> > <desika.narayanan@gmail.com> wrote:
>> > > Hi All,
>> > >
>> > > Is it possible to deposit the particles from a gadget data set onto a
>> > > uniform grid in yt?  Or, could it be possible to trick the octree
>> > deposition
>> > > into doing it by forcing no refinements, but some sort of native grid
>> > > resolution?
>> > >
>> > > thanks,
>> > > desika
>> > >
>> > >
>> > > _______________________________________________
>> > > yt-users mailing list
>> > > yt-users@lists.spacepope.org
>> > > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> > >
>> > _______________________________________________
>> > yt-users mailing list
>> > yt-users@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/20160329/e29a03a1/attachment.html>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Tue, 29 Mar 2016 08:57:08 -0500
>> From: Matthew Turk <matthewturk@gmail.com>
>> To: Discussion of the yt analysis package
>>         <yt-users@lists.spacepope.org>
>> Subject: Re: [yt-users] gadget onto unigrid
>> Message-ID:
>>
>> <CALO3=5HR=zLHujWKgLpqwei_98vBOjpYvQ4m8nnUFR=P098utA@mail.gmail.com>
>> Content-Type: text/plain; charset=UTF-8
>>
>> Hi Carla,
>>
>> This functionality was recently implemented and is in the development
>> version, but not yet in the stable.  We're hoping for a release very
>> shortly, but you can also try the dev version if you'd like!
>>
>> -Matt
>>
>> On Tue, Mar 29, 2016 at 8:55 AM, Carla Bernhardt
>> <carla.j.bernhardt@gmail.com> wrote:
>> > Hi All,
>> >
>> > A follow-up question: In using arbitrary_grid (but with enzo data), how
>> > does
>> > one then extract a field of an arbitrary_grid? I tried
>> > arbgrid["density"] as
>> > I have done with a smoothed_covering_grid object, but it does not work
>> > (here
>> > is the traceback I got).
>> >
>> > Thanks,
>> > Carla
>> >
>> > 2016-02-23 17:21 GMT+01:00 Matthew Turk <matthewturk@gmail.com>:
>> >>
>> >> Hi Desika,
>> >>
>> >> Yup, this can be done reasonably easily using either the
>> >> .arbitrary_grid object (which was designed for this) or the interface
>> >> to the arbitrary grid that's in the development version, which is
>> >> ds.r[ ... ] where the ... is some combination of bounds and steps.
>> >>
>> >> http://yt-project.org/docs/dev/analyzing/objects.html#arbitrary-grid
>> >>
>> >>
>> >> http://yt-project.org/docs/dev/analyzing/objects.html#slicing-syntax-for-selecting-data
>> >>
>> >> On Tue, Feb 23, 2016 at 10:18 AM, Desika Narayanan
>> >> <desika.narayanan@gmail.com> wrote:
>> >> > Hi All,
>> >> >
>> >> > Is it possible to deposit the particles from a gadget data set onto a
>> >> > uniform grid in yt?  Or, could it be possible to trick the octree
>> >> > deposition
>> >> > into doing it by forcing no refinements, but some sort of native grid
>> >> > resolution?
>> >> >
>> >> > thanks,
>> >> > desika
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > yt-users mailing list
>> >> > yt-users@lists.spacepope.org
>> >> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> >> >
>> >> _______________________________________________
>> >> yt-users mailing list
>> >> yt-users@lists.spacepope.org
>> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> >
>> >
>> >
>> > _______________________________________________
>> > yt-users mailing list
>> > yt-users@lists.spacepope.org
>> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> >
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users@lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>> ------------------------------
>>
>> End of yt-users Digest, Vol 97, Issue 34
>> ****************************************
>
>
>
>
> --
> SK2
>
> "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."
>
>
> _______________________________________________
> yt-users mailing list
> yt-users@lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>

------------------------------

Message: 4
Date: Wed, 30 Mar 2016 18:01:04 -0400
From: Jonah Miller <jonah.maxwell.miller@gmail.com>
To: yt-users@lists.spacepope.org
Subject: Re: [yt-users] load spherical polar coordinate data with mesh
refinement in HDF5
Message-ID: <56FC4CA0.4030403@gmail.com>
Content-Type: text/plain; charset=windows-1252; format=flowed

Hi Yanfei,

To add to Matt's comment. Here is the documentation for using

Best,
Jonah

On 16-03-30 05:15 PM, Matthew Turk wrote:
> Hi Yanfei,
>
> This is possible -- but it will also slow some things down.  You can
> use the load_hexahedral_mesh function, and there're examples of this.
> This takes away some of the optimizations that regular grids can do,
> but we're hoping to add them back in shortly.  Like the other
> functions it too takes a geometry argument.
>
> -Matt
>
> On Wed, Mar 30, 2016 at 2:49 PM, Jiang, Yanfei
> <yanfei.jiang@cfa.harvard.edu> wrote:
>> Hi Jonah,
>>
>>     I am able to load the data to yt now using load_amr_grids(). I notice
>> that it can also set geometry to spherical. This is great. But to make life
>> more complicate. Is it possible to let yt know that the grid is logarithmic?
>> Currently, load_amr_grids() just take left and right edges of each block. I
>> guess yt assumes the grid is uniform between left and right edges. Is it
>> possible to provide arrays of coordinate values for each cell in each block?
>>
>> Thanks.
>>
>> On Tue, Mar 29, 2016 at 6:58 PM, Jonah Miller
>> <jonah.maxwell.miller@gmail.com> wrote:
>>> Hi Yan-Feng,
>>>
>>> I haven't tried it, but I think there is functionality for this. You can
>>> use the load_amr_grids() function which can load amr data in Cartesian,
>>> spherical, or polar coordinates. Here's the documentation:
>>>
>>>
>>>
>>>
>>>
>>> Best,
>>> Jonah
>>>
>>> On Tue, Mar 29, 2016, 6:35 PM Jiang, Yanfei <yanfei.jiang@cfa.harvard.edu>
>>> wrote:
>>>> Hi,
>>>>           I have some data from a new version of Athena simulations. It is
>>>> in spherical polar coordinate with mesh refinement written in HDF5. The data
>>>> structure is similar to flash data but not the same. Does anyone have
>>>> suggestions to load such data to yt directly?
>>>>
>>>> Thank you.
>>>> --
>>>> Yan-Fei Jiang
>>>>
>>>> Einstein Fellow
>>>> Harvard-Smithsonian Center for Astrophysics
>>>> 60 Garden Street, Cambridge MA USA 02138
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users@lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users@lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>
>>
>> --
>> Yan-Fei Jiang
>>
>> Einstein Fellow
>> Harvard-Smithsonian Center for Astrophysics
>> 60 Garden Street, Cambridge MA USA 02138
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users@lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
> _______________________________________________
> yt-users mailing list
> yt-users@lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

------------------------------

Subject: Digest Footer

_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

------------------------------

End of yt-users Digest, Vol 97, Issue 37
****************************************

--
SK2

"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."

_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org