[Amr] paraview plugins for yt

Matthew Turk matthewturk at gmail.com
Thu Jun 16 20:23:29 EDT 2011


Hi Jorge,

Sorry, I should have been more explicit.  I'll share a little bit
about one of the things that we have tried to do with yt, which is a
'project once, plot many' approach to projections (and slices as
well.)  In the script you have seen in the past, there are two sets of
calls:

proj = pf.h.proj(...)

This constructs a set of flat arrays, taking on the names "px", "py",
"pdx", "pdy" and then the name of the projected field.  These contain
the line integral through every cell, up to the finest level of
resolution, in the entire domain.  (Projections can also be applied to
sub-sections.)  At this point, the next line is to construct the fixed
resolution buffer:

frb = FixedResolutionBuffer(source, (px_min, px_max, py_min, py_max),
(buff_size_x, buff_size_y))

This sets up a porthole into the projection, and when frb["Density"]
is called it actually takes the set of fields and pixelizes them into
a buff_size_x by buff_size_y buffer.  So by changing the px_min,
px_max, etc you can move around this little window and re-pixelize,
but the code does not have to re-project.  For very large datasets,
this can save a considerable amount of time -- in fact, in most of
even our largest runs, the projection step may be quite time consuming
but the pixelization step can operate at a few frames a second (much
higher for small datasets.)  What I was getting at was that it should
be possible to save the proj object (which will hold on to a reference
to its parameter file) and then pixelize it multiple times by
re-generating the FixedResolutionBuffer.  I have some example code
that does this, if you are interested.

Is this kind of thing possible to do, where the extent of the view
updates the underlying data (and spatial extent of that data)?  Is
there any way I can help out?

Thanks again for your thoughts on this,

Matt

On Thu, Jun 16, 2011 at 4:19 PM, Jorge Poco <jorge.poco at kitware.com> wrote:
> Hi Matt
> When you said 'adaptive projections and slices' you mean for instance:
> pf = load(...)
> proj1 = pf.h.slice(axis, coord1, field_name)    # will be slow
> proj2 = pf.h.slice(axis, coord2, field_name)    # should be very fast?
> proj2 should be done very fast in comparison with proj1? If so, the idea is
> to save 'pf' object?
> How do you can I update the extent in yt?
> Regards,
> On Wed, Jun 15, 2011 at 10:26 PM, Matthew Turk <matthewturk at gmail.com>
> wrote:
>>
>> Hi Jorge,
>>
>> Once I figured out how to load plugins (Plugin Manager -> Load New ->
>> XML) I was able to get these in and they completely worked for me.
>> This is really cool.
>>
>> One thing that might be neat would be to use the visible extents to
>> determine the extents of the image -- i.e., zooming would then be able
>> to actually zoom in the image.  One of the neat things about yt is the
>> adaptive projections and slices, so that you can use the same source
>> data and update the extents essentially instantaneously to get a new
>> image at a higher spatial resolution.
>>
>> Thanks very much for this, it's really cool.  The other night I
>> blogged about it on the yt blog: http://post.ly/2Cxhb and I am excited
>> about the idea of showing this to other people.
>>
>> -Matt
>>
>> On Wed, Jun 15, 2011 at 10:41 AM, Jorge Poco <jorge.poco at kitware.com>
>> wrote:
>> > Hi Matt
>> > I have written some XML code to create the plugins for Projection and
>> > Slice:
>> > http://paste.enzotools.org/show/1710/ (Projection)
>> > http://paste.enzotools.org/show/1709/ (Slice)
>> > * the graphics interface is not intuitive. I mean if you want to change
>> > the
>> > 'field name' you need to write it instead of selecting the preexisting
>> > fields.
>> > I will still looking for a better way to show the parameters.
>> > * In my Paraview installation, after some intents trying to regenerate
>> > the
>> > image using the YT code, it stops working but I don't see any error
>> > message.
>> > I will figure out this problem.
>> > Regards,
>> > Att. Jorge Poco.
>
>


More information about the Amr mailing list