diff --git a/scripts/curation/filter_image_descriptions.py b/scripts/curation/filter_image_descriptions.py index 7418ecd7..4ee559f6 100755 --- a/scripts/curation/filter_image_descriptions.py +++ b/scripts/curation/filter_image_descriptions.py @@ -46,7 +46,7 @@ } FLAG_OVERWRITE = "--overwrite" -DEFAULT_DPATH_OUT = Path(__file__).parent.parent / "imaging_descriptions" +DEFAULT_DPATH_OUT = Path(__file__).parent.parent.parent / "imaging_descriptions" DEFAULT_INDENT = 4 diff --git a/scripts/dicom_reorg/fetch_dicom_downloads.py b/scripts/dicom_reorg/fetch_dicom_downloads.py index 686ea4df..0f5590f8 100755 --- a/scripts/dicom_reorg/fetch_dicom_downloads.py +++ b/scripts/dicom_reorg/fetch_dicom_downloads.py @@ -154,7 +154,7 @@ def run_main(self): # check if any image ID has already been downloaded check_status = Parallel(n_jobs=self.n_jobs)( delayed(_check_image_id)( - self.layout.dpath_raw_imaging + self.layout.dpath_pre_reorg / self.dicom_dir_map.get_dicom_dir( participant_id=participant_id, session_id=self.session_id ), @@ -164,19 +164,19 @@ def run_main(self): [Manifest.col_participant_id, COL_IMAGE_ID] ].itertuples(index=False) ) - df_imaging_to_check[Doughnut.col_in_raw_imaging] = check_status + df_imaging_to_check[Doughnut.col_in_pre_reorg] = check_status self.logger.info( - f"\tFound {int(df_imaging_to_check[Doughnut.col_in_raw_imaging].sum())} images already downloaded" + f"\tFound {int(df_imaging_to_check[Doughnut.col_in_pre_reorg].sum())} images already downloaded" ) self.logger.info( - f"\tRemaining {int((~df_imaging_to_check[Doughnut.col_in_raw_imaging]).sum())} images need to be downloaded from LONI" + f"\tRemaining {int((~df_imaging_to_check[Doughnut.col_in_pre_reorg]).sum())} images need to be downloaded from LONI" ) # update status file participants_to_update = set( df_imaging_to_check.loc[ - df_imaging_to_check[Doughnut.col_in_raw_imaging], + df_imaging_to_check[Doughnut.col_in_pre_reorg], Manifest.col_participant_id, ] ) @@ -184,7 +184,7 @@ def run_main(self): self.doughnut.set_status( participant_id=participant_id, session_id=self.session_id, - col=Doughnut.col_in_raw_imaging, + col=Doughnut.col_in_pre_reorg, status=True, ) self.logger.info( @@ -194,7 +194,7 @@ def run_main(self): # get images to download image_ids_to_download = df_imaging_to_check.loc[ - ~df_imaging_to_check[Doughnut.col_in_raw_imaging], + ~df_imaging_to_check[Doughnut.col_in_pre_reorg], [Manifest.col_participant_id, COL_IMAGE_ID], ] image_ids_to_download = image_ids_to_download.sort_values(