Hello everyone.
I was wondering if anyone has had experience with producing a profile plot
from a 2d projection object (FRB object).
Essentially, what I am trying to do is plot the stellar surface density of
a galaxy as a function of radius.
This is achieved by doing the following from a disk YT object called
cylinder (in which the origional simulation object is called shot)
center = cylinder.get_field_parameter("center")
normal = cylinder.get_field_parameter("normal")
image_width = (100,"kpc")
three_image_width = YTArray((image_width[0], image_width[0],
image_width[0]),image_width[1])
left = center - image_width
right = center + image_width
region = shot.region(center, left, right)
proj =
yt.ProjectionPlot(cylinder.ds,"z",[("deposit","stars_density")],center=center,width=image_width,data_source=region,axes_unit="kpc")
the error arrises here
prof =
yt.create_profile(proj,bin_fields="cylindrical_r",fields=[("deposit","stars_density")],n_bins=128,weight_field=None
)
where I get the error
/gpfs/home/........./profiles.pyc in create_profile(data_source,
bin_fields, fields, n_bins, extrema, logs, units, weight_field,
accumulation, fractional)
1304 else:
1305 raise NotImplementedError
-> 1306 bin_fields = data_source._determine_fields(bin_fields)
1307 fields = data_source._determine_fields(fields)
1308 if units is not None:
AttributeError: 'FixedResolutionBuffer' object has no attribute
'_determine_fields'
Any ideas how to get around this error?
Also some other things to add as a postscript. Since how the projection
works, if I provide weights=None as a keyword argument within the
ProjectionPlot object, I get a surface density (g/cm^2). But also a
"cylindrical_r" in cm^2 as well. I *think* the way to get around this is to
do another projection where weights="ones", get the radius values out of
that profile.. and then in matplotlib, useing the surface density array
from the former profile, and the radius bin array from the latter...
Produce a plot of the surface density as a function of radius from those
two arrays (I might check by hand afterwards to see if this does the
trick). This seems kinda convoluted so I am wondering if there is an easier
way than this.
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Dear yt-users,
I am having a little problem on finding the exact center of a halo. I used
to do
"hc = HaloCatalog(data_ds=data_ds, finder_method='hop')"
to create a halo catalog. But I think the position in the catalog is a
little bit off the exact center judging from the plots I made. I need the
exact center to compute the angular momentum so the off-center result could
cause some problem. I tried to recenter at the maximum gas density by
adding this line
"hc.sphere_field_max_recenter('density')"
But I got an error, AttributeError: 'HaloCatalog' object has no attribute
'sphere_field_max_recenter'.
Can anyone tell me what is the right way to find the center as the location
of maximum gas density?
Thanks,
Jingjing
--
Jingjing Chen [ chenjj235(a)gmail.com ]
Department of Astronomy
Columbia University
550 West 120th Street
New York, New York 10027
Cell Phone: +1(347)5746709
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Stuart,
On Mon, Mar 30, 2015 at 3:59 PM, Stuart Levy <salevy(a)illinois.edu> wrote:
> I'm trying to use the notebook interface to render, view image result, tweak
> parameters, etc. within a single yt session.
>
> I want to disable auto-brightness-scaling of images, so am calling
>
> ImageArray.write_png()
>
> Although write_png() takes a rescale= parameter, it effectively always
> rescales.
> It passes its array to write_bitmap(), which does rescaling unless the image
> datatype is already numpy.uint8.
You're right. It does look like write_bitmap accepts a max_val, which
will be used in lieu of computing the max, before converting to uint8.
Would that work for your purposes?
>
> But if you try to do that yourself, then write_png() crashes inside
> matplotlib, because write_bitmap "must be an rgba buffer". It's using a
> Python C-level routine to do this check, but I think the problem is that the
> array is not C-contiguous,
> since write_bitmap() has called swapaxes(0,1) on it and not copy()ied it
> afterward.
>
> Demo program at:
>
> http://paste.yt-project.org/show/5502/
>
>
>
> and here:
>
> import yt
> from yt.data_objects.image_array import ImageArray
> import numpy
>
> # 3x4x4 array, ranging from 0 to about 0.5
> v = (numpy.arange(12)/24.) .reshape(3,4,1) * numpy.ones((1,1,4))
> # Write
> ImageArray(v).write_png('grays_rescaled.png', rescale=True)
> # Write, but asking not to rescale. It rescales anyway since
> yt.data_objects.image_array() calls write_bitmap()
> ImageArray(v).write_png('grays_unscaled.png', rescale=False)
>
> # write_bitmap rescales internally unless the image's datatype is exactly
> "numpy.uint8".
> # Let's try doing that ourselves.
> vv = (v*255).astype(numpy.uint8)
> print vv.flags
> ImageArray(vv).write_png('grays8.png', background=None, rescale=False)
>
> # Crashes! inside matplotlib/src/_png.cpp.
>
> # Why? yt/visualization/image_writer.py's write_bitmap(), if it doesn't
> rescale the image,
> # simply calls swapaxes(0,1) on it and passes the result to matplotlib.
> # But the resulting array is no longer C-contiguous (write_bitmap.flags
> shows False).
>
> # When rescaling *does* happen, write_bitmap() is constructed by
> np.concatenate() which makes a new contiguous array.
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users(a)lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi All,
I'm trying to understand some of the stellar ages that the Tipsy example
data (the isolated galaxy) at:
http://yt-project.org/data/
When I examine the formation time with the super-simple script:
http://paste.yt-project.org/show/5501/
I get:
max star age: 100.000499852 Gyr
I thought normally the formation time was the current simulation time minus
the stellar age for Tipsy outputs - am I interpreting this wrongly?
Thanks,
desika
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi all,
I am just getting started with using yt and using it for analyzing output
data from RAMSES. When I loaded the info_ .txt file into yt and try to
print the field list if returns a runtime error. I also get the same run
time error if I try making projection plots. The same error shows up if I
tried loading the second output. However, if I tried loading in a 3d blast
wave example, this error does not show up and I am able to make slices and
projection plots. Is there a reason why I am seeing this runtime error for
the 2d case?
I am using yt 3.2 (Changeset d4ca808275e4 stable) The code
<http://paste.yt-project.org/show/5497/> and the error output
<http://paste.yt-project.org/show/5498/> is uploaded on the yt pastebin.
The RAMSES output that I'm working with are here
<https://www.dropbox.com/sh/jo7kxwoxio52vy1/AAASbcxNLJ2xZAP5Pry894IPa?dl=0>.
Thank you.
Doris
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hello everyone,
I just ran into an error in using "data_source" kwarg with the SlicePlot
function (error message copied below):
slice = yt.SlicePlot(ds, axis, field, data_source=region)
File
"/home/emerick/.local/lib/python2.7/site-packages/yt-3.1dev-py2.7-linux-x86_64.egg/yt/visualization/plot_window.py",
line 1816, in SlicePlot
return AxisAlignedSlicePlot(ds, normal, fields, *args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'data_source'
I have no problem doing the above with ProjectionPlot. If anyone knows what
could be causing this I'd appreciate the help. Otherwise I can do some
digging into the code myself.
Thanks,
Andrew E.
--
Graduate Student
Columbia University
Department of Astronomy
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi everyone,
I've been working here and there on making the two point functions
compatible with yt 3. I've run into an issue with the file i/o that's got
me puzzled.
There's a call to write_on_root() that's failing with the error
*AttributeError: 'builtin_function_or_method' object has no attribute
'StringIO'*
Looking at the definition for write_on_root()
in parallel_analysis_interface.py, I see that the offending line is:
*return cStringIO.StringIO()*
So apparently there's no function called StringIO(), even though the
documentation for cStringIO says there should be.
I think the issue is how cStringIO is being imported:
*from yt.extern.six.moves import cStringIO*
Looking through yt/extern/six.py, it looks like it's modifying how the
modules are imported, or something like that, but I can't really figure out
what's going on in that file.
Does anyone have any thoughts on this?
Thanks,
Daniel
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi all,
> If you grep the source for KDTree, you should find a couple examples of its
> use. It may be a bit slower than the fortran kdtree, but it is at least
> readily available.
(Chiming in from the great beyond)
Britton makes a good suggestion, but I think that people should be
aware of two things:
- cKDTree will be much faster than KDTree. The latter is pure-python
- Looking at the source below, it looks like I never added periodicity
to KDTree operations
https://bitbucket.org/yt_analysis/yt/src/tip/yt/utilities/spatial/?at=yt
It wouldn't be difficult to add periodicity to KDTree, but I just didn't do it.
--
Stephen Skory
s(a)skory.us
http://stephenskory.com/
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Suoqing,
Thanks, that worked.
Sandy
On Tue, Mar 24, 2015 at 4:10 PM, <yt-users-request(a)lists.spacepope.org>
wrote:
> Send yt-users mailing list submissions to
> yt-users(a)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(a)lists.spacepope.org
>
> You can reach the person managing the list at
> yt-users-owner(a)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: Line-of-sight velocity dispersion? (Suoqing JI)
> 2. Periodic enzo volume? (Kalina Borkiewicz)
> 3. Re: Particle Size in Projection Plots (Yuan Li)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 24 Mar 2015 12:30:32 -0700
> From: Suoqing JI <suoqing(a)physics.ucsb.edu>
> To: Discussion of the yt analysis package
> <yt-users(a)lists.spacepope.org>
> Subject: Re: [yt-users] Line-of-sight velocity dispersion?
> Message-ID: <67698C33-B4FE-4E93-B9FD-01ABB2D755CC(a)physics.ucsb.edu>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Sandy,
>
> The easiest way occurring to me is, since the standard deviation can be
> expressed as:
>
> sqrt( E(X^2) - E(X)^2 )
>
> so you could defined the ?z-velocity squared? as a new field, and
> calculate its average for each column (that is E(X^2) ). Then you have both
> E(X)^2 and E(X^2), thus the standard deviation can be computed.
>
> Best wishes,
> --
> Suoqing JI
> Ph.D Student
> Department of Physics
> University of California, Santa Barbara
> http://web.physics.ucsb.edu/~suoqing
>
> > On Mar 24, 2015, at 12:04 PM, Sandy Yuan <sihany(a)princeton.edu> wrote:
> >
> > Hi all,
> > I have created a box object containing the data field "z-velocity".
> Right now, I can project "z-velocity" along the z axis to get the average
> "z-velocity" for each column, but is there a way to calculate the standard
> deviation of "z-velocity" along each column as well? What is the best way
> to do this in yt 2.6? Any suggestion would be greatly appreciated.
> > Best,
> > --
> > Sandy
> > _______________________________________________
> > yt-users mailing list
> > yt-users(a)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/2...
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 24 Mar 2015 14:56:02 -0500
> From: Kalina Borkiewicz <kalina(a)illinois.edu>
> To: <yt-users(a)lists.spacepope.org>
> Subject: [yt-users] Periodic enzo volume?
> Message-ID: <5511C152.3070205(a)illinois.edu>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hi! Yt newbie here, sorry if my question is stupid or simple or both.
> I'm trying to render a periodic enzo volume. I figured I could just set
> ds.periodicity = (True, True True) , but that didn't seem to do anything.
> Searching the docs for "periodicity" doesn't have any results relating
> to EnzoDataset, so I'm wondering, can I make this periodic? How?
>
> Thanks,
> Kalina
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2...
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 24 Mar 2015 16:10:05 -0400
> From: Yuan Li <bear0980(a)gmail.com>
> To: Discussion of the yt analysis package
> <yt-users(a)lists.spacepope.org>
> Subject: Re: [yt-users] Particle Size in Projection Plots
> Message-ID:
> <CANx7jWiGbzZ=
> P9euh9HGa-pw-H4hzosp00N3HfeWgubtzf8icw(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Cameron,
>
> I tired that, and this is the error message I get:
>
> *** YTDataSelectorNotImplemented: Data selector 'arbitrary_grid' not
> implemented.
>
>
> I looks like I will have to do it with matplotlib as Britton suggested
> after all :).
>
>
> By the way, in the examples given on Filtering Particle Fields here
> http://yt-project.org/doc/analyzing/filtering.html, sometimes "Stars" is
> used
> and sometimes it is the lowercase "stars". Is that a typo?
>
>
> Yuan
>
>
> On Tue, Mar 24, 2015 at 12:26 PM, Cameron Hummels <chummels(a)gmail.com>
> wrote:
>
> > I think you may be able to do the ProjectionPlot() by specifying the
> > keyword "data_source=obj":
> >
> >
> >
> http://yt-project.org/docs/dev/reference/api/generated/yt.visualization.p...
> >
> > On Tue, Mar 24, 2015 at 9:03 AM, Yuan Li <bear0980(a)gmail.com> wrote:
> >
> >> Hi all,
> >>
> >> I was thinking about doing what Britton suggested or making a 2d
> >> histogram in matplotlib, but Cameron's suggestion sounds like what I was
> >> looking for. How do I project this obj after it is created? When I
> tried to
> >> do yt.ProjectionPlot(obj.....) I got the error message saying this
> object
> >> has no attribute 'coordinates'.
> >>
> >> Yuan
> >>
> >> On Tue, Mar 24, 2015 at 11:03 AM, Britton Smith <brittonsmith(a)gmail.com
> >
> >> wrote:
> >>
> >>> In this situation, you might just want to plot the particles themselves
> >>> using a scatter plot in matplotlib. The matplotlib.scatter function
> allows
> >>> you to specify both the color and/or size of the points with arrays, so
> >>> those properties can vary for the individual particles.
> >>>
> >>> Britton
> >>>
> >>> On Tue, Mar 24, 2015 at 2:58 PM, Cameron Hummels <chummels(a)gmail.com>
> >>> wrote:
> >>>
> >>>> Hi Yuan,
> >>>>
> >>>> I think the issue here is that you're taking a particle
> >>>> quantity--stellar ages--and trying to deposit that quantity on to the
> grid,
> >>>> which is primarily defined in enzo by the distribution of gas. Thus,
> young
> >>>> stars tend to occur in locations of star formation, which is to say,
> where
> >>>> there is cold dense gas, the grid is more refined there (assuming
> you're
> >>>> using density-based AMR). This means that you'll tend to get smaller
> >>>> "pixels" for young stars than for old stars where the stars may have
> >>>> drifted into regions of coarser spatial resolution and get larger
> "pixels".
> >>>>
> >>>> One solution for this would be to define your own underlying grid on
> to
> >>>> which you should deposit your particle quantities. That way you can
> make a
> >>>> fixed resolution grid (so all the pixels are the same size) and
> deposit
> >>>> your particle quantities like Stellar Age, and it should solve your
> >>>> problem. To find out more about doing this, check out this section
> of the
> >>>> docs:
> >>>>
> >>>>
> >>>>
> http://yt-project.org/docs/dev/analyzing/objects.html#arbitrary-grids-obj...
> >>>>
> >>>> Good luck, and let us know how it goes!
> >>>>
> >>>> Cameron
> >>>>
> >>>> On Sun, Mar 22, 2015 at 9:40 PM, Yuan Li <yuan(a)astro.columbia.edu>
> >>>> wrote:
> >>>>
> >>>>> Hi all,
> >>>>>
> >>>>> I have a basic question related to the sizes of particles in a
> >>>>> projection plot (in yt2). I am trying to make a plot that shows the
> average
> >>>>> line of sight star particle ages.
> >>>>>
> >>>>> Right now I am plotting the stellar-density-weighted star ages, and a
> >>>>> lot of the young stars look very small (see figure attached). I
> would like
> >>>>> to show that the stars far away from the center are younger. Is
> there a way
> >>>>> to make the small dots bigger? Other suggestions are also welcome!
> >>>>>
> >>>>>
> >>>>> Thank you!
> >>>>> Yuan
> >>>>> [image: Inline image 1]
> >>>>>
> >>>>> _______________________________________________
> >>>>> yt-users mailing list
> >>>>> yt-users(a)lists.spacepope.org
> >>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Cameron Hummels
> >>>> Postdoctoral Researcher
> >>>> Steward Observatory
> >>>> University of Arizona
> >>>> http://chummels.org
> >>>>
> >>>> _______________________________________________
> >>>> yt-users mailing list
> >>>> yt-users(a)lists.spacepope.org
> >>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>>
> >>>>
> >>>
> >>> _______________________________________________
> >>> yt-users mailing list
> >>> yt-users(a)lists.spacepope.org
> >>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>
> >>>
> >>
> >> _______________________________________________
> >> yt-users mailing list
> >> yt-users(a)lists.spacepope.org
> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>
> >>
> >
> >
> > --
> > Cameron Hummels
> > Postdoctoral Researcher
> > Steward Observatory
> > University of Arizona
> > http://chummels.org
> >
> > _______________________________________________
> > yt-users mailing list
> > yt-users(a)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/2...
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: stest_0063_Projection_x_StarAgeYears_young_star_density.png
> Type: image/png
> Size: 27500 bytes
> Desc: not available
> URL: <
> http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2...
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> yt-users mailing list
> yt-users(a)lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
> ------------------------------
>
> End of yt-users Digest, Vol 85, Issue 77
> ****************************************
>
--
Sandy
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi,
Thank you both. Nathan, is there a way to change the resolution of the
frb using your approach?
Thanks again,
Sandy
On Mon, Mar 16, 2015 at 10:21 AM, <yt-users-request(a)lists.spacepope.org>
wrote:
> Send yt-users mailing list submissions to
> yt-users(a)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(a)lists.spacepope.org
>
> You can reach the person managing the list at
> yt-users-owner(a)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: What's the best way to project volume density to surface
> density? (Suoqing JI)
> 2. Re: What's the best way to project volume density to surface
> density? (Nathan Goldbaum)
> 3. Re: twinkle while rotate during volume rendering (Michael Zingale)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 15 Mar 2015 19:43:18 -0700
> From: Suoqing JI <suoqing(a)physics.ucsb.edu>
> To: Discussion of the yt analysis package
> <yt-users(a)lists.spacepope.org>
> Subject: Re: [yt-users] What's the best way to project volume density
> to surface density?
> Message-ID: <F495764F-5CA0-4E90-B98B-29D02176F900(a)physics.ucsb.edu>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Sandy,
>
> I think you mean by this:
> http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.da...
> <
> http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.da...
> >
>
> where frb[?Density?] is just the data you want.
>
> Best wishes,
> --
> Suoqing JI
> Ph.D Student
> Department of Physics
> University of California, Santa Barbara
> http://web.physics.ucsb.edu/~suoqing
>
> > On Mar 15, 2015, at 7:07 PM, Sandy Yuan <sihany(a)princeton.edu> wrote:
> >
> > Hi all,
> > I have created a box object centered on a galaxy in an enzo
> cosmological simulation. What is the best way to project the volume density
> field of the object along the x,y,z axes to obtain the surface densities in
> yt 2.6? I can visualize the projection by using ProjectionPlot, but I don't
> know how to get the actual surface density data in this way. There is also
> the proj command, but I am not sure how to use it. Any help would be
> greatly appreciated.
> > Thanks a lot in advance,
> > --
> > Sandy
> > _______________________________________________
> > yt-users mailing list
> > yt-users(a)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/2...
> >
>
> ------------------------------
>
> Message: 2
> Date: Sun, 15 Mar 2015 20:08:26 -0700
> From: Nathan Goldbaum <nathan12343(a)gmail.com>
> To: Discussion of the yt analysis package
> <yt-users(a)lists.spacepope.org>
> Subject: Re: [yt-users] What's the best way to project volume density
> to surface density?
> Message-ID:
> <
> CAJXewOn1ghu0-pyzgW9-Y8ZOKjzeUAgJcYVsQygWJAPhjuGuDg(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Alternatively, if you already have a ProjectionPlot, you can get its
> associated FRB object like so:
>
> plot = ProjectionPlot(...)
>
> frb = plot._frb
>
> dens_image = frb['density']
>
> You can also access the frb via plot.frb in yt 3.0 or newer.
>
> To use suoqing's method you will need to create a custom projection data
> object. This is the "proj" function you were confused about.
>
> I'd encourage you to look at these pages in th docs to learn more about
> data objects and how to use them:
>
> http://yt-project.org/docs/3.1/analyzing/objects.html
>
> Note these are the docs for yt 3.1 but the concepts are the same for 2.6,
> just somewhat different syntax.
>
> On Sunday, March 15, 2015, Suoqing JI <suoqing(a)physics.ucsb.edu> wrote:
>
> > Hi Sandy,
> >
> > I think you mean by this:
> >
> http://yt-project.org/docs/2.6/reference/api/generated/yt.data_objects.da...
> >
> > where frb[?Density?] is just the data you want.
> >
> > Best wishes,
> > --
> > Suoqing JI
> > Ph.D Student
> > Department of Physics
> > University of California, Santa Barbara
> > http://web.physics.ucsb.edu/~suoqing
> >
> > On Mar 15, 2015, at 7:07 PM, Sandy Yuan <sihany(a)princeton.edu
> > <javascript:_e(%7B%7D,'cvml','sihany(a)princeton.edu');>> wrote:
> >
> > Hi all,
> > I have created a box object centered on a galaxy in an enzo
> cosmological
> > simulation. What is the best way to project the volume density field of
> the
> > object along the x,y,z axes to obtain the surface densities in yt 2.6? I
> > can visualize the projection by using ProjectionPlot, but I don't know
> how
> > to get the actual surface density data in this way. There is also the
> proj
> > command, but I am not sure how to use it. Any help would be greatly
> > appreciated.
> > Thanks a lot in advance,
> > --
> > Sandy
> > _______________________________________________
> > yt-users mailing list
> > yt-users(a)lists.spacepope.org
> > <javascript:_e(%7B%7D,'cvml','yt-users(a)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/2...
> >
>
> ------------------------------
>
> Message: 3
> Date: Mon, 16 Mar 2015 10:21:22 -0400
> From: Michael Zingale <michael.zingale(a)stonybrook.edu>
> To: Discussion of the yt analysis package
> <yt-users(a)lists.spacepope.org>
> Subject: Re: [yt-users] twinkle while rotate during volume rendering
> Message-ID:
> <
> CAGO1_wr9hx_Fejqk6Wk6qR2osM9LDKe13ewUeChJn80HYUxUFg(a)mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> My thought was that clip_ratio operates on each render independently, so it
> will adjust the scale of one frame of your movie without knowing about the
> other frames. Instead, you want a constant normalization throughout the
> entire sequence. This may mean computing the normalization once and then
> manually normalizing each frame by the same amount. That's the approach I
> usually do.
>
> On Sun, Mar 15, 2015 at 9:13 PM, Yuxiang Qin <
> yuxiangq(a)student.unimelb.edu.au> wrote:
>
> > Hi Matthew,
> >
> > I think I misunderstood you and Michael. Are you saying clip_ratio limits
> > the data according to std()? If so, what?s the difference between using
> > clip_ratio and restricting data by std() manually? Btw, I actually used
> > clip_ratio every time when I rotate the camera.
> >
> > Cheers,
> > Yuxiang
> >
> > On 13 Mar 2015, at 10:43, Matthew Turk <matthewturk(a)gmail.com> wrote:
> >
> > I think that's a likely possibility! I do the same. This can be mitigated
> > by supplying a clip ratio because that is with respect to the std(), not
> > max(), which is often slower varying.
> >
> > On Thu, Mar 12, 2015, 6:40 PM Michael Zingale <
> > michael.zingale(a)stonybrook.edu> wrote:
> >
> >> I'm not 100% sure, but when you feed the clip_ratio to the camera, it
> >> will renomalize each image indepedently using the max value for that
> >> particular image, so the overall scaling is not preserved from one
> image to
> >> the next. I've done this instead by defining the amount I want to
> rescale
> >> based on the first image and then manually rescaling all the other
> images
> >> with the same factor.
> >>
> >> On Thu, Mar 12, 2015 at 7:32 PM, Yuxiang Qin <
> >> yuxiangq(a)student.unimelb.edu.au> wrote:
> >>
> >>> yes, it?s a gadget data. I would try it now.
> >>>
> >>>
> >>> On 13 Mar 2015, at 10:30, Sam Skillman <samskillman(a)gmail.com> wrote:
> >>>
> >>> Just a quick thought, can you remove try removing the .transpose()
> after
> >>> block['gas','density']? Is this gadget data?
> >>>
> >>> On Thu, Mar 12, 2015 at 4:22 PM Yuxiang Qin <yuxiang.l.qin(a)gmail.com>
> >>> wrote:
> >>>
> >>>> Hi Sam,
> >>>>
> >>>> Here are the scripts (I use the parallel script to render on different
> >>>> snapshot and use the normal script to do the rotation and zoom) :
> >>>>
> >>>>
> >>>> and result:
> >>>>
> >>>> https://www.dropbox.com/s/50yrzjj3rg3pdo0/rendering.gif?dl=0
> >>>>
> >>>> Thanks for your help!
> >>>>
> >>>> Cheers,
> >>>> Yuxiang
> >>>>
> >>>> On 13 Mar 2015, at 07:45, Sam Skillman <samskillman(a)gmail.com> wrote:
> >>>>
> >>>> Hi Yuxiang,
> >>>> Can you attach the script you used, or perhaps paste it on
> >>>> http://paste.yt-project.org/ and send the resulting link?
> >>>> Thanks,
> >>>> Sam
> >>>>
> >>>> On Wed, Mar 11, 2015 at 7:46 PM Yuxiang Qin <
> >>>> yuxiangq(a)student.unimelb.edu.au> wrote:
> >>>>
> >>>>> Hi Professor Zingale,
> >>>>>
> >>>>> I did use no_ghost = False, when I created my camera.The grids are
> >>>>> still there?
> >>>>>
> >>>>> Cheers,
> >>>>> Yuxiang
> >>>>>
> >>>>> On 12 Mar 2015, at 03:42, Michael Zingale <
> >>>>> michael.zingale(a)stonybrook.edu> wrote:
> >>>>>
> >>>>> Not sure if anyone answered this yet. For the artificial grids,
> >>>>> perhaps this is because you are not using using ghost cells? Make
> sure you
> >>>>> have "no_ghost=False" in the Camera creation.
> >>>>>
> >>>>> On Tue, Mar 10, 2015 at 12:55 AM, Yuxiang Qin <
> yuxiang.l.qin(a)gmail.com
> >>>>> > wrote:
> >>>>>
> >>>>> Dear yt users,
> >>>>>>
> >>>>>> I just saw someone talks about artificial things appearing on volume
> >>>>>> rendering. Actually I also have this kind of problem.
> >>>>>>
> >>>>>> 1. When I try to rotate on my volume rendering plots, It suddenly
> >>>>>> goes dark then kind of twinkles during rotating. What I have done
> is making
> >>>>>> the grid by myself then reading it back again and volume rendering
> it. I
> >>>>>> fixed the clip_ratio. But I still got this twinkling problems.
> >>>>>>
> >>>>>> 2. The other problem is the artificial grids as you can see on my
> >>>>>> plots. I changed my resolution, over_refine_factor and other
> parameters.
> >>>>>> It?s also still there?
> >>>>>>
> >>>>>> I really appreciate your help :)
> >>>>>>
> >>>>>> Cheers,
> >>>>>> Yuxiang
> >>>>>>
> >>>>>> Here are two example. One is before rotation and the second one is
> >>>>>> rotated by 0.5 degree.
> >>>>>>
> >>>>>
> >>>>>> <103 copy 3.jpg><rotate_000 copy.jpg>
> >>>>>>
> >>>>>
> >>>>>> _______________________________________________
> >>>>>> yt-users mailing list
> >>>>>> yt-users(a)lists.spacepope.org
> >>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Michael Zingale
> >>>>> Associate Professor
> >>>>>
> >>>>> Dept. of Physics & Astronomy ? Stony Brook University ? Stony Brook,
> >>>>> NY 11794-3800
> >>>>> *phone*: 631-632-8225
> >>>>> *e-mail*: Michael.Zingale(a)stonybrook.edu
> >>>>> *web*: http://www.astro.sunysb.edu/mzingale
> >>>>>
> >>>>> _______________________________________________
> >>>>> yt-users mailing list
> >>>>> yt-users(a)lists.spacepope.org
> >>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>>>
> >>>>> _______________________________________________
> >>>>> yt-users mailing list
> >>>>> yt-users(a)lists.spacepope.org
> >>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>>>
> >>>> _______________________________________________
> >>>> yt-users mailing list
> >>>> yt-users(a)lists.spacepope.org
> >>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> yt-users mailing list
> >>>> yt-users(a)lists.spacepope.org
> >>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>>
> >>> _______________________________________________
> >>> yt-users mailing list
> >>> yt-users(a)lists.spacepope.org
> >>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> yt-users mailing list
> >>> yt-users(a)lists.spacepope.org
> >>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Michael Zingale
> >> Associate Professor
> >>
> >> Dept. of Physics & Astronomy ? Stony Brook University ? Stony Brook, NY
> >> 11794-3800
> >> *phone*: 631-632-8225
> >> *e-mail*: Michael.Zingale(a)stonybrook.edu
> >> *web*: http://www.astro.sunysb.edu/mzingale
> >> _______________________________________________
> >> yt-users mailing list
> >> yt-users(a)lists.spacepope.org
> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >>
> > _______________________________________________
> > yt-users mailing list
> > yt-users(a)lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> >
> >
> > _______________________________________________
> > yt-users mailing list
> > yt-users(a)lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> >
>
>
> --
> Michael Zingale
> Associate Professor
>
> Dept. of Physics & Astronomy ? Stony Brook University ? Stony Brook, NY
> 11794-3800
> *phone*: 631-632-8225
> *e-mail*: Michael.Zingale(a)stonybrook.edu
> *web*: http://www.astro.sunysb.edu/mzingale
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2...
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> yt-users mailing list
> yt-users(a)lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
> ------------------------------
>
> End of yt-users Digest, Vol 85, Issue 53
> ****************************************
>
--
Sandy
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org