Structured grids in scalar fields

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Structured grids in scalar fields

Alistair McGann
Hello all,

I've been having difficulty with understanding how the indices of the structured grids work, especially when embedded within scalar field sources. I've seen a few examples where structured grids have been used in the docs, but I haven't really come across a guide as to how to set up non-Cartesian sources. My current problem is that I've a 516*64*64 grid of data points (as 64 planes of 516*64 points), and I need those planes to be spaced out around a cylinder. (Think opening a book and spreading the pages out)

I have had some success with using similar code to the examples in the docs, by setting up a structured grid and adding scalars to the points of that grid, but the way the grid has to be set out is unintuitive to me, and I don't seem to be able to add a volume like with mlab.scalar_field, which is what I require.

In essence, my question is 'How do you set up the x,y,z,s arguments of the scalar field source?'

Thank you very much,
Alistair McGann


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

[Traits4][TreeEditor] Problem with a model which implements __iter__

Giraudon Cyril
Hello,

I 'am using traitsui 4.2.0 with python 2.7 on windows7/ubuntu 10.04 and I observe the same behaviour with the TreeEditor when the model implements the method __iter__.

Consider the example at http://pastebin.com/r7g8nTRc

It is a simple hierarchical model : a Root object with a tree of SItem(s).
SItem has a name property.

The example hierarchy is :
Root
 A
  AA
  AB

A do_Select_A action permits to select the SItem A.

When SItem does not implement __iter__, all works fine, A is selected when do_Select_A fires.
When SI implements __iter__, selected item is not correct, children are selected instead of the parent.
(AA and AB are selected instead of A).

Please, can this issue be considered as bug or do I have to modify my code ?

Thanks a lot,

Cyril.


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Traits4][TreeEditor] Problem with a model which implements __iter__

Giraudon Cyril
Hello,

Some more details :

The backend is PyQt with PyQt4-4.9.4 (win7).

Thanks a lot,

Cyril.




Le 20/09/2012 19:00, Cyril Giraudon a écrit :
Hello,

I 'am using traitsui 4.2.0 with python 2.7 on windows7/ubuntu 10.04 and I observe the same behaviour with the TreeEditor when the model implements the method __iter__.

Consider the example at http://pastebin.com/r7g8nTRc

It is a simple hierarchical model : a Root object with a tree of SItem(s).
SItem has a name property.

The example hierarchy is :
Root
 A
  AA
  AB

A do_Select_A action permits to select the SItem A.

When SItem does not implement __iter__, all works fine, A is selected when do_Select_A fires.
When SI implements __iter__, selected item is not correct, children are selected instead of the parent.
(AA and AB are selected instead of A).

Please, can this issue be considered as bug or do I have to modify my code ?

Thanks a lot,

Cyril.



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev