[yt-users] Issue regarding Volume Rendering

Reju Sam John rejusamjohn at gmail.com
Tue Oct 6 13:11:31 PDT 2015


Hi Nathan,

But I was using clip_ratio =4 for both save_image() and show() as below

cam.save_image(image, clip_ratio=4, transparent=False)

cam.show(clip_ratio=4)


On Tue, Oct 6, 2015 at 8:41 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> 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
>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>


-- 
Reju Sam John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20151007/f1cc9518/attachment.htm>


More information about the yt-users mailing list