Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pedagogic advice needed

1 view
Skip to first unread message

Jerzy Karczmarczuk

unread,
Jun 19, 2002, 5:21:57 AM6/19/02
to
Dear Snake Charmers,

I am going to teach to some biology students (a branch called here
"neurosciences"; you may speculate yourself what kind of computation
proficiency they need...) -

- a comp. sci. course under a buzzword title "Scientific programming".
The plan was to use Matlab as the main vehicle.
Then after a while it was clear that in order to give to *all* students
the possibility to work at home, we need a free programming package, so
the idea was to use SciLab.

Then I began to digest all that, and the obvious question was: why not
Python?

==

My questions are:

1. Does anybody here have some teaching experience in a similar context?
2. Assuming that the visualisation issues, all kind of plots, graphs
*and animations* are very important, how would you organize with
Python such a work?

Of course I know Numeric Python, Scientific Python modules, and other
standard stuff permitting to do all kind of graphic exercices and
demonstrations (eg., all the wx bazar).

But I *must* avoid the low-level programming, we won't have time for that.
We will need a reasonable complete scientific 3D plotting package usable
by people without too much experience. I plan to do some non-trivial prog-
ramming with rich data structures (otherwise I would stick to Scilab), but
a decent *integrated* scientific library, I mean: a framework, not just a
set of - powerful but rather atomic - procedures, would be quite useful.

(I checked the Obvious Suspects, the Vault of Parnassus, etc., I am veryfing
all that stuff, but perhaps some of you know something really succulent and
full of vitamines. I need *your experience*, NOT just standard Web links.)

Thank you in advance.

Jerzy Karczmarczuk
Caen, France

Fernando Pérez

unread,
Jun 19, 2002, 1:44:48 PM6/19/02
to
Jerzy Karczmarczuk wrote:

> Then I began to digest all that, and the obvious question was: why not
> Python?

Indeed :)

> 1. Does anybody here have some teaching experience in a similar context?

I've been invited to give a talk to a similar group of biology students, at
the end of the course, and have also given informal talks on 'python for
science' to mathematicians. My topic for the biologists was C/python
integration, but the whole course was given to a mix of graduate/undergrads
with no computing background. I've spoken a fair bit to the professor and his
experience (even though this was his first time teaching it) seems to have
been very positive.

You can find more about his course at: http://mcdb.colorado.edu/courses/6440/


> 2. Assuming that the visualisation issues, all kind of plots, graphs
> *and animations* are very important, how would you organize with
> Python such a work?

