beta and repl vectors are of length \(nMesh \times nSess \times n_field\). The ith repl vector is an indicator vector for the cells corresponding to the ith column of x. The ith beta vector contains data indices (e.g. 1,...,V) in the cells corresponding to the ith column of x.
make_replicates(nSess, field_names, spatial)
replicates vector and betas for sessions
The number of sessions sharing hyperparameters (can be different fields)
Vector of names for each field
Spatial info