<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> Probably doable as a 2D dataset, loading the quadtree in-memory. Would take<br>
> some work.<br>
<br>
</span>Yes, this is totally doable, but would as you note take some work.  I<br>
can see a few possible ways to it, all of which we should consider,<br>
</blockquote><div><br></div><div>That would be awesome if it were possible.  </div><div><br></div><div>For now I think John's FRB at max res. will be the way I go for me.  I'm already looking at FRBs like that, so it's a straight forward method.  </div><div><br></div><div>Thanks a ton for the input!</div><div><br></div><div>d.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">but the main obstacle is likely going to be an impedance mismatch<br>
between the quadtree and the octree, which were developed at different<br>
times in different ways.  There'll be a visitor this Summer who's<br>
interested in this type of thing, and I'll see if we can collaborate<br>
to pull it together.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
>><br>
>><br>
>> In general, when I make FRBs for anything other than imaging, I make sure<br>
>> that the resolution matches the finest cell size, and that it matches the<br>
>> layout of the underlying AMR grids (e.g., no partial overlaps between FRB<br>
>> resolution elements and AMR cells). Something tells me we ought to have a<br>
>> short-hand of some kind for creating an FRB in this way.<br>
><br>
><br>
> This is basically a reduced dimensionality covering grid.  I don't think we<br>
> have such a thing yet but I think it would be a worthwhile addition, I could<br>
> see it being useful to not need to think about aligning a FRB with cell<br>
> boundaries.<br>
><br>
>><br>
>><br>
>> On Jun 2, 2015, at 5:14 PM, Cameron Hummels <<a href="mailto:chummels@gmail.com">chummels@gmail.com</a>> wrote:<br>
>><br>
>> My script basically did this:<br>
>><br>
>> 1) Make a projection (of a galaxy)<br>
>> 2) Identify a central point (ie the center of the galaxy i cared about)<br>
>> 3) Measure the projected distance from the central point to each pixel in<br>
>> the projection.<br>
>> 4) Bin these projected pixels into radial bins<br>
>> 5) Take the median value of different projected fields for each radial bin<br>
>> (e.g. column density, density-weighted temperature, etc.)<br>
>> 6) Plot up each of these fields as they vary for projected radius<br>
>><br>
>> If I were to do it again, I'd probably rely on the new FRB interface as it<br>
>> seems cleaner.  And, it looks like it would better address what you're<br>
>> trying to do right now.<br>
>><br>
>> Cameron<br>
>><br>
>> On Tue, Jun 2, 2015 at 1:57 PM, David Collins <<a href="mailto:dcollins4096@gmail.com">dcollins4096@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>><br>
>>><br>
>>>><br>
>>>> Just to clarify, you want to make a phase plot of a projected object?<br>
>>>> So you want something like how column density varies with density-weighted<br>
>>>> temperature in a 2D plot?  Or something like this?  I only ever did a radial<br>
>>><br>
>>><br>
>>> That's exactly right.  I'll give the FRB a shot first.  Since the<br>
>>> ultimate goal is comparison to the sky, FRB is probably just fine.<br>
>>><br>
>>> How different was your code?<br>
>>><br>
>>><br>
>>>><br>
>>>> profile of projected fields (column density, or metal column density,<br>
>>>> etc.), but I could try to help you put something together.  The FRB idea<br>
>>>> suggested by John might be the easiest approach depending on what you want.<br>
>>>><br>
>>>> On Tue, Jun 2, 2015 at 8:21 AM, David Collins <<a href="mailto:dcollins4096@gmail.com">dcollins4096@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi, Everybody--<br>
>>>>><br>
>>>>> This was discussed a while back, but I wanted to further clarify, and<br>
>>>>> possibly mooch a script or two off y'all.<br>
>>>>><br>
>>>>> I'd like a PhasePlot from a projected region.  Earlier FRBs were<br>
>>>>> discussed; has anyone successfully done the same on a YTQuadTreeProj?  I'd<br>
>>>>> like to retain all the high resolution data, if possible.<br>
>>>>><br>
>>>>> Cameron, back in Jan you mentioned you had a script.  Did you manage to<br>
>>>>> track it down, and/or would you be willing to send it my way?<br>
>>>>><br>
>>>>> Thanks!<br>
>>>>> d.<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> On Fri, Jan 16, 2015 at 10:31 PM, John ZuHone <<a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a>><br>
>>>>> wrote:<br>
>>>>>><br>
>>>>>> This is a bit of a long way around, but you could write the FRB to a<br>
>>>>>> FITS file and read it in as a dataset. You would get the coordinate system,<br>
>>>>>> units, etc., and the whole YT machinery.<br>
>>>>>><br>
>>>>>> Use the export_fits method:<br>
>>>>>><br>
>>>>>> my_frb.export_fits("myfile.fits", fields)<br>
>>>>>><br>
>>>>>> Then:<br>
>>>>>><br>
>>>>>> ds = yt.load("my_file.fits")<br>
>>>>>><br>
>>>>>> I'm not at a computer so I don't remember the exact signature, but it<br>
>>>>>> should be in the code and you can check using help(my_frb.export_fits). If<br>
>>>>>> you're interested I can write back with more info later.<br>
>>>>>><br>
>>>>>> The other advantage of this is that you can store the data to disk.<br>
>>>>>> You'll have to install the AstroPy package.<br>
>>>>>><br>
>>>>>> Kavli Center for Astrophysics and Space Research<br>
>>>>>> Massachusetts Institute of Technology<br>
>>>>>> 77 Massachusetts Ave., 37-582G<br>
>>>>>> Cambridge, MA 02139<br>
>>>>>> (w) <a href="tel:617-253-2354" value="+16172532354">617-253-2354</a><br>
>>>>>> (m) <a href="tel:781-708-5004" value="+17817085004">781-708-5004</a><br>
>>>>>> <a href="mailto:jzuhone@space.mit.edu">jzuhone@space.mit.edu</a><br>
>>>>>> <a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a><br>
>>>>>> <a href="http://www.jzuhone.com" target="_blank">http://www.jzuhone.com</a><br>
>>>>>><br>
>>>>>> On Jan 16, 2015, at 8:34 PM, Ben Thompson <<a href="mailto:bthompson2090@gmail.com">bthompson2090@gmail.com</a>><br>
>>>>>> wrote:<br>
>>>>>><br>
>>>>>> Hey guys.<br>
>>>>>><br>
>>>>>> I have a solution together for myself involving the new<br>
>>>>>> particle_position_relative_[xyz] fields and multiple instances of<br>
>>>>>> np.histogram and np.linspace which seems to do the trick.<br>
>>>>>><br>
>>>>>> Although I would not complain if a piece of code that would be more<br>
>>>>>> native to the inner workings of YT existed that made use of the FRB data<br>
>>>>>> objects :). So that would be very nice Cameron. Don't feel the need to rush<br>
>>>>>> with it though, as I made a numpy solution for myself. But I would be<br>
>>>>>> interested to see that code.<br>
>>>>>><br>
>>>>>> Ben<br>
>>>>>><br>
>>>>>> On 17 Jan 2015 01:27, "Britton Smith" <<a href="mailto:brittonsmith@gmail.com">brittonsmith@gmail.com</a>> wrote:<br>
>>>>>>><br>
>>>>>>> Hi Ben,<br>
>>>>>>><br>
>>>>>>> I seem to recall people on this list doing similar things in the past<br>
>>>>>>> with their own external code.  Does anyone still have their 2D radial<br>
>>>>>>> profile code around anymore?<br>
>>>>>>><br>
>>>>>>> Would it perhaps work to create a uniform grid dataset from an FRB<br>
>>>>>>> array?<br>
>>>>>>><br>
>>>>>>> Britton<br>
>>>>>>><br>
>>>>>>> On Tue, Jan 13, 2015 at 12:49 PM, Ben Thompson<br>
>>>>>>> <<a href="mailto:bthompson2090@gmail.com">bthompson2090@gmail.com</a>> wrote:<br>
>>>>>>>><br>
>>>>>>>> Hello everyone.<br>
>>>>>>>><br>
>>>>>>>> I was wondering if anyone has had experience with producing a<br>
>>>>>>>> profile plot from a 2d projection object (FRB object).<br>
>>>>>>>><br>
>>>>>>>> Essentially, what I am trying to do is plot the stellar surface<br>
>>>>>>>> density of a galaxy as a function of radius.<br>
>>>>>>>><br>
>>>>>>>> This is achieved by doing the following from a disk YT object called<br>
>>>>>>>> cylinder (in which the origional simulation object is called shot)<br>
>>>>>>>><br>
>>>>>>>> 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],<br>
>>>>>>>> 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 =<br>
>>>>>>>> yt.ProjectionPlot(cylinder.ds,"z",[("deposit","stars_density")],center=center,width=image_width,data_source=region,axes_unit="kpc")<br>
>>>>>>>><br>
>>>>>>>> the error arrises here<br>
>>>>>>>><br>
>>>>>>>> prof =<br>
>>>>>>>> yt.create_profile(proj,bin_fields="cylindrical_r",fields=[("deposit","stars_density")],n_bins=128,weight_field=None<br>
>>>>>>>> )<br>
>>>>>>>><br>
>>>>>>>> where I get the error<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>> /gpfs/home/........./profiles.pyc in create_profile(data_source,<br>
>>>>>>>> bin_fields, fields, n_bins, extrema, logs, units, weight_field,<br>
>>>>>>>> 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<br>
>>>>>>>> '_determine_fields'<br>
>>>>>>>><br>
>>>>>>>> Any ideas how to get around this error?<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>> Also some other things to add as a postscript. Since how the<br>
>>>>>>>> projection works, if I provide weights=None as a keyword argument within the<br>
>>>>>>>> ProjectionPlot object, I get a surface density (g/cm^2). But also a<br>
>>>>>>>> "cylindrical_r" in cm^2 as well. I *think* the way to get around this is to<br>
>>>>>>>> do another projection where weights="ones", get the radius values out of<br>
>>>>>>>> that profile.. and then in matplotlib, useing the surface density array from<br>
>>>>>>>> the former profile, and the radius bin array from the latter... Produce a<br>
>>>>>>>> plot of the surface density as a function of radius from those two arrays (I<br>
>>>>>>>> might check by hand afterwards to see if this does the trick). This seems<br>
>>>>>>>> kinda convoluted so I am wondering if there is an easier way than this.<br>
>>>>>>>><br>
>>>>>>>><br>
>>>>>>>><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>
>>>>>>><br>
>>>>>>><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>
>>>>>> _______________________________________________<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>
>>>>>><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>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>> -- Sent from a computer.<br>
>>>>><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>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Cameron Hummels<br>
>>>> Postdoctoral Researcher<br>
>>>> Steward Observatory<br>
>>>> University of Arizona<br>
>>>> <a href="http://chummels.org" target="_blank">http://chummels.org</a><br>
>>>><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>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> -- Sent from a computer.<br>
>>><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>
>><br>
>><br>
>><br>
>> --<br>
>> Cameron Hummels<br>
>> Postdoctoral Researcher<br>
>> Steward Observatory<br>
>> University of Arizona<br>
>> <a href="http://chummels.org" target="_blank">http://chummels.org</a><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>
>><br>
>><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>
><br>
><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>
_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">-- Sent from a computer.<br></div></div>
</div></div>