Skip to content

Modularize data loading of ExploreASL #683

@MichaelStritt

Description

@MichaelStritt

Description

A lot of the issues related to specific warning and error messages as well as the data loading could be improved by moving a code section of ExploreASL_Initialize to a separate script which is only for data loading and executed after the import workflow. We should do this after the v1.7.0 release and then re-test & re-think if everything is better then. At the moment it is not useful to improve the warning and error messages if we revamp everything in a few weeks.

Requirements

Move this part...

    %% 7. Data-specific initialization
    fprintf('ExploreASL v%s initialized ... \n', x.Version);
    
    if (x.opts.bProcessData || x.opts.bOnlyLoad) && ~x.opts.bImportData 
    % Skip this step if we still need to run the import (first initialization)
        ...
    end

... from ExploreASL_Initialize to a new function called xASL_init_DataLoading.

In ExploreASL_Master, replace this part right here ...

    % -----------------------------------------------------------------------------
    %% Re-Initialize for potential data loading/processing
    if x.opts.bReinitialize
        x = ExploreASL_Initialize(x.opts.DatasetRoot, x.opts.ImportModules, 
        x.opts.ProcessModules, x.opts.bPause, x.opts.iWorker, x.opts.nWorkers);
    end
    % Retrieve logging information about errors/warnings from backup variable
    if exist('loggingBackUp', 'var')
    	x.logging = loggingBackUp;
    end

... with the new data loading. Make sure that The logging still works and that each use-case of ExploreASL still functions correctly.

How to test

The unit testing could be a big help here. There a lot of ExploreASL use-cases are still considered. You should still make sure that we don't forget anything super specific.

Release notes

Modularize data loading of ExploreASL.

Metadata

Metadata

Labels

featureNew feature, enhancement or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions