Changeset 790


Ignore:
Timestamp:
06/04/15 09:15:26 (12 months ago)
Author:
mmckerns
Message:

ensemble solvers add self.id to solver.id in self._map;
allow slice iter of trajectories on mystic_model_plotter

Location:
mystic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mystic/mystic/ensemble.py

    r785 r790  
    141141        vb = [verbose for i in range(len(initial_values))] 
    142142        cb = [echo for i in range(len(initial_values))] #XXX: remove? 
    143         id = range(len(initial_values)) 
     143        at = self.id if self.id else 0  # start at self.id 
     144        id = range(at,at+len(initial_values)) 
    144145 
    145146        # generate the local_optimize function 
     
    327328        vb = [verbose for i in range(len(initial_values))] 
    328329        cb = [echo for i in range(len(initial_values))] #XXX: remove? 
    329         id = range(len(initial_values)) 
     330        at = self.id if self.id else 0  # start at self.id 
     331        id = range(at,at+len(initial_values)) 
    330332 
    331333        # generate the local_optimize function 
  • mystic/scripts/mystic_model_plotter.py

    r776 r790  
    355355                      help="id # of the nth simultaneous points to plot") 
    356356    parser.add_option("-i","--iter",action="store",dest="stop",\ 
    357                       metavar="INT",default=None, 
    358                       help="the largest iteration to plot") 
     357                      metavar="STR",default=":", 
     358                      help="string for smallest:largest iterations to plot") 
    359359    parser.add_option("-r","--reduce",action="store",dest="reducer",\ 
    360360                      metavar="STR",default="None", 
     
    442442 
    443443    try: # select which iteration to stop plotting at 
    444       stop = int(parsed_opts.stop) 
    445     except: 
    446       stop = None 
     444      stop = parsed_opts.stop  # format is "1:10:1" 
     445      stop = stop if ":" in stop else ":"+stop 
     446    except: 
     447      stop = ":" 
    447448 
    448449    ################################################# 
     
    520521           #px = p[int(s)] # draw_projection requires one parameter 
    521522           ## ignore everything after 'stop' 
    522            #_c = c[:stop] 
    523            #_x = px[:stop] 
     523           #_c = eval('c[%s]' % stop) 
     524           #_x = eval('px[%s]' % stop) 
    524525           #fig0 = draw_projection(_x,_c, style=style, scale=scale, shift=shift, figure=fig0) 
    525526 
     
    529530            px,py = p # draw_trajectory requires two parameters 
    530531            # ignore everything after 'stop' 
    531             _x = px[:stop] 
    532             _y = py[:stop] 
    533             _c = c[:stop] if surface else None 
     532            _x = eval('px[%s]' % stop) 
     533            _y = eval('py[%s]' % stop) 
     534            _c = eval('c[%s]' % stop) if surface else None 
    534535            fig = draw_trajectory(_x,_y,_c, style=style, scale=scale, shift=shift, figure=fig) 
    535536 
Note: See TracChangeset for help on using the changeset viewer.