def _or_tuning_curve_window(self): """ Open a Tuning Curve plot for the unit currently identified by a right click. """ if 'plot' in self._right_click_info: plot = self._right_click_info['plot'] sheet = topo.sim[plot.plot_src_name] center_x,center_y=self._right_click_info['coords'][1] r,c = self._right_click_info['coords'][0] try: from topo.command.pylabplot import cyclic_tuning_curve cyclic_tuning_curve(x_axis="orientation",coords=[(center_x,center_y)],sheet=sheet) except AttributeError: topo.sim.warning("No orientation tuning curve measurements are available yet for sheet %s; run the Orientation Tuning (Fullfield) command and try again."%sheet.name)
def rf_analysis(): import topo import pylab import topo.analysis.vision import contrib.jacommands from topo.command.analysis import save_plotgroup from topo.base.projection import ProjectionSheet from topo.sheet import GeneratorSheet from topo.command.analysis import measure_or_tuning_fullfield, measure_or_pref from topo.command.pylabplot import cyclic_tuning_curve from param import normalize_path if(float(topo.sim.time()) <=20010): save_plotgroup("Orientation Preference") save_plotgroup("Activity") # Plot all projections for all measured_sheets measured_sheets = [s for s in topo.sim.objects(ProjectionSheet).values() if hasattr(s,'measure_maps') and s.measure_maps] for s in measured_sheets: for p in s.projections().values(): save_plotgroup("Projection",projection=p) prefix="WithGC" measure_or_tuning_fullfield() s=topo.sim["V1"] cyclic_tuning_curve(filename_suffix=prefix,filename="OrientationTC:V1:[0,0]",sheet=s,coords=[(0,0)],x_axis="orientation") cyclic_tuning_curve(filename_suffix=prefix,filename="OrientationTC:V1:[0.1,0.1]",sheet=s,coords=[(0.1,0.1)],x_axis="orientation") cyclic_tuning_curve(filename_suffix=prefix,filename="OrientationTC:V1:[-0.1,-0.1]",sheet=s,coords=[(-0.1,-0.1)],x_axis="orientation") cyclic_tuning_curve(filename_suffix=prefix,filename="OrientationTC:V1:[0.1,-0.1]",sheet=s,coords=[(0.1,-0.1)],x_axis="orientation") cyclic_tuning_curve(filename_suffix=prefix,filename="OrientationTC:V1:[-0.1,0.1]",sheet=s,coords=[(-0.1,0.1)],x_axis="orientation") else: topo.command.activity_history = numpy.concatenate((contrib.jacommands.activity_history,topo.sim["V1"].activity.flatten()),axis=1) if(float(topo.sim.time()) == 20000): topo.sim["V1"].plastic=False contrib.jacommands.homeostatic_analysis_function() if(float(topo.sim.time()) == 20001): pylab.figure()
def rf_analysis(): import topo import pylab import topo.analysis.vision import contrib.jacommands from topo.command.analysis import save_plotgroup from topo.base.projection import ProjectionSheet from topo.sheet import GeneratorSheet from topo.command.analysis import measure_or_tuning_fullfield, measure_or_pref from topo.command.pylabplot import cyclic_tuning_curve from param import normalize_path if (float(topo.sim.time()) <= 20010): save_plotgroup("Orientation Preference") save_plotgroup("Activity") # Plot all projections for all measured_sheets measured_sheets = [ s for s in topo.sim.objects(ProjectionSheet).values() if hasattr(s, 'measure_maps') and s.measure_maps ] for s in measured_sheets: for p in s.projections().values(): save_plotgroup("Projection", projection=p) prefix = "WithGC" measure_or_tuning_fullfield() s = topo.sim["V1"] cyclic_tuning_curve(filename_suffix=prefix, filename="OrientationTC:V1:[0,0]", sheet=s, coords=[(0, 0)], x_axis="orientation") cyclic_tuning_curve(filename_suffix=prefix, filename="OrientationTC:V1:[0.1,0.1]", sheet=s, coords=[(0.1, 0.1)], x_axis="orientation") cyclic_tuning_curve(filename_suffix=prefix, filename="OrientationTC:V1:[-0.1,-0.1]", sheet=s, coords=[(-0.1, -0.1)], x_axis="orientation") cyclic_tuning_curve(filename_suffix=prefix, filename="OrientationTC:V1:[0.1,-0.1]", sheet=s, coords=[(0.1, -0.1)], x_axis="orientation") cyclic_tuning_curve(filename_suffix=prefix, filename="OrientationTC:V1:[-0.1,0.1]", sheet=s, coords=[(-0.1, 0.1)], x_axis="orientation") else: topo.command.activity_history = numpy.concatenate( (contrib.jacommands.activity_history, topo.sim["V1"].activity.flatten()), axis=1) if (float(topo.sim.time()) == 20000): topo.sim["V1"].plastic = False contrib.jacommands.homeostatic_analysis_function() if (float(topo.sim.time()) == 20001): pylab.figure()