[yt-users] Field Cuts in Off-Axis Projections

Matthew Turk matthewturk at gmail.com
Wed Aug 14 13:21:29 PDT 2013


On Wed, Aug 7, 2013 at 2:42 PM, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> Hi Munier,
>
> Unfortunately I don't think that's possible at the moment.
> OffAxisProjectionPlot uses the volume renderer behind the scenes to actually
> calculate the projections and right now the volume renderer doesn't support
> arbitrary data sources, although I think Sam wants to add this functionality
> in the medium term.
>
> If the field cut you're using is based on a geometric constraint, it might
> be possible to hack something together using a covering grid, but if it's
> based on a field value I'm not sure how that would work currently.
>
> Sorry for the seemingly arbitrary limitation :(

I also recently ran into this a few weeks ago.  The
OffAxisProjectionCamera object has the facility (in both 2.x and 3.0,
but considerably easier in 3.0) to do something like this, since it
already iterates over source and gets masks back.  For 3.0 this would
be a matter of simply passing a source through into the
OffAxisProjectionCamera and then around line 2200 of camera.py having
it default to using the supplied source rather than creating a region.

-Matt

>
> -Nathan
>
>
> On Wed, Aug 7, 2013 at 11:37 AM, Munier Azzam Salem
> <msalem at astro.columbia.edu> wrote:
>>
>> Hey guys,
>>
>>        I've been trying to make slices of density only looking at cooler
>> gas (i.e. with a cut in Temperature). I've found a nice way to do this for
>> simple projections. But my strategy breaks for Off-Axis projections.
>>
>> Specifically, this works fine:
>>
>> field_parameters={'field_cuts':["grid['Temperature'] < 1e6 "]})
>> cold_proj =
>> ProjectionPlot(pf,0,'Density',field_parameters=field_parameters)
>>
>>
>> but this does not:
>>
>> cold_proj = OffAxisProjectionPlot(pf,axis,'Density',north_vector=north,
>>                                   field_parameters= field_parameters)
>>
>> sensibly enough, since field_parameters is not a keyword argument for off
>> axis projections.
>>
>> Is there a decent workaround for this? Or would this be simple to add into
>> yt's functionality? I've looked briefly into the source and it doesn't seem
>> obvious how to slip this in.
>>
>>       thanks!
>>             Munier
>>
>> --
>> Munier A. Salem // 845.489.6450
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list