Did I find the right examples for you? yes no

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/n/i/nipy-0.3.0/nipy/labs/group/spatial_relaxation_onesample.py   nipy(Download)
 
from .routines import add_lines
from .displacement_field import displacement_field
 
#####################################################################################
            self.m_var_scale = m_var_scale
        if std != None:
            self.D = displacement_field(XYZ, sigma, data.shape[0], disp_mask)
        self.labels_prior = labels_prior
        self.label_values = label_values

src/n/i/nipy-0.3.0/nipy/labs/group/tests/test_displacement_field.py   nipy(Download)
import numpy as np
 
from ..displacement_field import displacement_field, gaussian_random_field
 
def make_data(n=10, dim=20, r=5, mdim=15, maskdim=20, amplitude=10, noise=1, jitter=None, activation=False):
    def test_sample_prior(self, verbose=False):
        data, XYZ, mask, XYZvol, vardata, signal = make_data(n=20, dim=20, r=3, mdim=15, maskdim=15, amplitude=5, noise=1, jitter=1, activation=True)
        D = displacement_field(XYZ, sigma=2.5, n=data.shape[0], mask=mask)
        B = len(D.block)
        for b in np.random.permutation(range(B)):
    def test_sample_rand_walk(self, verbose=False):
        data, XYZ, mask, XYZvol, vardata, signal = make_data(n=20, dim=20, r=3, mdim=15, maskdim=15, amplitude=5, noise=1, jitter=1, activation=True)
        D = displacement_field(XYZ, sigma=2.5*np.ones(3), n=data.shape[0], mask=mask)
        B = len(D.block)
        for b in np.random.permutation(range(B)):
    def test_sample_prior(self, verbose=False):
        data, XYZ, mask, XYZvol, vardata, signal = make_data(n=20, dim=20, r=3, mdim=15, maskdim=15, amplitude=5, noise=1, jitter=1, activation=True)
        D = displacement_field(XYZ, sigma=2.5, n=data.shape[0], mask=mask)
        B = len(D.block)
        for b in np.random.permutation(range(B)):
    def test_sample_all_blocks(self, verbose=False):
        data, XYZ, mask, XYZvol, vardata, signal = make_data(n=20, dim=20, r=3, mdim=15, maskdim=15, amplitude=5, noise=1, jitter=1, activation=True)
        D = displacement_field(XYZ, sigma=2.5, n=data.shape[0], mask=mask)
        for i in xrange(data.shape[0]):
            if verbose: