<div dir="ltr">My script basically did this:<div><br></div><div>1) Make a projection (of a galaxy)<div>2) Identify a central point (ie the center of the galaxy i cared about)</div><div>3) Measure the projected distance from the central point to each pixel in the projection.</div><div>4) Bin these projected pixels into radial bins</div><div>5) Take the median value of different projected fields for each radial bin (e.g. column density, density-weighted temperature, etc.)</div><div>6) Plot up each of these fields as they vary for projected radius</div></div><div><br></div><div>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><br></div><div>Cameron</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 2, 2015 at 1:57 PM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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><br></div></span><div>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><br></div><div>How different was your code?</div><div><div class="h5"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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><div class="gmail_quote"><span>On Tue, Jun 2, 2015 at 8:21 AM, David Collins <span dir="ltr"><<a href="mailto:dcollins4096@gmail.com" target="_blank">dcollins4096@gmail.com</a>></span> wrote:<br></span><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, Everybody--<div><br></div><div>This was discussed a while back, but I wanted to further clarify, and possibly mooch a script or two off y'all.  </div><div><br></div><div>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><br></div><div>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><br>Thanks!</div><div>d.</div><div><br></div><div><br></div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Fri, Jan 16, 2015 at 10:31 PM, John ZuHone <span dir="ltr"><<a href="mailto:jzuhone@gmail.com" target="_blank">jzuhone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>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><br></div><div>Use the export_fits method:</div><div><br></div><div>my_frb.export_fits("myfile.fits", fields)</div><div><br></div><div>Then:</div><div><br></div><div>ds = yt.load("my_file.fits")</div><div><br></div><div>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><br></div><div>The other advantage of this is that you can store the data to disk. You'll have to install the AstroPy package.</div><div><br></div><div><div><span style="background-color:rgba(255,255,255,0)">Kavli Center for Astrophysics and Space Research<br>Massachusetts Institute of Technology<br><a>77 Massachusetts Ave.</a>, 37-582G<br><a>Cambridge, MA 02139</a><br>(w) <a href="tel:617-253-2354" target="_blank">617-253-2354</a><br>(m) <a href="tel:781-708-5004" target="_blank">781-708-5004</a><br><a href="mailto:jzuhone@space.mit.edu" target="_blank">jzuhone@space.mit.edu</a><br><a href="mailto:jzuhone@gmail.com" target="_blank">jzuhone@gmail.com</a><br><a href="http://www.jzuhone.com/" target="_blank">http://www.jzuhone.com</a></span><br style="font-family:UICTFontTextStyleBody"></div></div><div><div><div><br>On Jan 16, 2015, at 8:34 PM, Ben Thompson <<a href="mailto:bthompson2090@gmail.com" target="_blank">bthompson2090@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><p dir="ltr">Hey guys.</p>
<p dir="ltr">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">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">Ben</p>
<div class="gmail_quote">On 17 Jan 2015 01:27, "Britton Smith" <<a href="mailto:brittonsmith@gmail.com" target="_blank">brittonsmith@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Ben,<div><br></div><div>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><br></div><div>Would it perhaps work to create a uniform grid dataset from an FRB array?</div><div><br></div><div>Britton</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 13, 2015 at 12:49 PM, Ben Thompson <span dir="ltr"><<a href="mailto:bthompson2090@gmail.com" target="_blank">bthompson2090@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello everyone.<br><br></div>I was wondering if anyone has had experience with producing a profile plot from a 2d projection object (FRB object).<br><br></div>Essentially, what I am trying to do is plot the stellar surface density of a galaxy as a function of radius.<br><br></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><br><div>center = cylinder.get_field_parameter("center")<br>normal = cylinder.get_field_parameter("normal")<br>image_width = (100,"kpc")<br>three_image_width = YTArray((image_width[0], image_width[0], image_width[0]),image_width[1])<br>left = center - image_width<br>right = center + image_width<br>region = shot.region(center, left, right)<br><br>proj = yt.ProjectionPlot(cylinder.ds,"z",[("deposit","stars_density")],center=center,width=image_width,data_source=region,axes_unit="kpc")<br><br></div><div>the error arrises here<br></div><div><br>prof = yt.create_profile(proj,bin_fields="cylindrical_r",fields=[("deposit","stars_density")],n_bins=128,weight_field=None )<br><br></div><div>where I get the error<br><br><br>/gpfs/home/........./profiles.pyc in create_profile(data_source, bin_fields, fields, n_bins, extrema, logs, units, weight_field, accumulation, fractional)<br>   1304     else:<br>   1305         raise NotImplementedError<br>-> 1306     bin_fields = data_source._determine_fields(bin_fields)<br>   1307     fields = data_source._determine_fields(fields)<br>   1308     if units is not None:<br><br>AttributeError: 'FixedResolutionBuffer' object has no attribute '_determine_fields'<br><br></div><div>Any ideas how to get around this error? <br><br><br></div><div>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><br><br></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>yt-users mailing list</span><br><span><a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a></span><br><span><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a></span><br></div></blockquote></div></div></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div><div dir="ltr">-- Sent from a computer.<br></div></div>
</font></span></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div></div></div><br><br clear="all"><div><br></div>-- <br><span><div>Cameron Hummels<div>Postdoctoral Researcher</div><div>Steward Observatory</div><div>University of Arizona</div><div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div></div>
</span></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div></div></div><div><div class="h5"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">-- Sent from a computer.<br></div></div>
</div></div></div></div>
<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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cameron Hummels<div>Postdoctoral Researcher</div><div>Steward Observatory</div><div>University of Arizona</div><div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div></div>
</div>