File: berts.py

package info (click to toggle)
python-scipy 0.3.2-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,572 kB
  • ctags: 20,326
  • sloc: ansic: 87,138; fortran: 51,876; python: 47,747; cpp: 2,134; objc: 384; makefile: 175; sh: 83
file content (38 lines) | stat: -rw-r--r-- 1,269 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright (c) 1996, 1997, The Regents of the University of California.
# All rights reserved.  See Legal.htm for full text and disclaimer.

from Numeric import *
from scipy_base.fastumath import *
from mesh3d import Mesh3d
from graph3d import Graph3d
 
def paws ( ) :
    i = raw_input ("Type in any string to continue; ^C to return to prompt. ")
    return
 
print "This is a test of the Python interface to the Limeil Lab graphics"
print "package, Narcisse. You  need Narcisse to be running. Fire it up by"
print "doing setenv PORT_SERVEUR 0, typing  /dist/basis/Narcisse/bin/Narcisse &,"
print "and then do another senetv PORT_SERVEUR to the port number which"
print "appears in the Narcisse GUI."
 
ans = raw_input ("The next graph takes a *looong* time. Want to graph it? (y/n)")

def demo () :
   from PR import PR
   f = PR ('./berts_plot')
   x = f.x
   y = f.y
   z = f.z
   c = f.c
   c_cont = f.c_cont
   m1 = Mesh3d (x = x, y = y, z = z, c = c, opt_3d = "i4",
                  c_contours_array = c_cont, mask = "none")
   g1 = Graph3d (m1, titles = "Energy Filaments, cutoff = 7.5",
                  phi = 60., theta = 45.)
   g1.plot ( )
   f.close ( )

if ( ans == "y" or ans == "Y" or ans == "yes" or
     ans == "Yes" or ans == "YES" ) :
   demo ()