featuremapper/__init__.py
def _update(self, p, responses):
        """
        Updates featureresponses object with latest reverse correlation data.
        """
        timestamp = self.metadata['timestamp']
        for in_label in self.metadata.inputs:
            for out_label, output_metadata in self.metadata.outputs.items():
                for d in p.durations:
                    rows, cols, _ = self._compute_roi(p, output_metadata)
                    in_response = responses[(in_label, d)]
                    out_response = responses[(out_label, d)]
                    feature_responses = self._featureresponses[in_label][out_label][d]
                    for i, ii in enumerate(rows):
                        for j, jj in enumerate(cols):
                            delta_rf = out_response[ii, jj] * in_response
                            feature_responses[i, j] += delta_rf
                    if p.store_responses:
                        key = (timestamp, d, self.n_permutation)
                        bounds = output_metadata['bounds']
                        self._responses[out_label][key] = Image(out_response.copy(), bounds=bounds,
                                                                group='Response',
                                                                label=out_label)
                        self._responses[in_label][key] = Image(in_response.copy(), bounds=bounds,
                                                               group='Response',
                                                               label=in_label)

        Updates featureresponses object with latest reverse correlation data.
        
Updates featureresponses object with latest reverse correlation data.
Updates featureresponses object with latest reverse correlation data .
def _update(self, p, responses):
        timestamp = self.metadata['timestamp']
        for in_label in self.metadata.inputs:
            for out_label, output_metadata in self.metadata.outputs.items():
                for d in p.durations:
                    rows, cols, _ = self._compute_roi(p, output_metadata)
                    in_response = responses[(in_label, d)]
                    out_response = responses[(out_label, d)]
                    feature_responses = self._featureresponses[in_label][out_label][d]
                    for i, ii in enumerate(rows):
                        for j, jj in enumerate(cols):
                            delta_rf = out_response[ii, jj] * in_response
                            feature_responses[i, j] += delta_rf
                    if p.store_responses:
                        key = (timestamp, d, self.n_permutation)
                        bounds = output_metadata['bounds']
                        self._responses[out_label][key] = Image(out_response.copy(), bounds=bounds,
                                                                group='Response',
                                                                label=out_label)
                        self._responses[in_label][key] = Image(in_response.copy(), bounds=bounds,
                                                               group='Response',
                                                               label=in_label)
def _update ( self , p , responses ) : timestamp = self . metadata [ 'timestamp' ] for in_label in self . metadata . inputs : for out_label , output_metadata in self . metadata . outputs . items ( ) : for d in p . durations : rows , cols , _ = self . _compute_roi ( p , output_metadata ) in_response = responses [ ( in_label , d ) ] out_response = responses [ ( out_label , d ) ] feature_responses = self . _featureresponses [ in_label ] [ out_label ] [ d ] for i , ii in enumerate ( rows ) : for j , jj in enumerate ( cols ) : delta_rf = out_response [ ii , jj ] * in_response feature_responses [ i , j ] += delta_rf if p . store_responses : key = ( timestamp , d , self . n_permutation ) bounds = output_metadata [ 'bounds' ] self . _responses [ out_label ] [ key ] = Image ( out_response . copy ( ) , bounds = bounds , group = 'Response' , label = out_label ) self . _responses [ in_label ] [ key ] = Image ( in_response . copy ( ) , bounds = bounds , group = 'Response' , label = in_label )
Updates featureresponses object with latest reverse correlation data.
Updates featureresponses object with latest reverse correlation data .
"""
        Updates featureresponses object with latest reverse correlation data.
        """
self
p
responses