[yt-users] Issue regarding Volume Rendering

Nathan Goldbaum nathan12343 at gmail.com
Tue Oct 6 08:11:45 PDT 2015


Th save_image function also takes a clip_ratio keyword argument. This
keyword is used to "clip" pixels that have much higher intensity contrast
than the test of the image, producing more pleasing histogram equalization.
I'd suggest supplying clip_ratio to save_image as well.

-Nathan

On Tue, Oct 6, 2015 at 8:43 AM, Reju Sam John <rejusamjohn at gmail.com> wrote:

>
> Hi all,
>
> I am trying to do some volume rendering with the following script.
>
>
>     tf = yt.ColorTransferFunction((-29, -24))
>     tf.add_layers(4, w=0.01)
>     cam = ds.camera([5.020844896e-01, 4.934331785e-01, 4.921018057e-01],
> [0.0, 0.0, 1.0], (20, 'Mpc'), 640, tf, fields=["density"],
> log_fields="False", no_ghost=False)
>     image = cam.snapshot(fn="density_vol_"+fn_i+".png")
>     cam.save_image(image, clip_ratio=4, transparent=False)
>     cam.show(clip_ratio=4)
>
>
>
> But the problem is that the image saved using cam.save_image() is
> different from the one displayed by  cam.show(clip_ratio=4)
>
> Displayed image using cam.show(clip_ratio=4)
>>  download.png
> <https://drive.google.com/file/d/0B6l5iRWTUbHWa054VDVNOFY1bGpqVklqYlA3ZEhzazhwZWhr/view?usp=drive_web>
>> Saved image using cam.save_image()
>>  density_vol_10.png
> <https://drive.google.com/file/d/0B6l5iRWTUbHWUmhXVGZfY0xiMXBGUW81Szh0LU0yZFI5enFB/view?usp=drive_web>
>>
> Why this is happening ? How to save the same image as of displayed one?
>
>  Thank you
>
> Reju Sam John
>
>
>
> --
> Reju Sam John
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20151006/65bbcf08/attachment.htm>


More information about the yt-users mailing list