[Amr] paraview-yt halo finding

Jorge Poco jorge.poco at kitware.com
Wed Jun 22 11:07:32 EDT 2011


Hi Matt

I have until now:
* Projection plugin: it shows the image in paraview.
* Slice plugin: it's also an image, but it' placed inside the volume, so you
can see the image as a common slice in 3D.
* Halo finder: halos information are recovered from YT and represented in
Paraview using spheres.

Now, I'm trying to run a simple volume rendering, and display the image in
paraview. It runs. but the image is not
the same as loading data directly with yt. I think the problem is the
conversion factor. because using the
StreamHandler, the data is saved without conversion.
My script is:

pf = stream.StreamStaticOutput(handler)
L = [0.5, 0.2, 0.7]
W = 1.0
c = [0.5, 0.5, 0.5]
Nvec = 512
dd = pf.h.all_data()
mi, ma = dd.quantities["Extrema"]("Density")[0]
tf = ColorTransferFunction((na.log10(mi), na.log10(ma)))
tf.add_layers(6, w=0.02)
vp = pf.h.volume_rendering(L, W, c, Nvec, tf, whole_box=True)
vp.ray_cast()

What would be the best way to solve it?


Regards



Halo Finder is working with paraview, halos are represented in paraview
using spheres.

On Fri, Jun 17, 2011 at 1:39 PM, Matthew Turk <matthewturk at gmail.com> wrote:

> Hi Jorge,
>
> On Fri, Jun 17, 2011 at 9:51 AM, Jorge Poco <jorge.poco at kitware.com>
> wrote:
> > Hi Matt
> > I will try to use HaloFinder from YT, the script would be:
>
> Wow, cool!
>
> > # create Paraview Handler
> > pf = stream.StreamStaticOutput(handler)
> > # halos will be added to this polydata
> > spheres = vtkAppendPolyData()
> > halos = HaloFinder(pf)
> > for halo in halos:
> >     # create a vtkSphere using halo information
> >     s = vtkSphereSource()
> >     s.SetCenter(halo.get_sphere().center)
> >     s.SetRadius(halo.get_sphere().radius)
> >     s.Update()
> >     spheres.AddInput(s.GetOutput())
> > spheres.Update()
> >
> > output.SetPoints(s1.GetOutput().GetPoints())
> >
> > output.SetPolys(s1.GetOutput().GetPolys())
> >
> > Using this script we will be able to recover the halos as a set of
> spheres
> > which
> >
> > could be visualized using paraview.
> >
> > Questions:
> >
> > * HaloFinder needs the particle information right?
>
> Yup, that's right.
>
> >
> > * Current stream.StreamHandler support the particle data?
>
> Yup, it should, although in the future we can make this work more
> seamlessly.  The easiest way to supply this would be to push them
> through the stream IO handler, and supply them as (1D) fields called
> "particle_mass", "particle_position_[xyz]", "particle_velocity_[xyz]".
>  I think this should work just fine, but there may be other hangups.
> If you run into any problems, let me know.
>
> Best,
>
> -Matt
>
> >
> > Regards,
> >
> > Att. Jorge Poco
> >
> > _______________________________________________
> > Amr mailing list
> > Amr at public.kitware.com
> > http://public.kitware.com/cgi-bin/mailman/listinfo/amr
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/amr/attachments/20110622/14b0715e/attachment-0001.html>


More information about the Amr mailing list