Hi, For iso-density surface I have a primitive question: how do I make certain contour level totally opaque? I can do " tf.add_gaussian(-25.5, 0.05, [1.0, 0, 0, 1.0])" but specifying alpha=1.0 in this example does not seem to make that level (red) totally opaque. Thanks, Renyue
Hi Renyue, It turns out that's not such an easy thing to do at the moment. Because of the way the transfer function was constructed, most of the renderings turn out to live in an optically thin regime. This is primarily due to the adaptive nature of grid traversal and the clipping of the transfer function to have a maximum value of 1.0 and the way the integration is approximated. I've added some changes to this in a bitbucket fork that is part of an effort to refactor the volume rendering. If you'd like to try it out, you can clone this fork from: https://bitbucket.org/samskillman/yt-refactor Note that this also brings with it some OpenMP stuff, and by default it runs with OMP_NUM_THREADS = number of cores the node. You can get rid of this with export OMP_NUM_THREADS=1. Because of the adaptive nature of our ray-casting, you may need to set alpha to something higher than 1.0 (since it get's multiplied by something like dx during ray tracing). You can find an example script of mine where I add three isocontours, as well as use a camera lighting (yet another feature in the works). http://paste.yt-project.org/show/2244/ Let me know if you have any luck/difficulty with this. We will be pushing for this in the next stable release. Best, Sam On Tue, Mar 20, 2012 at 10:37 AM, Renyue Cen <cen@astro.princeton.edu>wrote:
Hi,
For iso-density surface I have a primitive question: how do I make certain contour level totally opaque? I can do " tf.add_gaussian(-25.5, 0.05, [1.0, 0, 0, 1.0])" but specifying alpha=1.0 in this example does not seem to make that level (red) totally opaque.
Thanks, Renyue _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Sam, I will look into your method to see what I get. Thanks very much, Renyue On Mar 20, 2012, at 4:12 PM, Sam Skillman wrote:
Hi Renyue,
It turns out that's not such an easy thing to do at the moment. Because of the way the transfer function was constructed, most of the renderings turn out to live in an optically thin regime. This is primarily due to the adaptive nature of grid traversal and the clipping of the transfer function to have a maximum value of 1.0 and the way the integration is approximated. I've added some changes to this in a bitbucket fork that is part of an effort to refactor the volume rendering. If you'd like to try it out, you can clone this fork from:
https://bitbucket.org/samskillman/yt-refactor
Note that this also brings with it some OpenMP stuff, and by default it runs with OMP_NUM_THREADS = number of cores the node. You can get rid of this with export OMP_NUM_THREADS=1.
Because of the adaptive nature of our ray-casting, you may need to set alpha to something higher than 1.0 (since it get's multiplied by something like dx during ray tracing). You can find an example script of mine where I add three isocontours, as well as use a camera lighting (yet another feature in the works).
http://paste.yt-project.org/show/2244/
Let me know if you have any luck/difficulty with this. We will be pushing for this in the next stable release.
Best, Sam
On Tue, Mar 20, 2012 at 10:37 AM, Renyue Cen <cen@astro.princeton.edu> wrote: Hi,
For iso-density surface I have a primitive question: how do I make certain contour level totally opaque? I can do " tf.add_gaussian(-25.5, 0.05, [1.0, 0, 0, 1.0])" but specifying alpha=1.0 in this example does not seem to make that level (red) totally opaque.
Thanks, Renyue _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi, I have generated an all sky map of HI density that looks great by: volume = AMRKDTree(pf, le=center-radius/pf['1'], re=center+radius/pf['1'], fields=["MyNumberDensity"], log_fields=[False]) cam = camera.HEALpixCamera(center, radius/pf['1'], nside = 64, pf = pf, fields = ["MyNumberDensity"], log_fields = [False], volume=volume) bitmap = cam.snapshot("allskyHI0000.png",units=r"\mathrm{cm}^{-2}") How could set the column density range, say, 10^15 to 10^24 cm^{-2}, instead of the default one that is used by the code? Thanks, Renyue
Hi Renyue, I've just added a clim option to the snapshot function for HEALpix cameras. You can now specify clim = (mi, ma) in your call to snapshot and it should scale it appropriately. You'll have to update yt; "yt update" should do this for you. -Matt On Thu, Mar 22, 2012 at 12:12 PM, Renyue Cen <cen@astro.princeton.edu> wrote:
Hi,
I have generated an all sky map of HI density that looks great by:
volume = AMRKDTree(pf, le=center-radius/pf['1'], re=center+radius/pf['1'], fields=["MyNumberDensity"], log_fields=[False]) cam = camera.HEALpixCamera(center, radius/pf['1'], nside = 64, pf = pf, fields = ["MyNumberDensity"], log_fields = [False], volume=volume)
bitmap = cam.snapshot("allskyHI0000.png",units=r"\mathrm{cm}^{-2}")
How could set the column density range, say, 10^15 to 10^24 cm^{-2}, instead of the default one that is used by the code?
Thanks, Renyue
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Matthew Turk
-
Renyue Cen
-
Sam Skillman