Example #1
0
    def zscore(self, baseline=0.0):
        """
        Return a parametric approximation of the z-score associated
        with the null hypothesis: (H0) 'contrast equals baseline'
            """  
        if self._pvalue == None or not self._baseline == baseline: 
            self._pvalue = self.pvalue(baseline)

        # Avoid inf values kindly supplied by scipy. 
        from nipy.neurospin.utils.zscore import zscore
        z = zscore(self._pvalue)        
        return z
Example #2
0
	def zscore(self, baseline=0.0):
		"""
		Return a parametric approximation of the z-score associated
		with the null hypothesis: (H0) 'contrast equals baseline'
	        """  
		if self._pvalue == None or not self._baseline == baseline: 
			self._pvalue = self.pvalue(baseline)

		# Avoid inf values kindly supplied by scipy. 
		"""
		z = sps.norm.isf(self._pvalue)
		th = z[np.where(z<np.inf)].max()
		z = np.minimum(z, int(th+1))
		"""
		from nipy.neurospin.utils.zscore import zscore
		z = zscore(self._pvalue)		
		return z