<div dir="ltr"><div>Dear Suoqing Ji:<br><br></div>In your draft script what field does 'velocity_magnitude' refer to? I do not have a field that correspond to magnitude. <br><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 6:19 PM, <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/listinfo.cgi/yt-users-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.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.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: Camera/Off Axis Options (Suoqing Ji)<br>
2. Re: load structured mesh (Andrea Negri)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 2 May 2016 13:42:32 -0700<br>
From: Suoqing Ji <<a href="mailto:suoqing@physics.ucsb.edu">suoqing@physics.ucsb.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] Camera/Off Axis Options<br>
Message-ID: <<a href="mailto:820FD28B-2CB2-4131-AD64-0A07990F5055@physics.ucsb.edu">820FD28B-2CB2-4131-AD64-0A07990F5055@physics.ucsb.edu</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Sushil,<br>
<br>
What you can do currently is to get the data from fixed resolution buffer and make the plot with quiver callback in matplotlib. The following is a basic draft for this:<br>
<br>
L = [1, -1, 0]<br>
north_vector = [0, 0, 1]<br>
slc = yt.OffAxisSlicePlot(ds, L, 'cutting_plane_velocity_x', center=[0,0,0], width=(180,'km'), north_vector=north_vector)<br>
<br>
# Now get the fixed resolution buffer<br>
vel = slc._frb['velocity_magnitude?]<br>
U = slc._frb['cutting_plane_velocity_x']<br>
V = slc._frb['cutting_plane_velocity_y']<br>
<br>
extentx = [slc.xlim[i].in_units('km') for i in (0, 1)]<br>
extenty = [slc.ylim[i].in_units('km') for i in (0, 1)]<br>
extent = extentx + extenty<br>
<br>
x = np.linspace(extentx[0], extentx[1], vel.shape[0])<br>
y = np.linspace(extenty[1], extenty[0], vel.shape[1])<br>
<br>
X, Y = np.meshgrid(x, y)<br>
<br>
normalize = True<br>
if normalize is True:<br>
N = np.sqrt(U**2+V**2)<br>
U /= N<br>
V /= N<br>
<br>
norm = matplotlib.colors.LogNorm(vmin=vel.min(), vmax=vel.max())<br>
factor = 40<br>
<br>
plt.quiver(X[::factor, ::factor], Y[::factor, ::factor], U[::factor, ::factor], V[::factor, ::factor])<br>
plt.imshow(vel.d, extent=extent, norm=norm)<br>
plt.colorbar()<br>
plt.savefig('quiver_plot.png')<br>
<br>
Best wishes,<br>
--<br>
Suoqing JI<br>
Ph.D Candidate<br>
Department of Physics<br>
University of California, Santa Barbara<br>
<a href="http://web.physics.ucsb.edu/~suoqing" rel="noreferrer" target="_blank">http://web.physics.ucsb.edu/~suoqing</a><br>
<br>
> On Apr 30, 2016, at 4:04 PM, Sushilkumar <<a href="mailto:sushil.sush19us@gmail.com">sushil.sush19us@gmail.com</a>> wrote:<br>
><br>
> Dear Suoqing Ji:<br>
><br>
> Thanks. In the meanwhile can you suggest any alternate function/method in yt that I can use for my vector plots?<br>
><br>
> I also have a 3d (streamlines_t000.png) and 2d streamline plot (UniformGridData_Slice_y_field_x_t000.png), which needs to treated in the same way. Can you suggest any approach for these plots?<br>
><br>
> Drive link:<br>
> <a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a> <<a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a>><br>
><br>
><br>
> Thanks in advance<br>
><br>
><br>
><br>
> On Sat, Apr 30, 2016 at 12:56 PM, <<a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.spacepope.org</a> <mailto:<a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.spacepope.org</a>>> wrote:<br>
> Send yt-users mailing list submissions to<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a> <mailto:<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/listinfo.cgi/yt-users-spacepope.org</a> <<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-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.spacepope.org</a> <mailto:<a href="mailto:yt-users-request@lists.spacepope.org">yt-users-request@lists.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.spacepope.org</a> <mailto:<a href="mailto:yt-users-owner@lists.spacepope.org">yt-users-owner@lists.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: Camera/Off Axis Options (Suoqing Ji)<br>
><br>
><br>
> ----------------------------------------------------------------------<br>
><br>
> Message: 1<br>
> Date: Fri, 29 Apr 2016 12:35:04 -0700<br>
> From: Suoqing Ji <<a href="mailto:suoqing@physics.ucsb.edu">suoqing@physics.ucsb.edu</a> <mailto:<a href="mailto:suoqing@physics.ucsb.edu">suoqing@physics.ucsb.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> <mailto:<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>>><br>
> Subject: Re: [yt-users] Camera/Off Axis Options<br>
> Message-ID: <<a href="mailto:9D6F4AE6-F3EF-4A4B-A997-32ACA9688E78@physics.ucsb.edu">9D6F4AE6-F3EF-4A4B-A997-32ACA9688E78@physics.ucsb.edu</a> <mailto:<a href="mailto:9D6F4AE6-F3EF-4A4B-A997-32ACA9688E78@physics.ucsb.edu">9D6F4AE6-F3EF-4A4B-A997-32ACA9688E78@physics.ucsb.edu</a>>><br>
> Content-Type: text/plain; charset="us-ascii"<br>
><br>
> Hi Sushil,<br>
><br>
> I was able to reproduce your error and created an issue here: <a href="https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot</a> <<a href="https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot</a>> <<a href="https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot</a> <<a href="https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot</a>>><br>
><br>
> Best wishes,<br>
> --<br>
> Suoqing JI<br>
> Ph.D Candidate<br>
> Department of Physics<br>
> University of California, Santa Barbara<br>
> <a href="http://web.physics.ucsb.edu/~suoqing" rel="noreferrer" target="_blank">http://web.physics.ucsb.edu/~suoqing</a> <<a href="http://web.physics.ucsb.edu/~suoqing" rel="noreferrer" target="_blank">http://web.physics.ucsb.edu/~suoqing</a>><br>
><br>
> > On Apr 28, 2016, at 7:17 PM, Sushilkumar <<a href="mailto:sushil.sush19us@gmail.com">sushil.sush19us@gmail.com</a> <mailto:<a href="mailto:sushil.sush19us@gmail.com">sushil.sush19us@gmail.com</a>>> wrote:<br>
> ><br>
> > Dear Suoqing Ji:<br>
> ><br>
> > With a combination of center [0,0,0] and adjusting the width w, I was able to eliminate all the warnings mentioned earlier. But the off axis slice plots still wont give me a desired result.<br>
> ><br>
> > Plot available on the drive below below.<br>
> ><br>
> > The two plots L(010),N(0,0,1).png and L(101),N(001).png are plotted for x-z plane and viewing angle of 45 degrees but both are drastically different from each other. In fact the off axis slice plots (L(101),N(001).png) is not in the x-z plane either.<br>
> ><br>
> > I am aiming for a plot similar to vector_rotate.png which is same as vector_original.png but rotated/viewed at an angle.<br>
> ><br>
> > The vector_rotate.png was created using the python image library. I was hoping if yt has any similar options with off axis which would tilt the vector plots and fill all the vector grids (which cannot be done using PIL).<br>
> ><br>
> > The script (yt_velocity_fields.py) and sample data file (Expl_Bt101.mtx.tar.gz) is available on drive link for your reference.<br>
> ><br>
> > Thanks in advance and my sincere apologies for repeated queries. But this is extremely critical in reproducing my result and putting it for publication.<br>
> ><br>
> > <a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a> <<a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a>> <<a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a> <<a href="https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc" rel="noreferrer" target="_blank">https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc</a>>><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
><br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160429/cf49a1ce/attachment.html" rel="noreferrer" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160429/cf49a1ce/attachment.html</a> <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160429/cf49a1ce/attachment.html" rel="noreferrer" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160429/cf49a1ce/attachment.html</a>>><br>
><br>
> ------------------------------<br>
><br>
> Subject: Digest Footer<br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a> <mailto:<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/listinfo.cgi/yt-users-spacepope.org</a> <<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a>><br>
><br>
><br>
> ------------------------------<br>
><br>
> End of yt-users Digest, Vol 98, Issue 43<br>
> ****************************************<br>
><br>
><br>
><br>
> --<br>
> SK2<br>
><br>
> "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."<br>
><br>
> _______________________________________________<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/listinfo.cgi/yt-users-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/20160502/953460d9/attachment-0001.htm" rel="noreferrer" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160502/953460d9/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 3 May 2016 01:18:38 +0200<br>
From: Andrea Negri <<a href="mailto:negri.andre@gmail.com">negri.andre@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] load structured mesh<br>
Message-ID:<br>
<<a href="mailto:CAPUxaiR17QnvGze88Y61scioy20NwDx7Qfir2-cUqEwFZeOB7w@mail.gmail.com">CAPUxaiR17QnvGze88Y61scioy20NwDx7Qfir2-cUqEwFZeOB7w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
Dear John,<br>
<br>
thanks for the suggestions. Do you know if the grid data format is<br>
compatible with a non uniform mesh? I was thinking of porting my<br>
outputs in this format.<br>
<br>
<br>
Cheers,<br>
Andrea<br>
<br>
On 2 May 2016 at 18:52, John Zuhone <<a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a>> wrote:<br>
> Hi Andrea,<br>
><br>
> yt has some support for axisymmetric grids in 2D, so you won?t need to convert to a 3D array.<br>
><br>
> The bigger issue is the logarithmic grid spacing. This is currently being worked on, but is in a very early state. Currently what it does is use ?logr? as the coordinate instead of r, which may not be very ideal for every situation. A lot of yt functionality is probably not compatible with this way of doing things.<br>
><br>
> Nevertheless, if you would like to explore it further, let us know.<br>
><br>
> Best,<br>
><br>
> John Z<br>
><br>
>> On May 2, 2016, at 10:53 AM, Andrea Negri <<a href="mailto:negri.andre@gmail.com">negri.andre@gmail.com</a>> wrote:<br>
>><br>
>> Of course. I have a 2.5D simulation in spherical coordinates. It is<br>
>> axial symmetric, so the actual grid is 2D, r and theta. The grid is<br>
>> structured, the grid spacing in theta is constant, while the spacing<br>
>> in r follows a geometrical progression, i.e. dr[i+1] = dr[i] * factor,<br>
>> where factor is a constant.<br>
>><br>
>> I don't know if yt supports axisymmetric grids, but I can bypass this<br>
>> issue by duplicating the 2D array into a 3D one. Sure, it is not<br>
>> efficient...<br>
>><br>
>> My ultimate goal is to produce projections, off axis projections and<br>
>> mock X-ray observations.<br>
>><br>
>><br>
>> Thanks,<br>
>> Andrea<br>
>><br>
>> On 2 May 2016 at 16:43, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br>
>>> Can you share a little bit more detail about your grid structure? I know<br>
>>> that support for log-radial bins is being worked on right now, for example.<br>
>>><br>
>>> On Mon, May 2, 2016 at 3:18 AM, Andrea Negri <<a href="mailto:negri.andre@gmail.com">negri.andre@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi all,<br>
>>>><br>
>>>> I'm trying to read ZEUS-MP 2 data, and I'm building my programs step<br>
>>>> by step. I was able to load data regularly spaced in spherical<br>
>>>> coordinates. However, I actually have a non-uniform radial grid.<br>
>>>><br>
>>>> I tried with the script in attachment, but I have got odd errors...<br>
>>>><br>
>>>> Also, I have found this page, is it relevant for my case (just because<br>
>>>> my code is mentioned, the answer would be yes :) )?<br>
>>>> <a href="https://bitbucket.org/yt_analysis/grid_data_format" rel="noreferrer" target="_blank">https://bitbucket.org/yt_analysis/grid_data_format</a><br>
>>>><br>
>>>><br>
>>>> Thanks,<br>
>>>> Andrea<br>
>>>><br>
>>>> _______________________________________________<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/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>><br>
>>><br>
>>><br>
>>> _______________________________________________<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/listinfo.cgi/yt-users-spacepope.org</a><br>
>>><br>
>> _______________________________________________<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/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
> _______________________________________________<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/listinfo.cgi/yt-users-spacepope.org</a><br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<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/listinfo.cgi/yt-users-spacepope.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of yt-users Digest, Vol 99, Issue 3<br>
***************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="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 face="arial, sans-serif" color="#500050"><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></div>