Beispiel #1
0
    def get_intra_network_conductances(self, conn_list_fn=None):
        # calculate the (mean, std) conductances between different groups of neurons
        # good (g) -> good
        # g -> rest (r)
        # r -> g
        # r -> r
        # g -> inh
        # r -> inh
        # all exc -> inh
        # inh -> all exc
        # inh -> r
        # inh -> g

        if conn_list_fn == None:
            conn_list_fn = self.params['merged_conn_list_ee']
        print 'utils.get_conn_dict from file:', conn_list_fn 
        self.conn_dict = utils.get_conn_dict(self.params, conn_list_fn)
        spike_fn = self.params['exc_spiketimes_fn_merged'] + '.ras'
    def __init__(self, params=None):
        if params == None:
            network_params = simulation_parameters.parameter_storage()  # network_params class containing the simulation parameters
    #        P = network_params.load_params()                       # params stores cell numbers, etc as a dictionary
            self.params = network_params.params
        else:
            self.params = params

        self.n_exc = self.params['n_exc']
        self.output = []
        self.g_in_histograms = []
        self.output_fig = self.params['conductances_fig_fn_base']
        self.n_good = self.params['n_exc'] * .05 # fraction of 'good' (well-tuned) cells
        print 'Number of \'good\' (well-tuned) cells:', self.n_good

        self.no_spikes = False

        self.load_nspikes()

        self.conn_dict = {}
        for conn_type in self.params['conn_types']:
            print 'Calling utils.get_conn_dict(..., %s)' % conn_fn
            conn_fn = self.params['conn_list_%s_fn' % conn_type]
            self.conn_dict[conn_type] = utils.get_conn_dict(self.params, conn_fn)

        fig_width_pt = 800.0  # Get this from LaTeX using \showthe\columnwidth
        inches_per_pt = 1.0/72.27               # Convert pt to inch
        golden_mean = (np.sqrt(5)-1.0)/2.0         # Aesthetic ratio
        fig_width = fig_width_pt*inches_per_pt  # width in inches
        fig_height = fig_width*golden_mean      # height in inches
        fig_size =  [fig_width,fig_height]
        params = {#'backend': 'png',
                  'axes.labelsize': 12,
#                  'text.fontsize': 14,
#                  'legend.fontsize': 10,
#                  'xtick.labelsize': 8,
#                  'ytick.labelsize': 8,
#                  'text.usetex': True,
                  'figure.figsize': fig_size}
        pylab.rcParams.update(params)
        pylab.subplots_adjust(bottom=0.30)