<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I recall we’ve batted around the idea of using slice and projection objects directly as datasets—I suspect there probably is some way to load them as in-memory AMR datasets, but I’m not sure how easy that is. Anyone else care to comment? <div class=""><br class=""></div><div class="">In general, when I make FRBs for anything other than imaging, I make sure that the resolution matches the finest cell size, and that it matches the layout of the underlying AMR grids (e.g., no partial overlaps between FRB resolution elements and AMR cells). Something tells me we ought to have a short-hand of some kind for creating an FRB in this way. </div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 2, 2015, at 5:14 PM, Cameron Hummels <<a href="mailto:chummels@gmail.com" class="">chummels@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">My script basically did this:<div class=""><br class=""></div><div class="">1) Make a projection (of a galaxy)<div class="">2) Identify a central point (ie the center of the galaxy i cared about)</div><div class="">3) Measure the projected distance from the central point to each pixel in the projection.</div><div class="">4) Bin these projected pixels into radial bins</div><div class="">5) Take the median value of different projected fields for each radial bin (e.g. column density, density-weighted temperature, etc.)</div><div class="">6) Plot up each of these fields as they vary for projected radius</div></div><div class=""><br class=""></div><div class="">If I were to do it again, I'd probably rely on the new FRB interface as it seems cleaner.  And, it looks like it would better address what you're trying to do right now.</div><div class=""><br class=""></div><div class="">Cameron</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Jun 2, 2015 at 1:57 PM, David Collins <span dir="ltr" class=""><<a href="mailto:dcollins4096@gmail.com" target="_blank" class="">dcollins4096@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><span class=""><div class=""><br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="">Just to clarify, you want to make a phase plot of a projected object?  So you want something like how column density varies with density-weighted temperature in a 2D plot?  Or something like this?  I only ever did a radial </div></div></blockquote><div class=""><br class=""></div></span><div class="">That's exactly right.  I'll give the FRB a shot first.  Since the ultimate goal is comparison to the sky, FRB is probably just fine.  </div><div class=""><br class=""></div><div class="">How different was your code?</div><div class=""><div class="h5"><div class=""><br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="">profile of projected fields (column density, or metal column density, etc.), but I could try to help you put something together.  The FRB idea suggested by John might be the easiest approach depending on what you want.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote"><span class="">On Tue, Jun 2, 2015 at 8:21 AM, David Collins <span dir="ltr" class=""><<a href="mailto:dcollins4096@gmail.com" target="_blank" class="">dcollins4096@gmail.com</a>></span> wrote:<br class=""></span><div class=""><div class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hi, Everybody--<div class=""><br class=""></div><div class="">This was discussed a while back, but I wanted to further clarify, and possibly mooch a script or two off y'all.  </div><div class=""><br class=""></div><div class="">I'd like a PhasePlot from a projected region.  Earlier FRBs were discussed; has anyone successfully done the same on a YTQuadTreeProj?  I'd like to retain all the high resolution data, if possible.  </div><div class=""><br class=""></div><div class="">Cameron, back in Jan you mentioned you had a script.  Did you manage to track it down, and/or would you be willing to send it my way?</div><div class=""><br class="">Thanks!</div><div class="">d.</div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><div class=""><div class=""><br class=""><div class="gmail_quote">On Fri, Jan 16, 2015 at 10:31 PM, John ZuHone <span dir="ltr" class=""><<a href="mailto:jzuhone@gmail.com" target="_blank" class="">jzuhone@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class=""><div class="">This is a bit of a long way around, but you could write the FRB to a FITS file and read it in as a dataset. You would get the coordinate system, units, etc., and the whole YT machinery.</div><div class=""><br class=""></div><div class="">Use the export_fits method:</div><div class=""><br class=""></div><div class="">my_frb.export_fits("myfile.fits", fields)</div><div class=""><br class=""></div><div class="">Then:</div><div class=""><br class=""></div><div class="">ds = yt.load("my_file.fits")</div><div class=""><br class=""></div><div class="">I'm not at a computer so I don't remember the exact signature, but it should be in the code and you can check using help(my_frb.export_fits). If you're interested I can write back with more info later.</div><div class=""><br class=""></div><div class="">The other advantage of this is that you can store the data to disk. You'll have to install the AstroPy package.</div><div class=""><br class=""></div><div class=""><div class=""><span style="background-color:rgba(255,255,255,0)" class="">Kavli Center for Astrophysics and Space Research<br class="">Massachusetts Institute of Technology<br class=""><a class="">77 Massachusetts Ave.</a>, 37-582G<br class=""><a class="">Cambridge, MA 02139</a><br class="">(w) <a href="tel:617-253-2354" target="_blank" class="">617-253-2354</a><br class="">(m) <a href="tel:781-708-5004" target="_blank" class="">781-708-5004</a><br class=""><a href="mailto:jzuhone@space.mit.edu" target="_blank" class="">jzuhone@space.mit.edu</a><br class=""><a href="mailto:jzuhone@gmail.com" target="_blank" class="">jzuhone@gmail.com</a><br class=""><a href="http://www.jzuhone.com/" target="_blank" class="">http://www.jzuhone.com</a></span><br style="font-family:UICTFontTextStyleBody" class=""></div></div><div class=""><div class=""><div class=""><br class="">On Jan 16, 2015, at 8:34 PM, Ben Thompson <<a href="mailto:bthompson2090@gmail.com" target="_blank" class="">bthompson2090@gmail.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><p dir="ltr" class="">Hey guys.</p><p dir="ltr" class="">I have a solution together for myself involving the new particle_position_relative_[xyz] fields and multiple instances of np.histogram and np.linspace which seems to do the trick.</p><p dir="ltr" class="">Although I would not complain if a piece of code that would be more native to the inner workings of YT existed that made use of the FRB data objects :). So that would be very nice Cameron. Don't feel the need to rush with it though, as I made a numpy solution for myself. But I would be interested to see that code.</p><p dir="ltr" class="">Ben</p>
<div class="gmail_quote">On 17 Jan 2015 01:27, "Britton Smith" <<a href="mailto:brittonsmith@gmail.com" target="_blank" class="">brittonsmith@gmail.com</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hi Ben,<div class=""><br class=""></div><div class="">I seem to recall people on this list doing similar things in the past with their own external code.  Does anyone still have their 2D radial profile code around anymore?</div><div class=""><br class=""></div><div class="">Would it perhaps work to create a uniform grid dataset from an FRB array?</div><div class=""><br class=""></div><div class="">Britton</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Jan 13, 2015 at 12:49 PM, Ben Thompson <span dir="ltr" class=""><<a href="mailto:bthompson2090@gmail.com" target="_blank" class="">bthompson2090@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><div class=""><div class="">Hello everyone.<br class=""><br class=""></div>I was wondering if anyone has had experience with producing a profile plot from a 2d projection object (FRB object).<br class=""><br class=""></div>Essentially, what I am trying to do is plot the stellar surface density of a galaxy as a function of radius.<br class=""><br class=""></div>This is achieved by doing the following from a disk YT object called cylinder (in which the origional simulation object is called shot)<br class=""><br class=""><div class="">center = cylinder.get_field_parameter("center")<br class="">normal = cylinder.get_field_parameter("normal")<br class="">image_width = (100,"kpc")<br class="">three_image_width = YTArray((image_width[0], image_width[0], image_width[0]),image_width[1])<br class="">left = center - image_width<br class="">right = center + image_width<br class="">region = shot.region(center, left, right)<br class=""><br class="">proj = yt.ProjectionPlot(cylinder.ds,"z",[("deposit","stars_density")],center=center,width=image_width,data_source=region,axes_unit="kpc")<br class=""><br class=""></div><div class="">the error arrises here<br class=""></div><div class=""><br class="">prof = yt.create_profile(proj,bin_fields="cylindrical_r",fields=[("deposit","stars_density")],n_bins=128,weight_field=None )<br class=""><br class=""></div><div class="">where I get the error<br class=""><br class=""><br class="">/gpfs/home/........./profiles.pyc in create_profile(data_source, bin_fields, fields, n_bins, extrema, logs, units, weight_field, accumulation, fractional)<br class="">   1304     else:<br class="">   1305         raise NotImplementedError<br class="">-> 1306     bin_fields = data_source._determine_fields(bin_fields)<br class="">   1307     fields = data_source._determine_fields(fields)<br class="">   1308     if units is not None:<br class=""><br class="">AttributeError: 'FixedResolutionBuffer' object has no attribute '_determine_fields'<br class=""><br class=""></div><div class="">Any ideas how to get around this error? <br class=""><br class=""><br class=""></div><div class="">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.<br class=""><br class=""><br class=""></div></div>
<br class="">_______________________________________________<br class="">
yt-users mailing list<br class="">
<a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a><br class="">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div><br class=""></div>
<br class="">_______________________________________________<br class="">
yt-users mailing list<br class="">
<a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a><br class="">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div>
</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">yt-users mailing list</span><br class=""><span class=""><a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a></span><br class=""><span class=""><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a></span><br class=""></div></blockquote></div></div></div><br class="">_______________________________________________<br class="">
yt-users mailing list<br class="">
<a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a><br class="">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div></div></div><span class=""><font color="#888888" class="">-- <br class=""><div class=""><div dir="ltr" class="">-- Sent from a computer.<br class=""></div></div>
</font></span></div>
<br class="">_______________________________________________<br class="">
yt-users mailing list<br class="">
<a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a><br class="">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div></div></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><span class=""><div class="">Cameron Hummels<div class="">Postdoctoral Researcher</div><div class="">Steward Observatory</div><div class="">University of Arizona</div><div class=""><a href="http://chummels.org/" target="_blank" class="">http://chummels.org</a></div></div>
</span></div>
<br class="">_______________________________________________<br class="">
yt-users mailing list<br class="">
<a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a><br class="">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div></div></div><div class=""><div class="h5"><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class=""><div dir="ltr" class="">-- Sent from a computer.<br class=""></div></div>
</div></div></div></div>
<br class="">_______________________________________________<br class="">
yt-users mailing list<br class="">
<a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature">Cameron Hummels<div class="">Postdoctoral Researcher</div><div class="">Steward Observatory</div><div class="">University of Arizona</div><div class=""><a href="http://chummels.org/" target="_blank" class="">http://chummels.org</a></div></div>
</div>
_______________________________________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br class=""></div></blockquote></div><br class=""></div></body></html>