Changeset 561
- Timestamp:
- 09/17/12 10:29:41 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mystic/scripts/support_hypercube_measures.py
r499 r561 59 59 metavar="INT",default=None, 60 60 help="id # of the nth simultaneous points to plot") 61 parser.add_option("-s","--scale",action="store",dest="scale",\ 62 metavar="FLOAT",default=1.0, 63 help="multiplier for scaling color of weights in plot") 61 64 parser.add_option("-f","--flat",action="store_true",dest="flatten",\ 62 65 default=False,help="show selected iterations in a single plot") … … 114 117 except: 115 118 id = None # i.e. 'all' **or** use id=0, which should be 'best' energy ? 119 120 try: # scale the color in plotting the weights 121 scale = float(parsed_opts.scale) 122 except: 123 scale = 1.0 # color = color**scale 116 124 117 125 # ensure all terms of bounds and xyz are tuples … … 219 227 steps = [list(flatten(steps))] 220 228 229 # adjust for logarithmic scaling of intensity 230 from numpy import e 231 scale = e**(scale - 1.0) 232 221 233 # dot color is based on a product of weights 222 234 t = [] … … 227 239 for j in eval("[params[q][%s] for q in wxyz[1]]" % s): 228 240 for k in eval("[params[q][%s] for q in wxyz[2]]" % s): 229 t[v].append([str( 1.0 - i[q]*j[q]*k[q]) for q in range(len(i))])241 t[v].append([str((1.0 - i[q]*j[q]*k[q])**scale) for q in range(len(i))]) 230 242 if float(t[v][-1][-1]) > 1.0 or float(t[v][-1][-1]) < 0.0: 231 243 raise ValueError, "Weights must be in range 0-1. Check normalization and/or assignment."
Note: See TracChangeset
for help on using the changeset viewer.