Make a spatial gradient in diffusion or bias, along a specific dimension, given by grad['dim'].
The number of steps on the gradient is given by grad['step_num'].
The gradient can be in diffusion with diff_grad or bias_grad. min and max give the extrema of the gradient, and bias_grad['dim'] give the dimension along the gradient in bias is applied.
An overall constant bias can be passed by bias_basis.