[yt-users] Improve streamline plot

Sushilkumar sushil.sush19us at gmail.com
Wed Mar 23 17:45:36 PDT 2016


Dear yt:

How do I adjust the line width and color for streamline plots? Drive link
to streamline plot (streamlines_t000.png) and the script (yt_streamline.py)
is below.

I also checked the yt link below but it does not seem to have options for
line width and line color.

Thanks in advance




https://drive.google.com/open?id=0B4g8shg4DL7oak5PLWVVdG5UMHc


http://yt-project.org/doc/reference/api/generated/yt.visualization.streamlines.Streamlines.html#yt.visualization.streamlines.Streamlines








On Wed, Mar 23, 2016 at 12:52 PM, <yt-users-request at lists.spacepope.org>
wrote:

> Send yt-users mailing list submissions to
>         yt-users at 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 at lists.spacepope.org
>
> You can reach the person managing the list at
>         yt-users-owner at 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: yt3.3dev MPI puzzle (Stuart Levy)
>    2. smoothed particle velocities onto unigrid (Desika Narayanan)
>    3. covering_grid with RAMSES dataset (Enrico Garaldi)
>    4. Re: covering_grid with RAMSES dataset (Nathan Goldbaum)
>    5. Re: covering_grid with RAMSES dataset (Enrico Garaldi)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 22 Mar 2016 12:54:49 -0500
> From: Stuart Levy <salevy at illinois.edu>
> To: Discussion of the yt analysis package
>         <yt-users at lists.spacepope.org>
> Subject: Re: [yt-users] yt3.3dev MPI puzzle
> Message-ID: <56F186E9.2010506 at illinois.edu>
> Content-Type: text/plain; charset="windows-1252"
>
> Ooh, slick!   Thank you again!
>
> On 3/22/16 12:44 PM, Kacper Kowalik wrote:
> > cd $HOME
> > hg clone https://bitbucket.org/MatthewTurk/hgbb
> >
> > create or edit your $HOME/.hgrc to contain:
> >
> > [extensions]
> > hgbb = $HOME/hgbb/hgbb.py
> >
> > Then you'll be able to do the following in your local clone of yt repo:
> >
> > hg bbpr  # will give you list of PRs
> > hg bbpr -p 2066  # would download incoming changes and suggest rev
> >                  # to update to
> >
> > Cheers,
> > Kacper
>
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 842 bytes
> Desc: OpenPGP digital signature
> URL: <
> http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160322/38b76db2/attachment-0001.pgp
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 23 Mar 2016 11:04:28 -0400
> From: Desika Narayanan <desika.narayanan at gmail.com>
> To: yt-users <yt-users at lists.spacepope.org>
> Subject: [yt-users] smoothed particle velocities onto unigrid
> Message-ID:
>         <
> CAMMxB+MCMtJgT_YLg0iwQQHZC2E5Bhg-vBr9D7u7uKDuWjBZMQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hey All,
>
> I'm having some trouble smoothing particle velocities onto a uniform
> (arbitrary_grid) grid.  The basic idea is that I create an arbitrary grid,
> then want to access the particle quantities smoothed onto that grid.  Some
> are relatively easy, like:
>
> mass =  obj[('deposit','PartType0_mass')].in_units('Msun')
>
>
> and for others, where deposited fields don't already exist, I can create
> those fields and it all works well:
>
> ds.add_deposited_particle_field(('PartType0', 'Temperature'),'sum')
> temp = obj[('deposit', 'PartType0_sum_Temperature')]
>
> but when either trying to access a deposited particle field, or creating
> one with the velocities, errors are abound.  I'm sure I'm just doing
> something foolish, but could use a little nudge in the right direction.  I
> created a self-contained script using the gadget zoom data set on the yt
> datsets to show the problem, with two different error messages pastebinned
> (links in the script) here:
>
> http://paste.yt-project.org/show/6352/
>
> any help would be greatly appreciated!
>
> thanks,
> desika
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160323/a559293a/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 3
> Date: Wed, 23 Mar 2016 17:36:34 +0100
> From: "Enrico Garaldi" <egaraldi at uni-bonn.de>
> To: yt-users at lists.spacepope.org
> Subject: [yt-users] covering_grid with RAMSES dataset
> Message-ID: <ximss-98622 at be4.uni-bonn.de>
> Content-Type: text/plain; charset="utf-8"; format="flowed"
>
> Hi,
> I am having troubles using the smoothed_covering_grid and covering_grid
> with
> RAMSES dataset.
> I have yt-project version 3.2.3 and I am using the "output_00080" dataset
> from the yt sample datasets.
>
> smoothed_covering_grid fails (raising a RuntimeError because tot != 0, line
> 880 of construction_data_containers.pyc), while covering_grid seems to
> leave
> unfilled the refined regions. What I mean is that if a cell is refined
> beyond the maximum allowed level for the grid, it is left unfilled
> (contrary
> to what happens with ENZO datasets).
>
> I am using this code:
>
> import yt
> import matplotlib.pyplot as plt
>
> ds = yt.load('/users/egaraldi/Documents/output_00080/info_00080.txt')
>
> cgrid = ds.covering_grid(0, left_edge=ds.domain_left_edge,
> dims=ds.domain_dimensions)
>
> density_field = cgrid["density"]
>
> print (density_field == 0.0).any()  #should be False but it is True
>
> plt.imshow(density_field[:,:,48].v, interpolation='none')
> plt.show()  ? #holes with zero-density corresponding to refined regions
>
> Am I doing something wrong?
>
> Thanks in advance,
> Enrico
>
> -------------------------------------
> Enrico Garaldi - Ph.D. student
> Argelander-Institut f?r Astronomie
> Address: Auf dem H?gel 71, 53121 Bonn, Germany
> Room: 1.024
> Phone: +49 (0) 228 73 3433
> egaraldi[at]uni-bonn[dot]de
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 23 Mar 2016 09:47:16 -0700
> From: Nathan Goldbaum <nathan12343 at gmail.com>
> To: Discussion of the yt analysis package
>         <yt-users at lists.spacepope.org>
> Subject: Re: [yt-users] covering_grid with RAMSES dataset
> Message-ID:
>         <
> CAJXewOn3N_fJWBNQpXNVUtGg2s8tN_71wjmS3aL9yzqpNXVZ4A at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Enrico,
>
> I don't think you're doing anything wrong - this is a bug, likely a generic
> issue with the way covering grids get filled out for octree data.
>
> This issue with smoothed_covering_grid is likely another, different but
> related bug.
>
> Can you create an issue to track this?
>
> https://bitbucket.org/yt_analysis/yt/issues/new
>
> -Nathan
>
> On Wed, Mar 23, 2016 at 9:36 AM, Enrico Garaldi <egaraldi at uni-bonn.de>
> wrote:
>
> > Hi,
> > I am having troubles using the smoothed_covering_grid and covering_grid
> > with RAMSES dataset.
> > I have yt-project version 3.2.3 and I am using the "output_00080" dataset
> > from the yt sample datasets.
> >
> > smoothed_covering_grid fails (raising a RuntimeError because tot != 0,
> > line 880 of construction_data_containers.pyc), while covering_grid seems
> to
> > leave unfilled the refined regions. What I mean is that if a cell is
> > refined beyond the maximum allowed level for the grid, it is left
> unfilled
> > (contrary to what happens with ENZO datasets).
> >
> > I am using this code:
> >
> > import yt
> > import matplotlib.pyplot as plt
> >
> > ds = yt.load('/users/egaraldi/Documents/output_00080/info_00080.txt')
> >
> > cgrid = ds.covering_grid(0, left_edge=ds.domain_left_edge,
> > dims=ds.domain_dimensions)
> >
> > density_field = cgrid["density"]
> >
> > print (density_field == 0.0).any()  #should be False but it is True
> >
> > plt.imshow(density_field[:,:,48].v, interpolation='none')
> > plt.show()    #holes with zero-density corresponding to refined regions
> >
> > Am I doing something wrong?
> >
> > Thanks in advance,
> > Enrico
> >
> > -------------------------------------
> > Enrico Garaldi - Ph.D. student
> > Argelander-Institut f?r Astronomie
> > Address: Auf dem H?gel 71, 53121 Bonn, Germany
> > Room: 1.024
> > Phone: +49 (0) 228 73 3433
> > egaraldi[at]uni-bonn[dot]de
> > _______________________________________________
> > 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/20160323/60ae8756/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 5
> Date: Wed, 23 Mar 2016 18:24:07 +0100
> From: "Enrico Garaldi" <egaraldi at uni-bonn.de>
> To: "Discussion of the yt analysis package"
>         <yt-users at lists.spacepope.org>
> Subject: Re: [yt-users] covering_grid with RAMSES dataset
> Message-ID: <ximss-99088 at be4.uni-bonn.de>
> Content-Type: text/plain; charset="utf-8"; format="flowed"
>
> Hi Nathan,
> thanks for the feedback. I will create the issue right away.
>
> Enrico
>
> On Wed, 23 Mar 2016 09:47:16 -0700
>   Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> > Hi Enrico,
> >
> > I don't think you're doing anything wrong - this is a
> >bug, likely a generic
> > issue with the way covering grids get filled out for
> >octree data.
> >
> > This issue with smoothed_covering_grid is likely
> >another, different but
> > related bug.
> >
> > Can you create an issue to track this?
> >
> > https://bitbucket.org/yt_analysis/yt/issues/new
> >
> > -Nathan
> >
> > On Wed, Mar 23, 2016 at 9:36 AM, Enrico Garaldi
> ><egaraldi at uni-bonn.de>
> > wrote:
> >
> >> Hi,
> >> I am having troubles using the smoothed_covering_grid
> >>and covering_grid
> >> with RAMSES dataset.
> >> I have yt-project version 3.2.3 and I am using the
> >>"output_00080" dataset
> >> from the yt sample datasets.
> >>
> >> smoothed_covering_grid fails (raising a RuntimeError
> >>because tot != 0,
> >> line 880 of construction_data_containers.pyc), while
> >>covering_grid seems to
> >> leave unfilled the refined regions. What I mean is that
> >>if a cell is
> >> refined beyond the maximum allowed level for the grid,
> >>it is left unfilled
> >> (contrary to what happens with ENZO datasets).
> >>
> >> I am using this code:
> >>
> >> import yt
> >> import matplotlib.pyplot as plt
> >>
> >> ds =
> >>yt.load('/users/egaraldi/Documents/output_00080/info_00080.txt')
> >>
> >> cgrid = ds.covering_grid(0,
> >>left_edge=ds.domain_left_edge,
> >> dims=ds.domain_dimensions)
> >>
> >> density_field = cgrid["density"]
> >>
> >> print (density_field == 0.0).any()  #should be False but
> >>it is True
> >>
> >> plt.imshow(density_field[:,:,48].v,
> >>interpolation='none')
> >> plt.show()    #holes with zero-density corresponding to
> >>refined regions
> >>
> >> Am I doing something wrong?
> >>
> >> Thanks in advance,
> >> Enrico
> >>
> >> -------------------------------------
> >> Enrico Garaldi - Ph.D. student
> >> Argelander-Institut f?r Astronomie
> >> Address: Auf dem H?gel 71, 53121 Bonn, Germany
> >> Room: 1.024
> >> Phone: +49 (0) 228 73 3433
> >> egaraldi[at]uni-bonn[dot]de
> >> _______________________________________________
> >> yt-users mailing list
> >> yt-users at lists.spacepope.org
> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>
>
> -------------------------------------
> Enrico Garaldi - Ph.D. student
> Argelander-Institut f?r Astronomie
> Address: Auf dem H?gel 71, 53121 Bonn, Germany
> Room: 1.024
> Phone: +49 (0) 228 73 3433
> egaraldi[at]uni-bonn[dot]de
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
> ------------------------------
>
> End of yt-users Digest, Vol 97, Issue 27
> ****************************************
>



-- 
*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.**"*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160323/cf492adb/attachment.htm>


More information about the yt-users mailing list