Skip to content

Conversation

@jan-petr
Copy link
Contributor

@jan-petr jan-petr commented Sep 16, 2022

Linked issue

Closes #1129

How to test

Check flavor /Siemens_PCASL_3DGRASE_VD13A_DEBBIE_1 and Siemens_PCASL_multi_VE11C_1

@jan-petr jan-petr self-assigned this Sep 16, 2022
@jan-petr jan-petr linked an issue Sep 16, 2022 that may be closed by this pull request
20 tasks
Copy link
Member

@HenkMutsaerts HenkMutsaerts left a comment

Choose a reason for hiding this comment

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

Very nice! Few points

Copy link
Member

@HenkMutsaerts HenkMutsaerts left a comment

Choose a reason for hiding this comment

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

Please provide a warning for each inheritance case, and see my comment for studyParClean, otherwise I'm fine.

@jan-petr
Copy link
Contributor Author

Please provide a warning for each inheritance case, and see my comment for studyParClean, otherwise I'm fine.

OK. I fixed the studyParClean. In a bit different way - I keep studyPar as it was without changing it. And I only clean the fields from the result. This is even more clean solution.

I made a few more edits addressing a few more comments. Can I resolve the rest?

Regarding the warnings - we have to keep it relatively simple. And we can't report on general basis. As we want to keep things modular and this report will change based on what subjects are included and can therefore differ on a re-run with a more complete dataset.

So I propose to report something like this:
Importing subject XX, session YY, run ZZ.
Note: fields AA, BB, CC were updated as multiple studyPars were provided in studyPar.json

Importing subject XX, session YY, run ZZ.
Exception subject 11|12, session 2|3, run1: Updated fields AA, BB, CC
Exception subject 12, session 3, run1: Updated fields AA, BB, CC, DD

Any preference?

@jan-petr
Copy link
Contributor Author

jan-petr commented Sep 21, 2022

HENK: When it reads the non-first study par, it warns "Note that for subjects XX sessions YY we're using parameter XX instead of YY"

And check the main issue comment.

@jan-petr
Copy link
Contributor Author

I have copied the same answer to PR as well:

  • We have multiple studyParameters, not sure where "context" comes from?
    Good catch. That's because we called it ImportContexts previously. I have fixed this everywhere. 501c564
  • We create a function that parses studyPar.json. This provides a heads-up to the user for each aliasHierarchy, e.g.,:
    "Note that for cases that match subject regular expression ˆsub-\d{3} session regular expression ... run regular expression, we will change the data parameters XX YY and ZZ.""

This doesn't make sense IMHO. Because this only states the basic functionality of the multi-parameter studyPar :) It doesn't make to report general warning, it makes sense to only report specific warnings to cases that are actually happening.
So I would go with the warning you previously agreed upon: "When it reads the non-first study par, it warns "Note that for subjects XX sessions YY we're using parameter XX instead of YY"

An example of a current warning is:
Evaluating multi-parameter studyPar for subject/visit/session: Sub1/1/2
For RegExp subject/visit/session //2, overwriting fields: LabelingDuration, PostLabelingDelay, TimeEncodedMatrixSize, ASLContext,

I agree in general with #1193, but note that we will anyway revamp the legacy structure of parameters that dataPar uses - so things might still change a bit. Anyway - I agree that we have to clean that. These things happen step-by-step - don't criticize when things are a mess, because they were a super-mess before :D

Copy link
Contributor

@BeatrizPadrela BeatrizPadrela left a comment

Choose a reason for hiding this comment

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

It works!!

@jan-petr jan-petr removed the request for review from MDijsselhof September 23, 2022 08:59
@HenkMutsaerts
Copy link
Member

HenkMutsaerts commented Sep 23, 2022

No I wouldn't provide this information on a subject-by-subject basis, because that will be lost in the long log-list. Instead, at the beginning of the whole conversion: you give a single big warning:

Evaluating multi-parameter studyPar for all subjects/visits/sessions:
For subjects 001, 002, 003, visits 002, session 001, we overwrite the following fields: LabelingDuration, PostLabelingDelay, TimeEncodedMatrixSize, ASLContext:

  • LabelingDuration 1.8 becomes 2.0
  • PLD 2.0 becomes 1.5
    ..
    But I'm fine if you move this to the future provenance issue, and close this conversation.

JAN: But this is verbatim what is written in the studyPar.json...
HENK: Exactly, the warning is to help the user before most of the (potentially parallel) import starts. The studyPar.json exception thingy is not the easiest thing in the world, users like overview; so you give them a simple overview. Indeed nearly what is in the studyPar.json. But then again, it is a warning, just a kind reminder. Of course, if you're smart, you don't need this warning.

Main reason is that your warnings are lost in the gigantic list of import text. If you concentrate all studyPar.json-related warnings as I suggest, this perhaps helps more.

We can also have both.

JAN: OK. We keep the current small warning per subject. And we will try to make an overview reminder for all in a new issue.

@ExploreASL ExploreASL deleted a comment from jan-petr Sep 23, 2022
@jan-petr jan-petr removed the request for review from MauricePasternak September 24, 2022 10:06
@jan-petr jan-petr force-pushed the feature-#1129_multiStudyContext branch from 0098f23 to 76f32a1 Compare September 24, 2022 11:01
@jan-petr jan-petr merged commit 76f32a1 into develop Sep 24, 2022
@jan-petr jan-petr deleted the feature-#1129_multiStudyContext branch September 24, 2022 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import Module should support multiple contexts

4 participants