Skip to content

Fixes #778 Import optimization#780

Merged
jan-petr merged 9 commits intodevelopfrom
optimize-#778_Import
Aug 17, 2021
Merged

Fixes #778 Import optimization#780
jan-petr merged 9 commits intodevelopfrom
optimize-#778_Import

Conversation

@MichaelStritt
Copy link
Contributor

@MichaelStritt MichaelStritt commented Aug 16, 2021

Linked issue

#778

Comment

@jan-petr: In some of the commits I added extra detailed comments on what I did. I think this overall improves the import a lot. I basically did the changes that I described in the WhatsApp group (related to the flow charts) and also fixed some bugs related to #769.

Simplified description

  • Move xASL_..._Bids2Legacy to xASL_module_Import
  • Make xASL_imp_DCM2NII_Initialize conditional / rename it
  • Introduce subfunctions in xASL_..._Bids2Legacy
  • Fix bugs related to Dataset loading doesn't work #769

@MichaelStritt MichaelStritt requested a review from jan-petr August 16, 2021 18:01
@MichaelStritt MichaelStritt self-assigned this Aug 16, 2021
@MichaelStritt MichaelStritt added import Related to data import module optimization Ensure that code runs faster with unchanged functionality labels Aug 16, 2021
@MichaelStritt MichaelStritt linked an issue Aug 16, 2021 that may be closed by this pull request
@MichaelStritt MichaelStritt changed the title Fixes #778 import optimization Fixes #778 Import optimization Aug 17, 2021
Copy link
Contributor

@jan-petr jan-petr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor admin stuff. Couldn't discover large issues.

@MichaelStritt MichaelStritt requested a review from jan-petr August 17, 2021 12:52
@jan-petr jan-petr assigned jan-petr and unassigned MichaelStritt Aug 17, 2021
Copy link
Contributor

@jan-petr jan-petr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

xASL_imp_DCM2NII_Initialize was a misleading name. We mostly read and initialize imPar here. This is mostly based on the sourceStructure.json. I think as a name xASL_imp_Initialize is a bit more straightforward and shorter. Otherwise you would expect this part to be within the DCM2NII submodule.
The problem with the way that Henk fixed #769 is that it now tries to load the dataset even if we only ran one of the first import modules. To fix this, we need to ensure that either a derivatives directory or a legacy dataset exists. I think the current method should be able to capture most use-cases, but we sould really start to stop supporting this outdated usage of ExploreASL, it makes the code super complex.
Another minor fix related to #769. We do not want the warning to pop up if we only initialize.
@jan-petr jan-petr force-pushed the optimize-#778_Import branch from 77a1e39 to d44018c Compare August 17, 2021 18:58
@jan-petr jan-petr merged commit d44018c into develop Aug 17, 2021
@jan-petr jan-petr deleted the optimize-#778_Import branch August 17, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

import Related to data import module optimization Ensure that code runs faster with unchanged functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize import workflow

2 participants