[yt-users] volume_rendering help

Kacper Kowalik xarthisius.kk at gmail.com
Sun Aug 21 17:20:33 PDT 2016


On 08/21/2016 01:46 PM, tazkera haque wrote:
> Hi people,
> 
> I am learning the volume_rendering process in yt, I have yt 3.1 installed
> and I am using Stampede supercomputer to submit my jobs.
> 
> I already have an example code from my colleagues and playing around with
> it, the code follows this :
> 
>
> import matplotlib
> matplotlib.use('Agg')
> import yt
> import os
> import numpy as np
> import matplotlib.pyplot as plt
> from yt import derived_field
> from yt.visualization.volume_rendering.transfer_function_helper import
> TransferFunctionHelper
> from yt.visualization.volume_rendering.api import Scene, VolumeSource
>
> the very first error I get is this :
> 
> Traceback (most recent call last):
>   File "volume_render.py", line 17, in
> <module>    from yt.visualization.volume_rendering.api import Scene,
> VolumeSourceImportError: cannot import name

Hi Tezkera,
the Scene object (the new VR API in general) was added in the most
recent version of yt: 3.3.1. That code won't work with yt-3.1. Please
update if you can. If that's not possible, you can find the
documentation for the old VR that was used in yt-3.1 here:

 http://yt-project.org/docs/3.1/visualizing/volume_rendering.html

Cheers,
Kacper

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160821/f50c82a5/attachment.sig>


More information about the yt-users mailing list