Hi Ryan, Stephen,<div><br></div><div>The main issue here is that the cameras are explicitly fed a parameter file, not a data object.  For some of the cameras, this was done because we don't currently (though it is in the works) have a brick homogenization routine that acts on a data object instead of a parameter file.  For others (off-axis and allsky in particular), there would be a way to get around this, but it will require modifying the source.</div>

<div><br></div><div>Around line 1530 of yt/visualization/volume_rendering/camera.py, there are the following lines:</div><div><br></div><div><div>    grids = pf.h.sphere(center, radius)._grids</div><div>    sampler = ProjectionSampler(positions, vs, center, (0.0, 0.0, 0.0, 0.0),</div>

<div>                                image, uv, uv, np.zeros(3, dtype='float64'))</div><div>    pb = get_pbar("Sampling ", len(grids))</div><div>    for i,grid in enumerate(grids):</div><div>        data = [grid[field] * grid.child_mask.astype('float64')</div>

<div>                for field in fields]</div><div><br></div><div>I think what you would want to do is add a source= keyword argument to the allsky projection call, and then use the object to get the grids in question. How to get the boolean regions to work correctly, which might need modification of the above loop, I'll leave up to Stephen.</div>

<div><br></div><div>Ryan, If you get this to work, please feel free to fork the repository and issue a pull request with the new feature.</div><div><br></div><div>Cheers,</div><div>Sam</div><div><br></div><div><br></div>
<div class="gmail_quote">
On Tue, Oct 23, 2012 at 7:28 AM, Stephen Skory <span dir="ltr"><<a href="mailto:s@skory.us" target="_blank">s@skory.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Ryan,<br>
<div class="im"><br>
> I have a question about volume rendering.  I'd like to run camera.allsky_projection on a data object with a particular shape, in this case a sphere with a cylindrical hole in the center.  I was able to define such an object using the boolean operator "NOT".  But feeding it to camera.allsky_projection leads to an error, with the traceback below.<br>


<br>
</div>I think I might have an idea on how to address this, but since I'd<br>
like to A) test the fix myself before pushing it and B) have a better<br>
understanding of what you're doing in the first place, would you mind<br>
sharing the script you're using? That would be most helpful, thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Stephen Skory<br>
<a href="mailto:s@skory.us">s@skory.us</a><br>
<a href="http://stephenskory.com/" target="_blank">http://stephenskory.com/</a><br>
<a href="tel:510.621.3687" value="+15106213687">510.621.3687</a> (google voice)<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br></div>