Skip to content

Commit

Permalink
Change prints. WIP REMOVE LEFT-OVER
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaRenauld committed Feb 22, 2024
1 parent 899454f commit 053970f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dwi_ml/data/hdf5/hdf5_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def _process_one_volume_group(self, group: str, subj_id: str,
self.enforce_files_presence,
folder=subj_input_dir)
for mask in std_masks:
logging.info(" - Loading standardization mask {}"
logging.info(" - Loading standardization mask {}"
.format(os.path.basename(mask)))
sub_mask_data = nib.load(mask).get_fdata() > 0
if std_mask is None:
Expand All @@ -488,6 +488,7 @@ def _process_one_volume_group(self, group: str, subj_id: str,
file_list = self.groups_config[group]['files']
file_list = format_filelist(file_list, self.enforce_files_presence,
folder=subj_input_dir)
print("??? file_list", file_list)

# First file will define data dimension and affine
logging.info(" - Processing file {}"
Expand All @@ -511,7 +512,7 @@ def _process_one_volume_group(self, group: str, subj_id: str,
group_affine, group_res)

if std_option == 'per_file':
logging.debug(' *Standardizing sub-data')
logging.info(' (standardizing)')
data = standardize_data(data, std_mask, independent=False)

# Append file data to hdf group.
Expand All @@ -524,11 +525,11 @@ def _process_one_volume_group(self, group: str, subj_id: str,

# Standardize data (per channel) (if not done 'per_file' yet).
if std_option == 'independent':
logging.debug(' *Standardizing data on each feature.')
logging.info(' - Standardizing data on each feature.')
group_data = standardize_data(group_data, std_mask,
independent=True)
elif std_option == 'all':
logging.debug(' *Standardizing data as a whole.')
logging.info(' - Standardizing data as a whole.')
group_data = standardize_data(group_data, std_mask,
independent=False)
elif std_option not in ['none', 'per_file']:
Expand Down

0 comments on commit 053970f

Please sign in to comment.