For this kind of work, my current solution is using python/Numeric for the
matlab-like numerical work, with Gnuplot for normal 2d/3d plotting (I have
available a customized interface for Gnuplot access which runs on top of M.
Haggerty's Gnuplot.py -- http://www-heller.harvard.edu/~mhagger/download/).
This works very well for all kinds of 'typical' scientific plotting needs.

For fancier 3d visualization needs (isosurfaces of functions of 3 variables,
volume rendering, etc) I use the amazing MayaVi
(http://mayavi.sourceforge.net/). It's a full featured GUI visualizer, but
all written in python and scriptable 'from inside'. With it you'll also get
ivtk, a very nice system for interactive use of VTK.

Here are a few quick examples of what mayavi can do (from my own stuff,
there's plenty more out there):

http://windom.colorado.edu/~fperez/pub/topo_viz_sample.jpg -> isosurfaces and
colormap cut planes (with and without transparency) of a 3-d slice of a 4-d
dataset.

http://windom.colorado.edu/~fperez/pub/topo_vol_ray.jpg -> a fancy ray-traced
volume rendering of one 3-d slice. This kind of rendering is SLOW, but gives
pretty pictures :) You have to write your own translucency tables obviously,
and that takes some experimenting. You can grab from there the code to make
that image if you want to play with it
(http://windom.colorado.edu/~fperez/pub/vtk_volume.tgz)

http://windom.colorado.edu/~fperez/pub/topo_2412.b585m008.36.1000.slices/ ->
the full 4-d dataset sliced into a webpage. The html generation code is about
15-20 lines of very simple python. It's a very convenient way of visualizing
complex datasets and automatically sharing the results with ohters: all they
need is a web browser.


> Of course I know Numeric Python, Scientific Python modules, and other
> standard stuff permitting to do all kind of graphic exercices and
> demonstrations (eg., all the wx bazar).

Do you know about SciPy ()? It is a complete 'framework' that wraps around
Numeric to provide very impressive overall functionality.

> But I *must* avoid the low-level programming, we won't have time for that.
> We will need a reasonable complete scientific 3D plotting package usable
> by people without too much experience.

If someone is there to do the install for them, I'd say scipy could satisfy
your needs. Installing it is a major chore right now, but once up and running
it works very well. You need to run off of CVS though, all releaseed code is
outdated now.

> (I checked the Obvious Suspects, the Vault of Parnassus, etc., I am veryfing
> all that stuff, but perhaps some of you know something really succulent and
> full of vitamines. I need *your experience*, NOT just standard Web links.)

Well, besides the above, I would plug here my own project IPython
(http://windom.colorado.edu/~fperez/ipython/). It's a command-line shell much
more powerful than the default one, with many features specifically designed
for scientific computing work (inspired/stolen from environments like
Mathematica and IDL). If you install it and start 'ipython -p numeric'
(assuming you have both Numeric and Gnuplot.py installed), you'll have an
environnment very much like Matlab. Its gnuplot access functions are enhanced
versions of the originals in Gnuplot.py, to make day to day plotting easier
(I use it constantly, so I do eat my own dog food :)

I use IPython everyday for exactly the kind of thing you have in mind, so
I've tuned it to be as convenient as possible in that kind of environment. If
you are interested in using it, I'll be glad to help you out with any snags
you encounter.

Cheers,

f.

Aahz

unread,
Jun 19, 2002, 3:22:29 PM6/19/02
to
In article <3D104D35...@info.unicaen.fr>,

Jerzy Karczmarczuk <kar...@info.unicaen.fr> wrote:
>
>I am going to teach to some biology students (a branch called here
>"neurosciences"; you may speculate yourself what kind of computation
>proficiency they need...) -

From http://www.python.org/doc/Newbies.html
you will find "Bioinformatics course in Python"
at http://www.pasteur.fr/recherche/unites/sis/formation/python/

I imagine you might even be able to find some documentation in French.
--
Aahz (aa...@pythoncraft.com) <*> http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/

Travis N. Vaught

unread,
Jun 20, 2002, 12:08:09 AM6/20/02
to
Fernando Pérez <fper...@yahoo.com> wrote in message news:<aeqfuh$88n$1...@peabody.colorado.edu>...
<snip>

> If someone is there to do the install for them, I'd say scipy could satisfy
> your needs. Installing it is a major chore right now, but once up and running
> it works very well. You need to run off of CVS though, all releaseed code is
> outdated now.
>
<snip>

Actually, nightly builds (with a test scoreboard) are creating
downloadable binaries (from the cvs) that make installation _much_
nicer. You still need Numeric and wxPython, but windows installs
(;)), at least, are quite simple now.

Check it out:

http://www.scipy.org/site_content/download_list
http://www.scipy.org/site_content/scoreboard

Jerzy Karczmarczuk

unread,
Jun 20, 2002, 4:56:01 AM6/20/02
to
In my previous posting I asked about your experience
in teaching scientific programming/visualization in
Python (my case: to biologists, but this is not as relevant).

Thank you very much folks for all your helpful answers,
on this nsgroup and privately. I would just like to point
out that answers such as this and similar, often found
here:

Aahz wrote:


sometimes slightly miss the target. Of course I *AM GRATEFUL* to
Aahz Maruch, a known specialist, and I accept all help offered (I
am quite far from the sad hero of the thread named "Python version"),
but, believe me, sometimes people really need concrete, personal
experience, not just links to tutorials. I am not blaming Aahz, of
course, he couldn't guess what did I really need. The course of Katja
Schuerer and Catherine Letondal (which I recommend to many newcomers)
is an introductory course treating Python as a programming language,
with examples oriented towards biology. I needed a dense, shock
material, explicitly application-driven, and with a good deal of
visualization examples, absent from the cited course. Once more:
I asked for your personal experience (mine isn't so bad, about
30 years of teaching...)

OK, I will look closer at SciPy, and the sources kindly mentioned
by Fernando Pérez.

As you know, the "scientific" (in the restricted sense) community
is interested in Python for years, yet in the huge Python FAQ,
especially in the section 'Real World' there is almost nothing
about this, God knows why... [[Anyway, people who are managing
this FAQs: http://www.python.org/doc/FAQ.html perhaps would one
day wish to update some links, eg. the first link pointing to docs:
http://www.pythonlabs.com/tech/python2.0/doc which points nowhere]].

> I imagine you might even be able to find some documentation in French.

Oh, yessir, indeed, thank you for this helpful hint. Merci beaucoup et
dziekuje bardzo in my native tongue as well.


Jerzy Karczmarczuk
Caen, France

Fernando Pérez

unread,
Jun 20, 2002, 12:53:25 PM6/20/02
to
Travis N. Vaught wrote:

> Actually, nightly builds (with a test scoreboard) are creating

> downloadable binaries (from the cvs) that make installation much


> nicer.  You still need Numeric and wxPython, but windows installs
> (;)), at least, are quite simple now.

Sorry Travis. Goes to show that I haven't built recently since the new
nightlies system was put in place. My apologies for the misinformation.

cheers,

f.

0 new messages