junifer 0.0.6.dev389__py3-none-any.whl → 0.0.6.dev393__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
junifer/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.0.6.dev389'
16
- __version_tuple__ = version_tuple = (0, 0, 6, 'dev389')
15
+ __version__ = version = '0.0.6.dev393'
16
+ __version_tuple__ = version_tuple = (0, 0, 6, 'dev393')
@@ -596,6 +596,8 @@ class fMRIPrepConfoundRemover(BasePreprocessor):
596
596
  t_r=t_r,
597
597
  mask_img=mask_img,
598
598
  )
599
+ # Fix t_r as nilearn messes it up
600
+ cleaned_img.header["pixdim"][4] = t_r
599
601
  # Save deconfounded data
600
602
  deconfounded_img_path = element_tempdir / "deconfounded_data.nii.gz"
601
603
  nib.save(cleaned_img, deconfounded_img_path)
@@ -460,22 +460,32 @@ def test_fMRIPrepConfoundRemover_fit_transform() -> None:
460
460
 
461
461
  with PartlyCloudyTestingDataGrabber(reduce_confounds=False) as dg:
462
462
  element_data = DefaultDataReader().fit_transform(dg["sub-01"])
463
- orig_bold = element_data["BOLD"]["data"].get_fdata().copy()
463
+ # Get original data
464
+ input_img = element_data["BOLD"]["data"]
465
+ input_bold = input_img.get_fdata().copy()
466
+ input_tr = input_img.header.get_zooms()[3]
467
+ # Fit-transform
464
468
  output = confound_remover.fit_transform(element_data)
465
- trans_bold = output["BOLD"]["data"].get_fdata()
469
+ output_img = output["BOLD"]["data"]
470
+ output_bold = output_img.get_fdata()
471
+ output_tr = output_img.header.get_zooms()[3]
472
+
466
473
  # Transformation is in place
467
474
  assert_array_equal(
468
- trans_bold, element_data["BOLD"]["data"].get_fdata()
475
+ output_bold, element_data["BOLD"]["data"].get_fdata()
469
476
  )
470
477
 
471
478
  # Data should have the same shape
472
- assert orig_bold.shape == trans_bold.shape
479
+ assert input_bold.shape == output_bold.shape
473
480
 
474
481
  # but be different
475
482
  assert_raises(
476
- AssertionError, assert_array_equal, orig_bold, trans_bold
483
+ AssertionError, assert_array_equal, input_bold, output_bold
477
484
  )
478
485
 
486
+ # Check t_r
487
+ assert input_tr == output_tr
488
+
479
489
  assert "meta" in output["BOLD"]
480
490
  assert "preprocess" in output["BOLD"]["meta"]
481
491
  t_meta = output["BOLD"]["meta"]["preprocess"]
@@ -506,22 +516,32 @@ def test_fMRIPrepConfoundRemover_fit_transform_masks() -> None:
506
516
 
507
517
  with PartlyCloudyTestingDataGrabber(reduce_confounds=False) as dg:
508
518
  element_data = DefaultDataReader().fit_transform(dg["sub-01"])
509
- orig_bold = element_data["BOLD"]["data"].get_fdata().copy()
519
+ # Get original data
520
+ input_img = element_data["BOLD"]["data"]
521
+ input_bold = input_img.get_fdata().copy()
522
+ input_tr = input_img.header.get_zooms()[3]
523
+ # Fit-transform
510
524
  output = confound_remover.fit_transform(element_data)
511
- trans_bold = output["BOLD"]["data"].get_fdata()
525
+ output_img = output["BOLD"]["data"]
526
+ output_bold = output_img.get_fdata()
527
+ output_tr = output_img.header.get_zooms()[3]
528
+
512
529
  # Transformation is in place
513
530
  assert_array_equal(
514
- trans_bold, element_data["BOLD"]["data"].get_fdata()
531
+ output_bold, element_data["BOLD"]["data"].get_fdata()
515
532
  )
516
533
 
517
534
  # Data should have the same shape
518
- assert orig_bold.shape == trans_bold.shape
535
+ assert input_bold.shape == output_bold.shape
519
536
 
520
537
  # but be different
521
538
  assert_raises(
522
- AssertionError, assert_array_equal, orig_bold, trans_bold
539
+ AssertionError, assert_array_equal, input_bold, output_bold
523
540
  )
524
541
 
542
+ # Check t_r
543
+ assert input_tr == output_tr
544
+
525
545
  assert "meta" in output["BOLD"]
526
546
  assert "preprocess" in output["BOLD"]["meta"]
527
547
  t_meta = output["BOLD"]["meta"]["preprocess"]
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: junifer
3
- Version: 0.0.6.dev389
3
+ Version: 0.0.6.dev393
4
4
  Summary: JUelich NeuroImaging FEature extractoR
5
5
  Author-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
6
6
  Maintainer-email: Fede Raimondo <f.raimondo@fz-juelich.de>, Synchon Mandal <s.mandal@fz-juelich.de>
@@ -1,6 +1,6 @@
1
1
  junifer/__init__.py,sha256=2McgH1yNue6Z1V26-uN_mfMjbTcx4CLhym-DMBl5xA4,266
