AtlasInitialiser#

class hypercoil.init.atlas.AtlasInitialiser(atlas: BaseAtlas, normalise: bool = False, max_bin: int = 10000, spherical_scale: float = 1.0, truncate: float | None = None, kernel_sigma: float | None = None, noise_sigma: float | None = None, mapper: Type[MappedParameter] | None = None)[source]#

Voxel-to-label mapping initialisation.

Initialise a tensor dictionary such that its entries characterise a set of matrices that each map a relevant subset of image voxels to a set of labels. The initialisation can use a previously existing atlas, instantiated as a subclass of BaseAtlas with the option of blurring labels using pointwise spatial convolution or injecting noise.

Parameters:
atlasAtlas object

Atlas object to use for tensor initialisation.

normalisebool (default False)

Indicates that maps should be spatially normalised such that the sum over all assignments to a parcel is equal to 1. When the map is used as a linear transformation, this option results in computation of a weighted average over each parcel.

kernel_sigmafloat or None (default None)

If this is not None, then spatial smoothing using a Gaussian kernel is applied over each parcel’s assignments. Distances are established by the atlas’s coordinate system and the topology of each compartment. The value of sigma establishes the width of the Gaussian kernel.

noise_sigmafloat or None (default None)

If this is not None, then Gaussian noise with the specified standard deviation is added to each label.

Attributes:
kernel_sigma
noise_sigma
truncate

Methods

__call__(model, *[, where])

Call self as a function.

init(model, *[, mapper, normalise, max_bin, ...])

Initialise a parameter using the specified initialiser and mapper.

Methods Documentation

__call__(model: PyTree, *, where: str | Callable = 'weight', key: PRNGKey, **params)[source]#

Call self as a function.