Changeset 567 for mystic/scripts
- Timestamp:
- 09/21/12 15:17:14 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mystic/scripts/support_hypercube.py
r499 r567 52 52 metavar="INT",default=None, 53 53 help="id # of the nth simultaneous points to plot") 54 parser.add_option("-s","--scale",action="store",dest="scale",\ 55 metavar="FLOAT",default=1.0, 56 help="multiplier for scaling color of points in plot") 54 57 parser.add_option("-f","--flat",action="store_true",dest="flatten",\ 55 58 default=False,help="show selected iterations in a single plot") … … 106 109 except: 107 110 id = None # i.e. 'all' **or** use id=0, which should be 'best' energy ? 111 112 try: # scale the color in plotting the weights 113 scale = float(parsed_opts.scale) 114 except: 115 scale = 1.0 # color = color**scale 108 116 109 117 # ensure all terms of bounds and xyz are tuples … … 202 210 203 211 # build all the plots 204 from numpy import inf 212 from numpy import inf, e 213 scale = e**(scale - 1.0) 205 214 for v in range(len(steps)): 206 215 if len(steps[v]) > 1: qp = float(max(steps[v])) 207 216 else: qp = inf 208 217 for s in steps[v]: 209 t = str(s/qp) # dot color determined by number of simultaneous iterations 218 # dot color determined by number of simultaneous iterations 219 t = str((s/qp)**scale) 210 220 for i in eval("[params[q][%s] for q in xyz[0]]" % s): 211 221 for j in eval("[params[q][%s] for q in xyz[1]]" % s):
Note: See TracChangeset
for help on using the changeset viewer.