Changelog#
Notable changes of each release. Breaking changes and deprecations follow the deprecation policy. Changes limited to the CI, the tests or the code style are left out: the GitHub release notes list every pull request.
Releases before 1.7.0 had no deprecation period: their breaking changes applied directly.
Unreleased#
Breaking changes#
The default
n_binsofcompute_svd_coefficients(),compute_mti_coefficients()andcompute_mfi_coefficients()changed from1024to-1: the number of bins is now estimated from the field map and the readout time, and empty bins are dropped (#427).The default
power_iterofespirit()andcartesian_espirit()changed from30to10, as the power iterations are now warm-started (#424).The GroupL2SoftThresholding pyproximal operator is made private and refactored in
mrinufft.trajectories._proximal(#434).
Deprecations#
Importing
DeepInvPhyNufftfrommrinufft.operators.autodiffis deprecated and will fail from 1.9.0. Import it frommrinufft.operatorsinstead (#417).
New features#
Gradient impulse response function (GIRF) correction:
read_girf,read_gradients,compute_girf_interpolatorsandapply_girf, andread_trajectory(read_pre_post_grad=True)to read the gradients outside of the ADC window (#414).mlx-nufftbackend for Apple Silicon, installed with themlx-nufftextra (#413).MRPro interface:
make_mrproexposes an operator as an MRPro linear operator (#417).Analytical density compensation for radial trajectories,
mrinufft.density.radial(#408).write_trajectory(pad_to_multiple_of_4=True)pads the gradient waveforms to a multiple of four samples (#423).The API stability and deprecation policy, and this changelog.
Improvements#
The trajectory projection supports pyproximal 0.13 (#410).
Importing
mrinufft.trajectories,mrinufft.ioormrinufft.displayno longer imports pyproximal, pylops and torch, or pypulseq and matplotlib: the functions that need them import them. Importingmrinufft.trajectoriestakes about a third of the time it did.
Fixes#
ESPIRiT gives accurate sensitivity maps again after the PISCO refactor of 1.6.0, and PISCO is warm-started and keeps single precision (#424).
With a complex (B0 + R2*) field map, the off-resonance histogram keeps the B0 resolution (#419).
The Twix affine origin is correct with slice oversampling (#429).
cufinufft waits for pending host-to-device copies before overwriting pinned sensitivity maps (#416).
The phase accrual of prephasors, and direct off-resonance interpolators, are handled correctly (#414).
mrinufft.__version__returns the installed version; it was not set.from mrinufft.trajectories import *andfrom mrinufft.io import *work: their__all__listed names the modules did not define.KMAXandcompute_coprime_factorscan now be imported frommrinufft.trajectories, andtwix2nifti_affineis exported bymrinufft.io.
1.6.0 (2026-10-29)#
Breaking changes#
The top-level
mrinufftnamespace no longer re-exports the content of its submodules (#386, #391). Import from the submodules instead:mrinufft.trajectories: the trajectory initializations (initialize_2D_radial…), the trajectory tools (stack,rotate,precess,conify,shellify,stack_spherically,duplicate_along_axes,radialize_center,oversample), the sampling densities (create_*_density,sample_from_density),AcquisitionandHardware;mrinufft.display:display_2D_trajectory,display_3D_trajectory,display_gradients,display_gradients_simplyanddisplayConfig;mrinufft.density:voronoi,cell_count,pipeandget_density;mrinufft.operators:check_backendandlist_backends.
The display functions moved from
mrinufft.trajectoriestomrinufft.display.mrinufft.trajectories.initsandmrinufft.trajectories.toolsno longer re-export their content, and themrinufft.trajectories.trajectory2D,trajectory3Danddisplay3Dcompatibility modules are removed: import frommrinufft.trajectories(#386).The Siemens hardware presets
SIEMENSare renamedSiemensGradient(#386).Several helpers became private:
voronoi_unique,normalize_weights,scaled_dcp,acq2opts,siemens_quat_to_rot_matandC_lazy(#386).espiritandcartesian_espirit(#395):kernel_width(default6) is replaced bykernel_size(default7) andkernel_shape(default"ellipsoid"); the defaultthreshchanged from0.02to0.05;cropnow bounds the gap between the eigenvalue and its ideal value (default0.08), instead of thresholding the eigenvalue (default0.95).The
dimsargument ofmrinufft.extras.cartesian.fftandifftis now required (it was3) (#395).The R2* map is subtracted from the complex field map, so that a positive R2* gives a decay; it used to be added (#404).
The slice position shifts read from Siemens data follow the X, Y, Z (sagittal, coronal, transverse) order (#404).
Siemens data are read with
turbotwixinstead ofpymapvbvd(ioextra) (#400).
New features#
Gram operator
gram_op, with a Toeplitz embedding on CPU and for the cufinufft, gpuNUFFT and torchkbnufft backends (compute_toeplitz_kernel,apply_toeplitz_kernel) (#348, #393).PISCO estimation of sensitivity maps,
piscoandcartesian_pisco(#395).Off-resonance correction for stacked operators (#404).
Logging throughout the package, configured with
mrinufft.set_log_level(#390).Complex-to-real helpers for the autodiff operators:
kspace_as_real,kspace_as_cpx,image_as_realandimage_as_cpx(#370).I/O:
read_nsp_pairfor NeuroSpin data,discard_frequency_outliers, the noise scan in the Siemens header, and the typedTwixHeaderDict(#400, #404).
Improvements#
The submodules and the heavy optional dependencies are imported lazily (#388).
cufinufft uses CUDA streams for host-device transfers, also for stacked operators (#392, #404).
Fewer array copies and a smaller memory footprint throughout (#393).
finufft uses
execute_adjointwith finufft >= 2.5.0.A warning is emitted when the Lipschitz constant does not converge (#404).
The trajectory and k-space data dtypes are matched when reading data (#404).
Fixes#
The 3D golden means radial trajectories no longer repeat every 10000 shots (#402).
The coil compression matrix had the wrong orientation (#406).
The density compensation is used correctly by LSQR and LSMR, and updated with the off-resonance operators (#404).
Stacked operators round the z positions instead of truncating them (#404).
Siemens reader: extraction of the slices and of the ACS lines, and batched shifts.
The
pipedensity compensation is real valued with finufft, and uses the backend of the operator by default.The power method works with operators other than NUFFT operators.
Documentation#
1.5.1 (2026-05-28)#
Fixes#
Recursion error with DeepInverse.
The initial guess of
cgis checked properly.Minimal
torchversion for theautodiffextra.
1.5.0 (2026-02-28)#
Breaking changes#
readout_timeis now the first, required, argument ofwith_off_resonance_correction(#337).read_siemens_rawdatno longer returns the twix object by default (return_twix=False), and its newreshapeargument comes beforereturn_twix,slice_numandcontrast_num(#349).cgno longer uses the density compensation, which is mathematically wrong for this solver (#360).
New features#
DUCC0 backend,
ducc0(#345).Cartesian operator backend,
cartesian(#355).Variable density spiral,
initialize_2D_vds_spiral, compliant with the hardware constraints (#336, #359).Projection of trajectories on the hardware constraints,
project_trajectory(#356).Autograd for the off-resonance corrected operators (#337).
Trajectories can be initialized and updated as torch tensors, and the main backends implement
update_samples(#338).
Improvements#
Fixes#
1.4.0 (2025-11-25)#
Breaking changes#
get_gradient_times_to_travelandget_gradient_amplitudes_to_travel_for_set_timeare removed frommrinufft.trajectories.tools, replaced by themrinufft.trajectories.gradientsmodule (connect_gradient,get_prephasors_and_spoilers) (#283).write_trajectory: the newgrad_methodargument comes beforeversion(#283).
New features#
Pulseq support:
read_pulseq_trajextracts the trajectory of a Pulseq sequence file, andpulseq_grecreates a 3D GRE sequence for arbitrary trajectories (#283).Gradient waveform optimization to connect shots and compute prephasors and spoilers,
connect_gradientandget_prephasors_and_spoilers(#283).DeepInverse support:
make_deepinv_phyconverts an operator to a DeepInverse physics,DeepInvPhyNufft(#328).An existing progress bar can be passed to the solvers, e.g.
pinv_solver(#329).
1.3.1 (2025-11-14)#
Fixes#
README rendering on PyPI.
1.3.0 (2025-11-14)#
Breaking changes#
Python 3.10 or newer is required, with new minimal versions of the dependencies (#295).
The
pynfftbackend uses thepynfft3package (#274).The hardware and acquisition parameters are grouped in an
Acquisitionobject (#285): thenorm_factor,resolution,raster_time,gamma,gmaxandsmaxarguments ofnormalize_trajectory,unnormalize_trajectory,convert_trajectory_to_gradients,convert_gradients_to_trajectory,convert_gradients_to_slew_rates,convert_slew_rates_to_gradients,compute_gradients_and_slew_rates,check_hardware_constraintsand of the display functions are replaced by a singleacqargument (Acquisition.defaultwhen not given). The same goes for theshapeandtraj_paramsarguments ofget_gridded_trajectory.The values of
Gammasare now in Hz/T instead of kHz/T, e.g.Gammas.HYDROGENis42_576_000instead of42576(#285).The off-resonance correction is reworked (#300):
MRIFourierCorrected(fourier_op, b0_map, readout_time, r2star_map, mask, interpolator="svd")computes its interpolators, andwith_off_resonance_correctiontakes the same arguments instead ofB, C, indices. Then_time_segments,n_bins,B,tlandbackendarguments ofMRIFourierCorrectedare removed, andget_interpolators_from_fieldmapis replaced by themrinufft.extras.field_mapfunctions (compute_svd_coefficients…).The
cgmethod of the operators is removed: usepinv_solver(withoptim="cg","lsqr"or"lsmr") ormrinufft.extras.optim.cg, which replacesmrinufft.extras.gradient.cg(#316).get_smapsmoved frommrinufft.extras.utilstomrinufft.extras.smaps, andfse_simulationfrommrinufft.extras.simtomrinufft.extras.data(#300).The
num_iterationsargument of thepipedensity compensation of the gpuNUFFT, torchkbnufft and tensorflow backends is renamedmax_iter(#316).wrt_dataandwrt_trajofmake_autogradare keyword-only (#316).initialize_3D_wave_caipi:Ncis renamedNc_or_R(#308).display_gradientsanddisplay_gradients_simplyno longer takeshow_signal(#285).write_trajectory: the newTE_pos,pregradandpostgradarguments come beforegmax,smaxandversion(#276).
New features#
AcquisitionandHardwareconfigurations, with presets for Siemens scanners, to handle the physical units of trajectories (#285).Pseudo-inverse solvers:
pinv_solverwith LSQR, LSMR and CG, Tikhonov regularization, and conversion of operators to SciPyLinearOperator(#316).Off-resonance correction with SVD, MTI and MFI interpolators (
compute_svd_coefficients,compute_mti_coefficients,compute_mfi_coefficients), with lazily evaluated spatial coefficients (#300).ESPIRiT sensitivity maps,
espiritandcartesian_espirit(#324), and coil compression,coil_compression(#293).ECCENTRIC trajectories,
initialize_2D_eccentricandinitialize_3D_eccentric(#238).Arc length parameterization of trajectories,
parameterize_by_arc_length(#236).Wave-CAIPI defined from the acquisition and the GRAPPA / CAIPI factors (#308).
Prephasors and rewinders of trajectories (#276).
Density compensation on CPU with finufft’s spread and interpolate (#224).
GPU selection with
gpu_device_idfor the cufinufft and gpuNUFFT backends (#290).Batched sensitivity maps for the autograd operators (#263).
I/O: skipping samples when reading trajectories (#281), the NIfTI affine matrix of Siemens data,
nifti_affine(#266), and the extraction of the sequence parameters (TE, TR…) from Siemens data (#315).
Improvements#
Fixes#
Documentation#
1.2.1 (2025-04-03)#
Improvements#
Fixes#
The coordinates fitted by the Lloyd sampling were shifted by half a voxel (#247).
1.2.0 (2025-03-04)#
New features#
1.1.1 (2025-02-10)#
Breaking changes#
The
imageargument ofdata_consistencyis renamedimage_data.
Fixes#
The computed density is set through the
densitysetter.Missing default argument for stacked operators.
is_cuda_tensorfailed without torch.
1.1.0 (2025-02-02)#
Breaking changes#
Python 3.9 or newer is required, and numpy 2 is supported.
hard_boundedofstackandreverse_odd_shotsofepifyare keyword-only (#228).
New features#
Sampling densities (
create_cutoff_decay_density,create_polynomial_density,create_energy_density,create_chauffert_density,create_fast_chauffert_density) and sampling from them,sample_from_density(#206).Random walk and travelling salesman trajectories in 2D and 3D (#206).
Random stacking of 2D trajectories,
stack_random(#220).Orientation of Siemens raw data,
siemens_quat_to_rot_mat(#230).pipedensity compensation with cufinufft (#214).
Fixes#
Documentation#
1.0.0 (2024-11-01)#
Breaking changes#
mrinufft.operators.off_resonnanceis renamedmrinufft.operators.off_resonance, and thewith_off_resonnance_correctionmethod of the operatorswith_off_resonance_correction(#180).MRIFourierCorrectedcomputes its interpolators fromb0_mapandreadout_time: itsCandindicesarguments are removed (#180).initialize_3D_TURBINEandinitialize_3D_REPIare renamedinitialize_3D_turbineandinitialize_3D_repi(#186).epify:Nc_trainsis replaced bynb_trains, which comes afterNs_transitions(#186).with_torchandwith_tensorfloware no longer importable frommrinufft.operators.base(#194).
New features#
Subspace projection operator,
MRISubspace(#201).Off-resonance correction from B0 and complex (R2* + B0) field maps,
get_interpolators_from_fieldmap, and field map simulations,make_b0mapandmake_t2smap(#180).Conjugate gradient solver,
cg(#185).Version 5 of the trajectory file format (#188).
skip_factorfor TURBINE trajectories (#186).