2
2
  junifer/__init__.pyi,sha256=SsTvgq2Dod6UqJN96GH1lCphH6hJQQurEJHGNhHjGUI,508
3
- junifer/_version.py,sha256=X-yXnQlyg2_EwjCw0n4eAgGDkY1QOoPd1RhBaG_xEes,428
3
+ junifer/_version.py,sha256=Xrf0WGM1WsgGK2h3h5cfYbtnibBCHhWQtsu9j6liypU,428
4
4
  junifer/conftest.py,sha256=PWYkkRDU8ly2lYwv7VBKMHje4et6HX7Yey3Md_I2KbA,613
5
5
  junifer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  junifer/stats.py,sha256=e9aaagMGtgpRfW3Wdpz9ocpnYld1IWylCDcjFUgX9Mk,6225
@@ -280,9 +280,9 @@ junifer/preprocess/base.py,sha256=hARO4Yq9sQ8m2tATeuBmPMbI4BSnwNxLf2prF8Iq_Tk,66
280
280
  junifer/preprocess/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
281
281
  junifer/preprocess/confounds/__init__.py,sha256=L3CquKcndFb2b8yVo-XLi-zsNCe8MMKUN41UOVdooWc,270
282
282
  junifer/preprocess/confounds/__init__.pyi,sha256=iC70cqcWNMX4JM42RcUgKb9YX8ciK8oVERdWWjo-13c,102
283
- junifer/preprocess/confounds/fmriprep_confound_remover.py,sha256=Vw0ymmA8QppKY3GHdP8J9K6KyYUSbLGbBnwT-VpwXLw,21527
283
+ junifer/preprocess/confounds/fmriprep_confound_remover.py,sha256=Mf93SKgrfIDcig3R8Pfu_SaK-E6-JCOSITLtITOmFa0,21615
284
284
  junifer/preprocess/confounds/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
285
- junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py,sha256=yZxCud9l8bW36Rsk63Fi1qWUpM9L4Wtd2-zZW-DjvZA,19949
285
+ junifer/preprocess/confounds/tests/test_fmriprep_confound_remover.py,sha256=L1L9yllAyneOL3YgcNRf3a2zXGZjjyPMdjSy0fRGpWc,20517
286
286
  junifer/preprocess/smoothing/__init__.py,sha256=7aTwvAG522kA76QQwqxwY5zV_6asyPaaH2uSMTaKQls,216
287
287
  junifer/preprocess/smoothing/__init__.pyi,sha256=5sjw61Eyon9gE_SWoktND9raw6IkgqcT2rtGNhVV9EA,58
288
288
  junifer/preprocess/smoothing/_afni_smoothing.py,sha256=4mdZk9YkA02wZ8rS6sbLnXL_7SIX7M0NwHPLckJgCmI,3325
@@ -341,10 +341,10 @@ junifer/utils/tests/test_config.py,sha256=7ltIXuwb_W4Mv_1dxQWyiyM10XgUAfsWKV6D_i
341
341
  junifer/utils/tests/test_fs.py,sha256=WQS7cKlKEZ742CIuiOYYpueeAhY9PqlastfDVpVVtvE,923
342
342
  junifer/utils/tests/test_helpers.py,sha256=k5qqfxK8dFyuewTJyR1Qn6-nFaYNuVr0ysc18bfPjyU,929
343
343
  junifer/utils/tests/test_logging.py,sha256=duO4ou365hxwa_kwihFtKPLaL6LC5XHiyhOijrrngbA,8009
344
- junifer-0.0.6.dev389.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
345
- junifer-0.0.6.dev389.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
346
- junifer-0.0.6.dev389.dist-info/METADATA,sha256=EmDLVfbOnEGVxZpLIPhK8S9OJt_1RcpGW6ABx12fIRw,8429
347
- junifer-0.0.6.dev389.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
348
- junifer-0.0.6.dev389.dist-info/entry_points.txt,sha256=6O8ru0BP-SP7YMUZiizFNoaZ2HvJpadO2G7nKk4PwjI,48
349
- junifer-0.0.6.dev389.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
350
- junifer-0.0.6.dev389.dist-info/RECORD,,
344
+ junifer-0.0.6.dev393.dist-info/AUTHORS.rst,sha256=rmULKpchpSol4ExWFdm-qu4fkpSZPYqIESVJBZtGb6E,163
345
+ junifer-0.0.6.dev393.dist-info/LICENSE.md,sha256=MqCnOBu8uXsEOzRZWh9EBVfVz-kE9NkXcLCrtGXo2yU,34354
346
+ junifer-0.0.6.dev393.dist-info/METADATA,sha256=Jg94TrKdxPKHyLgzEDxutwgBZKu0pDyrvHUmMaDDY68,8429
347
+ junifer-0.0.6.dev393.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
348
+ junifer-0.0.6.dev393.dist-info/entry_points.txt,sha256=6O8ru0BP-SP7YMUZiizFNoaZ2HvJpadO2G7nKk4PwjI,48
349
+ junifer-0.0.6.dev393.dist-info/top_level.txt,sha256=4bAq1R2QFQ4b3hohjys2JBvxrl0GKk5LNFzYvz9VGcA,8
350
+ junifer-0.0.6.dev393.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.7.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5