Dear Suoqing Ji:
I will implement this in my code and let you know. Thank you very much.
On Mon, May 2, 2016 at 6:19 PM,
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: Camera/Off Axis Options (Suoqing Ji) 2. Re: load structured mesh (Andrea Negri)
----------------------------------------------------------------------
Message: 1 Date: Mon, 2 May 2016 13:42:32 -0700 From: Suoqing Ji
To: Discussion of the yt analysis package Subject: Re: [yt-users] Camera/Off Axis Options Message-ID: <820FD28B-2CB2-4131-AD64-0A07990F5055@physics.ucsb.edu> Content-Type: text/plain; charset="utf-8" Hi Sushil,
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:
L = [1, -1, 0] north_vector = [0, 0, 1] slc = yt.OffAxisSlicePlot(ds, L, 'cutting_plane_velocity_x', center=[0,0,0], width=(180,'km'), north_vector=north_vector)
# Now get the fixed resolution buffer vel = slc._frb['velocity_magnitude?] U = slc._frb['cutting_plane_velocity_x'] V = slc._frb['cutting_plane_velocity_y']
extentx = [slc.xlim[i].in_units('km') for i in (0, 1)] extenty = [slc.ylim[i].in_units('km') for i in (0, 1)] extent = extentx + extenty
x = np.linspace(extentx[0], extentx[1], vel.shape[0]) y = np.linspace(extenty[1], extenty[0], vel.shape[1])
X, Y = np.meshgrid(x, y)
normalize = True if normalize is True: N = np.sqrt(U**2+V**2) U /= N V /= N
norm = matplotlib.colors.LogNorm(vmin=vel.min(), vmax=vel.max()) factor = 40
plt.quiver(X[::factor, ::factor], Y[::factor, ::factor], U[::factor, ::factor], V[::factor, ::factor]) plt.imshow(vel.d, extent=extent, norm=norm) plt.colorbar() plt.savefig('quiver_plot.png')
Best wishes, -- Suoqing JI Ph.D Candidate Department of Physics University of California, Santa Barbara http://web.physics.ucsb.edu/~suoqing
On Apr 30, 2016, at 4:04 PM, Sushilkumar
wrote: Dear Suoqing Ji:
Thanks. In the meanwhile can you suggest any alternate function/method in yt that I can use for my vector plots?
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?
Drive link: https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc < https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc>
Thanks in advance
On Sat, Apr 30, 2016 at 12:56 PM,
mailto: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 < 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: Camera/Off Axis Options (Suoqing Ji)
----------------------------------------------------------------------
Message: 1 Date: Fri, 29 Apr 2016 12:35:04 -0700 From: Suoqing Ji
> To: Discussion of the yt analysis package > Subject: Re: [yt-users] Camera/Off Axis Options Message-ID: <9D6F4AE6-F3EF-4A4B-A997-32ACA9688E78@physics.ucsb.edu mailto:9D6F4AE6-F3EF-4A4B-A997-32ACA9688E78@physics.ucsb.edu> Content-Type: text/plain; charset="us-ascii" Hi Sushil,
I was able to reproduce your error and created an issue here: https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-ax... < https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-axis-plot> < https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-ax... < https://bitbucket.org/yt_analysis/yt/issues/1214/vector-annotation-of-off-ax...
Best wishes, -- Suoqing JI Ph.D Candidate Department of Physics University of California, Santa Barbara http://web.physics.ucsb.edu/~suoqing < http://web.physics.ucsb.edu/~suoqing>
On Apr 28, 2016, at 7:17 PM, Sushilkumar
mailto:sushil.sush19us@gmail.com> wrote: Dear Suoqing Ji:
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.
Plot available on the drive below below.
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.
I am aiming for a plot similar to vector_rotate.png which is same as vector_original.png but rotated/viewed at an angle.
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).
The script (yt_velocity_fields.py) and sample data file (Expl_Bt101.mtx.tar.gz) is available on drive link for your reference.
Thanks in advance and my sincere apologies for repeated queries. But this is extremely critical in reproducing my result and putting it for publication.
https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc < https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc> < https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc < https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc>>
-------------- next part -------------- An HTML attachment was scrubbed... URL: < http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2016... < http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2016...
------------------------------
Subject: Digest Footer
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org mailto:yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org < http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org>
------------------------------
End of yt-users Digest, Vol 98, Issue 43 ****************************************
-- 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
-------------- next part -------------- An HTML attachment was scrubbed... URL: < http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2016...
------------------------------
Message: 2 Date: Tue, 3 May 2016 01:18:38 +0200 From: Andrea Negri
To: Discussion of the yt analysis package Subject: Re: [yt-users] load structured mesh Message-ID: < CAPUxaiR17QnvGze88Y61scioy20NwDx7Qfir2-cUqEwFZeOB7w@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Dear John,
thanks for the suggestions. Do you know if the grid data format is compatible with a non uniform mesh? I was thinking of porting my outputs in this format.
Cheers, Andrea
Hi Andrea,
yt has some support for axisymmetric grids in 2D, so you won?t need to convert to a 3D array.
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
On 2 May 2016 at 18:52, John Zuhone
wrote: this way of doing things. Nevertheless, if you would like to explore it further, let us know.
Best,
John Z
On May 2, 2016, at 10:53 AM, Andrea Negri
wrote:
Of course. I have a 2.5D simulation in spherical coordinates. It is axial symmetric, so the actual grid is 2D, r and theta. The grid is structured, the grid spacing in theta is constant, while the spacing in r follows a geometrical progression, i.e. dr[i+1] = dr[i] * factor, where factor is a constant.
I don't know if yt supports axisymmetric grids, but I can bypass this issue by duplicating the 2D array into a 3D one. Sure, it is not efficient...
My ultimate goal is to produce projections, off axis projections and mock X-ray observations.
Thanks, Andrea
On 2 May 2016 at 16:43, Nathan Goldbaum
wrote: Can you share a little bit more detail about your grid structure? I
know
that support for log-radial bins is being worked on right now, for example.
On Mon, May 2, 2016 at 3:18 AM, Andrea Negri
wrote: Hi all,
I'm trying to read ZEUS-MP 2 data, and I'm building my programs step by step. I was able to load data regularly spaced in spherical coordinates. However, I actually have a non-uniform radial grid.
I tried with the script in attachment, but I have got odd errors...
Also, I have found this page, is it relevant for my case (just because my code is mentioned, the answer would be yes :) )? https://bitbucket.org/yt_analysis/grid_data_format
Thanks, Andrea
_______________________________________________ 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
_______________________________________________ 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 99, Issue 3 ***************************************
-- *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.**"*
participants (1)
-
Sushilkumar