From fd1eba76907e41c49b8158bc4cd072cdcacae562 Mon Sep 17 00:00:00 2001 From: Evgueni Ovtchinnikov Date: Fri, 24 May 2024 10:35:14 +0000 Subject: [PATCH] ignored noise calibration data in generate_MCIR_data.py --- examples/Python/PETMR/generate_MCIR_data.py | 2 +- src/xGadgetron/pGadgetron/Gadgetron.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/Python/PETMR/generate_MCIR_data.py b/examples/Python/PETMR/generate_MCIR_data.py index eb46d77c0..4658066d0 100644 --- a/examples/Python/PETMR/generate_MCIR_data.py +++ b/examples/Python/PETMR/generate_MCIR_data.py @@ -180,7 +180,7 @@ def main(): template_PET_im = pet.ImageData(template_PET_raw) # Get template MR image from template raw - template_MR_raw = mr.AcquisitionData(template_MR_raw_path) + template_MR_raw = mr.AcquisitionData(template_MR_raw_path, False, mr.IgnoreMask()) template_MR_raw.sort_by_time() template_MR_raw = mr.preprocess_acquisition_data(template_MR_raw) template_MR_im = simple_mr_recon(template_MR_raw) diff --git a/src/xGadgetron/pGadgetron/Gadgetron.py b/src/xGadgetron/pGadgetron/Gadgetron.py index 9814d898d..52d3a1b73 100644 --- a/src/xGadgetron/pGadgetron/Gadgetron.py +++ b/src/xGadgetron/pGadgetron/Gadgetron.py @@ -665,8 +665,8 @@ def __calc_from_acquisitions(self, data, method_name): raise AssertionError("The handle for data is None. Please pass valid acquisition data.") dcw = compute_kspace_density(data) - data = data * dcw + if method_name == 'Inati': try: @@ -686,8 +686,12 @@ def __calc_from_acquisitions(self, data, method_name): self.fill(csm.astype(numpy.complex64)) elif method_name == 'SRSS': + try_calling(pygadgetron.cGT_computeCoilSensitivities(self.handle, data.handle)) + else: + raise error('Unknown method %s' % method_name) + def __calc_from_images(self, data, method_name): if data.handle is None: @@ -1708,7 +1712,7 @@ def preprocess_acquisition_data(input_data): ['NoiseAdjustGadget', \ 'AsymmetricEchoAdjustROGadget', \ 'RemoveROOversamplingGadget']) - + def set_grpe_trajectory(ad, traj=None): ''' Function that fills the trajectory of AcquisitionData with golden angle radial