[Amr] paraview-yt halo finding
Jorge Poco
jorge.poco at kitware.com
Wed Jun 22 15:02:45 EDT 2011
Hi Matt
I found the problem.
pf = stream.StreamStaticOutput(handler)
pf.h
pf.field_info['Density'].take_log = True
pf.field_info['Density'].take_log was False and should be True, because
Transfer function was
working in log scale.
Regards
On Wed, Jun 22, 2011 at 12:22 PM, Matthew Turk <matthewturk at gmail.com>wrote:
> Hi Jorge,
>
> Sure -- I'm going to be away from my desk for a little while, but I
> will get back to you this afternoon (pacific time, unfortunately).
>
> -Matt
>
> On Wed, Jun 22, 2011 at 9:21 AM, Jorge Poco <jorge.poco at kitware.com>
> wrote:
> > Hi Matt
> >
> > I have tested the volume rendering using your first script to convert
> from
> > Enzo loader to StreamHandler
> > and it's giving me bad results. Could you check the results with that
> > script, please?
> >
> > Regards
> >
> > On Wed, Jun 22, 2011 at 11:35 AM, Jorge Poco <jorge.poco at kitware.com>
> wrote:
> >>
> >> Hi Matt
> >> images are attached.
> >>
> >> On Wed, Jun 22, 2011 at 11:24 AM, Matthew Turk <matthewturk at gmail.com>
> >> wrote:
> >>>
> >>> Hi Jorge,
> >>>
> >>> It's not entirely clear to me. I think what you have done should be
> >>> immune to a difference in multiplicative factor. Would it be possible
> >>> to see the image that comes out of PV and compare to the image
> >>> directly out of yt?
> >>>
> >>> -Matt
> >>>
> >>> On Wed, Jun 22, 2011 at 8:07 AM, Jorge Poco <jorge.poco at kitware.com>
> >>> wrote:
> >>> > 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/986b68c2/attachment-0001.html>
More information about the Amr
mailing list