Пример #1
0
    def get_altered_circuit_params(self, circ, label):
        """Returns dictionary of parameter which are derived from 
        parameter associated to circuit.

        Arguments:
        circ: instance of Circuit() class
        label: string specifying the circuit
        """
        new_vars = {}
        if label == 'microcircuit':
            params = pc.get_dependend_params_microcircuit(circ.params)
        else:
            raise RuntimeError('Parameter file missing for label.')
        new_vars['param_hash'] = pc.create_hashes(params, circ.param_keys)
        new_vars['params'] = params
        return new_vars
Пример #2
0
    def get_altered_circuit_params(self, circ, label):
        """Returns dictionary of parameter which are derived from
        parameter associated to circuit.

        Arguments:
        circ: instance of Circuit() class
        label: string specifying the circuit
        """
        new_vars = {}
        if label == 'microcircuit':
            params = pc.get_dependend_params_microcircuit(circ.params)
        else:
            raise RuntimeError('Parameter file missing for label.')
        new_vars['param_hash'] = pc.create_hashes(params, circ.param_keys)
        new_vars['params'] = params
        return new_vars
Пример #3
0
    def get_circuit_params(self, circ, new_params):
        """Returns dictionary with variables describing the circuit 
        parameter. The default parameter are specified in 
        params_circuit.py and overwritten by new_params.

        Arguments:
        circ: instance of Circuit() class
        new_params: parameter dictionary, used to overwrite default 
                    parameter specified in params_circuit.py
        label: string specifying the circuit parameter (listed in
               corresponding parameter dictionary in params_circuit.py)
        """
        new_vars = {}
        if circ.label == 'microcircuit':
            params, param_keys = pc.get_data_microcircuit(new_params)
            new_vars['param_keys'] = param_keys
            new_vars['param_hash'] = pc.create_hashes(params, param_keys)
        else:
            raise RuntimeError('Parameter file missing for label.')
        new_vars['params'] = params
        return new_vars
Пример #4
0
    def get_circuit_params(self, circ, new_params):
        """Returns dictionary with variables describing the circuit
        parameter. The default parameter are specified in
        params_circuit.py and overwritten by new_params.

        Arguments:
        circ: instance of Circuit() class
        new_params: parameter dictionary, used to overwrite default
                    parameter specified in params_circuit.py
        label: string specifying the circuit parameter (listed in
               corresponding parameter dictionary in params_circuit.py)
        """
        new_vars = {}
        if circ.label == 'microcircuit':
            params, param_keys = pc.get_data_microcircuit(new_params)
            new_vars['param_keys'] = param_keys
            new_vars['param_hash'] = pc.create_hashes(params, param_keys)
        else:
            raise RuntimeError('Parameter file missing for label.')
        new_vars['params'] = params
        return new_vars