PTB-MR / mrpro

MR image reconstruction and processing.
https://ptb-mr.github.io/mrpro/
Apache License 2.0
13 stars 3 forks source link

Improve readability of dimension operations #380

Closed ckolbPTB closed 1 month ago

ckolbPTB commented 1 month ago

closes #71

If anybody finds some more cases where the dimension operations could be improved please adapt or post the code line here in the PR.

Note: This PR is supposed to improve on the readability of dimension operations. Making them more general will be the aim of #359

github-actions[bot] commented 1 month ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/mrpro/algorithms/csm
   iterative_walsh.py15193%37
src/mrpro/algorithms/dcf
   dcf_voronoi.py53492%15, 48–49, 76
src/mrpro/algorithms/optimizers
   adam.py20195%69
src/mrpro/algorithms/reconstruction
   DirectReconstruction.py291452%40–45, 61–69, 83
   IterativeSENSEReconstruction.py472743%64–70, 85–92, 106–128
   Reconstruction.py502452%40, 52–54, 70–77, 94–105
src/mrpro/data
   AcqInfo.py128298%174, 214
   CsmData.py21386%14, 58–60
   DcfData.py37295%17, 65
   IData.py60395%119, 125, 129
   IHeader.py69297%76, 110
   KHeader.py1571292%23, 125–129, 156, 206, 217, 224–225, 228, 235
   KNoise.py24962%39–52
   MoveDataMixin.py1261489%14, 109, 125, 139–141, 202, 265, 279, 358, 378–379, 396–397
   QData.py32197%42
   SpatialDimension.py44198%64
   TrajectoryDescription.py14193%23
   acq_filters.py10190%47
src/mrpro/data/_kdata
   KData.py97991%107–108, 117, 125, 179–180, 215, 220–221
   KDataRemoveOsMixin.py29293%43, 45
   KDataSelectMixin.py20290%46, 62
   KDataSplitMixin.py48394%49, 79, 88
src/mrpro/data/traj_calculators
   KTrajectoryCalculator.py25292%23, 45
   KTrajectoryIsmrmrd.py13285%41, 50
   KTrajectoryPulseq.py29197%54
src/mrpro/operators
   CartesianSamplingOp.py50982%49–50, 55–56, 61–62, 88, 91, 114
   ConstraintsOp.py60297%46, 48
   EndomorphOperator.py51296%209, 213
   FiniteDifferenceOp.py27293%48, 113
   FourierOp.py77199%131
   GridSamplingOp.py123993%60–61, 70–71, 78–79, 82, 84, 86
   LinearOperator.py80495%32, 131, 251, 256
   Operator.py52198%21
   SliceProjectionOp.py166895%39, 46, 48, 54, 191, 212, 245, 285
   ZeroPadOp.py16194%30
src/mrpro/utils
   Rotation.py4532894%58–66, 106, 283, 368, 370, 397, 452, 457, 460, 475, 492, 497, 640, 645, 648, 664, 668, 742, 744, 752–753, 993, 1075
   filters.py62297%44, 49
   slice_profiles.py45687%18, 34, 111–114, 147
   sliding_window.py34197%34
   split_idx.py10280%43, 47
   zero_pad_or_crop.py31681%26, 30, 54, 57, 60, 63
TOTAL339122793% 

Tests Skipped Failures Errors Time
760 0 :zzz: 0 :x: 0 :fire: 1m 9s :stopwatch:
ckolbPTB commented 1 month ago

This https://github.com/PTB-MR/mrpro/blob/296fd305e6ce2a16b2e95b38df18f8e8269b6a23/examples/t1_mapping_with_grad_acq.py#L41

will be fixed in #377