Juha Jäykkä | 2 Mar 16:22 2012
Picon

sigsegvs with 4.1.0

Hi list!

Is this bug known? Start ipython -wthread

from mayavi import mlab

Add an array source (pick your favourite data for phi0):

mlab.pipeline.scalar_field(phi0.T, name="phi", transpose_input_array=False)

Go to the pipeline window (open mlab.figure() first, if necessary), click the 
"Add module or filter"-item ON THE PIPELINE (this is crucial)

Doubleclick on Isosurface

Get a SIGSEGV.

This does NOT happen if I use the toolbar buttons to add the Isosurface module 
or if I add them from command line.

Also, the same does NOT happen on 4.0.0 (it does not have that "Add module or 
filter"-item at all).

Cheers,
Juha

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
(Continue reading)

Konrad Hinsen | 15 Mar 15:40 2012
Picon

Packaging a MayaVi-based application using py2app

Is there any published example of how to package an application using 
MayaVi for MacOS X using py2app? We are trying and having lots of problems 
due to the convoluted import trickery used by the enthought libraries.

Thanks in advance,
  Konrad.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Michele Mattioni | 20 Mar 19:20 2012
Picon

Is ConfigObj really optional?

Dear list,

according to Mayavi docs
http://github.enthought.com/mayavi/mayavi/installation.html#requirements-for-manual-installs
configobj is considered optional, however one of my user got stacked
with the error  ImportError: No module named configobj

I can always manage as a dep of my program, but I think this could be
added to Mayavi directly, unless there are some reasons that are right
now escaping me!

Cheers,
Michele.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Andreas | 21 Mar 03:54 2012
Picon

How to use tube 'radius factor'?

Hello,

This is related to this topic (but more specific): 
http://sourceforge.net/mailarchive/message.php?msg_id=28491509

After plotting tubes from a python script, when I enter the pipeline 
editor, under "Edit TubeFilter properties" there is a property "Radius 
factor" which seems to default to 10.0. However this seems to inflate 
smaller radii visually if radius varies by scalar. A "Radius factor" of 
100 seems to more closely reflect the relative scalar values visually 
(i.e. 0.1 gives a tube ten times as thin as 1). Is this correct?

Secondly: how can I set this radius factor from within my python script?

Thank you,

Andreas

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Gael Varoquaux | 21 Mar 07:03 2012

Re: How to use tube 'radius factor'?

On Wed, Mar 21, 2012 at 02:54:34AM +0000, Andreas wrote:
> After plotting tubes from a python script, when I enter the pipeline 
> editor, under "Edit TubeFilter properties" there is a property "Radius 
> factor" which seems to default to 10.0. However this seems to inflate 
> smaller radii visually if radius varies by scalar. A "Radius factor" of 
> 100 seems to more closely reflect the relative scalar values visually 
> (i.e. 0.1 gives a tube ten times as thin as 1). Is this correct?

I am not sure what you mean. If you want absolute and not relative
scaling of the tube radius, there is an option somewhere that says
someting like 'scale radius by absolute scalar'. That might help.

> Secondly: how can I set this radius factor from within my python script?

First, if you are using 'tubes' via an mlab.plot3d command, there is a
'tube_radius' keyword argument that should control it.

Second, in general when you know how to set something in the GUI and want
to find out how to set it in a script, you can use the record feature, as
described on:
http://github.enthought.com/mayavi/mayavi/mlab_changing_object_looks.html#changing-object-properties-interactively

HTH,

Gael

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
(Continue reading)

Andreas | 21 Mar 17:23 2012
Picon

Re: How to use tube 'radius factor'?

Thanks Gaël!

With the record feature, I got this working now (edges_src is obtained 
along the lines of code you posted earlier):

         tubes = mlab.pipeline.tube(edges_src)
         tubes.filter.vary_radius = 'vary_radius_by_scalar'
         tubes.filter.radius = 0.00025
         tubes.filter.radius_factor = 100

I tried 'scale radius by absolute scalar' at some point, but that 
ignores the 'radius' value (e.g. the .00025 above). I suppose that's as 
intended, but it's not what I need. I do need scaling. But my impression 
is that scaling does not necessarily work linearly, depending on 
'radius_factor'. Roughly speaking, radius_factor = 100 gives linear 
scaling; radius_factor = 10 scales low scalar values less 'aggressively' 
(i.e. thin tubes show not quite as thinly); radius_factor < 1 inverts 
the relationship and makes high scalars give /thinner/ tubes than low 
scalars. It would be good to know how this is intended to work precisely 
though.

In the same scene I also have a VectorScatter of cylinder glyphs 
obtained with

         cyls = mlab.quiver3d( posx, posy, posz, dirx, diry, dirz,
                                 scalars = edge_scalar,
                                 scale_mode = 'scalar',
                                 scale_factor = 0.05,
                                 mode = 'cylinder',
                                 resolution = 10,
(Continue reading)

Gael Varoquaux | 21 Mar 17:27 2012

Re: How to use tube 'radius factor'?

On Wed, Mar 21, 2012 at 04:23:18PM +0000, Andreas wrote:
> But my impression is that scaling does not necessarily work linearly,

It is affine, not linear. I.e you don't control the offset. If you want
to set the scaling factor but not have an offset, you'll need to use the
'scale radius by absolute scalar' and scale the scalars that you pass in
with the constant adjustment factor that you need.

That's the only simple way I can see to achieve your needs.

HTH,

Gael

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Andreas | 21 Mar 17:31 2012
Picon

Re: How to use tube 'radius factor'?

Actually, regarding:

> From the help page it looks like the record button should appear in 
> the 'Mayavi pipeline' window. It doesn't for me -- in fact the whole 
> toolbar with the 'create a new scene' etc. buttons is missing. Is this 
> because I'm using an older version (Mayavi 3.3.0) or is there an 
> error? (I still managed to do recording by saving my objects from the 
> pipeline window and then importing them in a separate full Mayavi GUI, 
> where the toolbar does show normally.)

Looks like the problem only occurs when running the script from within 
Spyder, which I use as my IDE. When run from the command line, the 
toolbar appears normally.

Andreas

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Andreas | 21 Mar 19:23 2012
Picon

Re: How to use tube 'radius factor'?

On 21/03/12 16:27, Gael Varoquaux wrote:
> On Wed, Mar 21, 2012 at 04:23:18PM +0000, Andreas wrote:
>> But my impression is that scaling does not necessarily work linearly,
> It is affine, not linear. I.e you don't control the offset. If you want
> to set the scaling factor but not have an offset, you'll need to use the
> 'scale radius by absolute scalar' and scale the scalars that you pass in
> with the constant adjustment factor that you need.
>
> That's the only simple way I can see to achieve your needs.

Right - never heard about affine scaling.

Somewhat confusingly, it seems like the quiver3d cylinders do scale 
linearly (reflected by them not having a 'scale radius by absolute 
scalar' option)? I actually required a minimum radius ('offset'?) for 
the cylinder so that the smallest ones remain visible; easily enough 
done by hand too, of course.

Might be good to put details on how scaling works in the docs -- perhaps 
I missed them.

Thanks a lot!

Andreas

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
(Continue reading)

Andreas | 22 Mar 21:12 2012
Picon

Question on Mayavi scene in interactive GUI

Hello,

How would something like https://mail.enthought.com/pipermail/enthought-dev/2011-November/030194.html

integrate with http://github.enthought.com/mayavi/mayavi/auto/example_mlab_interactive_dialog.html   ?

E.g. to have a slider control node size via node_size.

In

self.plot=self.scene.mlab.plot3d(x,y,z,t,tube_radius=0.025,colormap='Spectral')

plot3d returns a pipeline. I have a variant of plot_graph (from the first link) placed in its own imported module, and call it with something like m3Dg.plot_graph(). What should this return for the output to be assignable to self.plot, given that it plots a number of separate things (tubes, nodes, etc.)? Or does that not make sense - would m3Dg.plot_graph() output a scene rather than a plot?

One could perhaps call each of the things plotted by plot.graph() separately. But then you would lose the nice packaging away of plot_graph() in its own module; and also, what would each of the return values be assigned to? I imagine self.plot can only be one thing?

Sorry if my question is confused, it's a bit overwhelming.

thanks,

Andreas
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Gmane