Did I find the right examples for you? yes no

# displacement_field.displacement_field

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

```
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
```

```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)
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)
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)
```    def test_sample_all_blocks(self, verbose=False):