[yt-users] Volume Rendering and Weighted Fields
Matthew Turk
matthewturk at gmail.com
Mon Mar 14 09:50:58 PDT 2011
Hi John,
Sam's right that you could set up a derived field to do this. I
believe, however, that the functionality is already in the existing
volume rendering code. Sam's way may be easier.
You should be able to set up a set of multiple fields in your Camera
object when you create it. Then, construct a
MultiVariateTransferFunction. Add on a field table that executes a
projection, similar to the ProjectionTransferFunction. Then simply
set the weight_field value of your new transfer function to be equal
to the field id of the weighting field; in this case it might be "0"
for the main field, "1" for the weighting field.
But, much like the projections, this should be easier -- right now I
have been taking a lot of off-axis averages and projections, and I
usually use Sam's method. But there should be shortcuts and whatnot
for this.
Best,
Matt
On Sat, Mar 12, 2011 at 4:24 PM, John ZuHone <jzuhone at cfa.harvard.edu> wrote:
> Hi all,
>
> I have figured out how to do an off-axis projection using the camera interface, it was actually pretty straightforward.
>
> I'm primarily concerned with simulating X-ray images for clusters, and I would like to extend my process to projections of weighted quantities, say emission-weighted temperature (or "spectroscopic-like" temperature, which means weighting by dens*temp**(-alpha)).
>
> I imagine that I have to use MultiVariateTransferFunction for this... does anyone have a good example of how to do something like this? I've looked at the source code but the process is still not exactly transparent to me.
>
> Best,
>
> John ZuHone
> _______________________________________________
> 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