Changelog
Source:NEWS.md
midi 0.2.0
CRAN release: 2026-07-05
Breaking changes
The unit system has changed from SI units (m, s, T/m) to μm, ms, and μT/μm throughout all compartment classes and helper functions.
CylinderBundleCompartment$new()no longer acceptsaxis,radius,diffusivity,n_cylinders,axis_concentration,radius_sd,radial_model, andseedarguments. It now acceptscylinder_compartments, a list ofCylinderCompartmentobjects (typically produced byrcylinders()), and infers axis, radius, and diffusivity statistics by fitting Watson and Gamma distributions to the provided compartments.CylinderCompartment$new()no longer acceptsradius,diffusivity, andradial_modelarguments. It now accepts arestricted_compartmentargument, an instance of a circularly-shaped compartment class (e.g.,VanGelderenCompartment$new()).
New features
New
bvalue()function to compute the b-value from gradient pulse parameters.New
FreeCompartmentclass to model free unconstrained diffusion.New
GammaDistributionclass providingfit(),random(),get_mean(),get_variance(),get_shape(), andget_scale()methods.New
rcylinders()function to sample a list ofCylinderCompartmentobjects from Watson (axis) and Gamma (radius, diffusivity) distributions.New
SphereCompartmentclass to model restricted diffusion in a sphere.New
WatsonDistributionclass providingfit(),random(),get_axis(), andget_concentration()methods.All compartment classes now expose
get_parameters()andget_parameter_names()methods inherited from the newBaseCompartmentbase class.