diff --git a/spec2nii/GE/ge_pfile.py b/spec2nii/GE/ge_pfile.py index e9b5d20..b52939b 100644 --- a/spec2nii/GE/ge_pfile.py +++ b/spec2nii/GE/ge_pfile.py @@ -108,9 +108,10 @@ def _process_svs_pfile(pfile): orientation = NIFTIOrient(_calculate_affine(pfile)) - out_nmrs = [] - for dd, mm in zip(data, meta): - out_nmrs.append(gen_nifti_mrs_hdr_ext(dd, dwelltime, mm, orientation.Q44, no_conj=True)) + out_nmrs = [ + gen_nifti_mrs_hdr_ext(dd, dwelltime, mm, orientation.Q44, no_conj=True) + for dd, mm in zip(data, meta) + ] return out_nmrs, fname_suffix diff --git a/spec2nii/Philips/philips_data_list.py b/spec2nii/Philips/philips_data_list.py index 3b59927..f99c374 100644 --- a/spec2nii/Philips/philips_data_list.py +++ b/spec2nii/Philips/philips_data_list.py @@ -80,10 +80,11 @@ def read_data_list_pair(data_file, list_file, aux_file, special_case=None): meta = base_meta.copy() - kept_ind = [] - for ii, sha in zip(indices, data.shape[1:]): - if sha > 1: - kept_ind.append(ii) + kept_ind = [ + ii + for ii, sha in zip(indices, data.shape[1:]) + if sha > 1 + ] out_data = data.squeeze() if len(kept_ind) > 3: