Skip to content

Fixes #746 Record ExploreASL version on Import#773

Merged
jan-petr merged 11 commits intodevelopfrom
optimize-#746_AcknowledgeVersion
Aug 18, 2021
Merged

Fixes #746 Record ExploreASL version on Import#773
jan-petr merged 11 commits intodevelopfrom
optimize-#746_AcknowledgeVersion

Conversation

@MichaelStritt
Copy link
Contributor

Linked issue

#746

@MichaelStritt MichaelStritt requested a review from jan-petr August 16, 2021 09:48
@MichaelStritt MichaelStritt linked an issue Aug 16, 2021 that may be closed by this pull request
@MichaelStritt MichaelStritt self-assigned this Aug 16, 2021
@MichaelStritt MichaelStritt added the optimization Ensure that code runs faster with unchanged functionality label Aug 16, 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.

This is good (I made minor changes only - all committed already). But not all I wanted - see the issue description. I wrote some explanations as well so that you get the big picture of why we need that ;) Cause we will need to implement a lot in 1.9.0 which is related to these versions.

@MichaelStritt
Copy link
Contributor Author

MichaelStritt commented Aug 16, 2021

Note to myself: also fix the "RandomText" things here 👍

Edit: don't really think this is a problem anymore. If I remove those fields from the original studyPar, they don't get added as that.

...
                Name: '027_S_5079'
         BIDSVersion: '1.6.0'
         DatasetType: 'raw'
    Acknowledgements: 'Imported with ExploreASL 1.8.0_BETA'
    HowToAcknowledge: 'Please cite this paper: https://www.ncbi.nlm.nih.gov/pubmed/001012092119281'
...

@MichaelStritt
Copy link
Contributor Author

You can run UnitTest = xASL_ut_function_xASL_bids_CheckDatasetDescription(TestRepository) to test the xASL_bids_CheckDatasetDescription script.

@MichaelStritt
Copy link
Contributor Author

@jan-petr: We're going to have two minor merge conflicts with #778, but otherwise it should be fine. I even added a unit test. Already looking forward to the feedback. Hope we can get the ADNI things fixed this week, so I can reprocess some data 😄

@MichaelStritt MichaelStritt requested a review from jan-petr August 16, 2021 21:05
@MichaelStritt MichaelStritt changed the title Fixes #746 acknowledge version Fixes #746 Record ExploreASL version on Import Aug 17, 2021
@jan-petr
Copy link
Contributor

Note to myself: also fix the "RandomText" things here

Edit: don't really think this is a problem anymore. If I remove those fields from the original studyPar, they don't get added as that.

...
                Name: '027_S_5079'
         BIDSVersion: '1.6.0'
         DatasetType: 'raw'
    Acknowledgements: 'Imported with ExploreASL 1.8.0_BETA'
    HowToAcknowledge: 'Please cite this paper: https://www.ncbi.nlm.nih.gov/pubmed/001012092119281'
...

Yes of course you are right. RandomText has been removed long time ago - it is only in studyPar.jsons and we can keep it there, no need to remove it from there and from reference in all cases.

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.

All looks very good. Including the test! One thing we need to improve. The "Imported with ExploreASL" is potentially not the only text in the Acknowledgement - we need to be able to deal with extra text - see comments inside the code.

@MichaelStritt MichaelStritt requested a review from jan-petr August 17, 2021 13:46
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.

Thanks for the fixes - it looks good. Two more comments, that weren't somehow submitted before...

First - we don't create the whole acknowledgement - we load it from studyPar and add our ExploreASL part at the end.
Second - now that we export the version, it will mess up the Flavors - i.e. the reference and new import will always differ because everything was done with the older version - shall we ignore the acknowledgement field in the comparison script?!

@MichaelStritt
Copy link
Contributor Author

Example before changes 9712786

>> [identical,results] = xASL_bids_CompareStructures(pathA,pathB,1,[],1,0);
====================================================================================================
Dataset:   x027_S_5079
           No missing files
====================================================================================================
Dataset:   x027_S_5079_b
Missing:   sourceStructure.json
====================================================================================================
Identical: false
RMSE:      2.13
Min.diff.: 118.00
Max.diff.: 1428.00
File:      ASL4D.nii
           RMSE of NIFTIs above threshold.
Text file: Neues Textdokument.txt
           Different file content.
File:      \rawdata\dataset_description.json
           Different value: Acknowledgements (Imported with ExploreASL 1.8.0_BETA. vs Imported with ExploreASL 1.9.0_BETA.)

Example after changes 9712786

>> [identical,results] = xASL_bids_CompareStructures(pathA,pathB,1,[],1,0);
====================================================================================================
Dataset:   x027_S_5079
           No missing files
====================================================================================================
Dataset:   x027_S_5079_b
Missing:   sourceStructure.json
====================================================================================================
Identical: false
RMSE:      2.13
Min.diff.: 118.00
Max.diff.: 1428.00
File:      ASL4D.nii
           RMSE of NIFTIs above threshold.
Text file: Neues Textdokument.txt
           Different file content.

@MichaelStritt MichaelStritt requested a review from jan-petr August 17, 2021 22:10
@jan-petr jan-petr assigned jan-petr and unassigned MichaelStritt Aug 18, 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

@jan-petr jan-petr force-pushed the optimize-#746_AcknowledgeVersion branch from e4b71cf to 9c44d40 Compare August 18, 2021 13:06
@jan-petr jan-petr merged commit 9c44d40 into develop Aug 18, 2021
@jan-petr jan-petr deleted the optimize-#746_AcknowledgeVersion branch August 18, 2021 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimization Ensure that code runs faster with unchanged functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record ExploreASL version on Import

2 participants