-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move getSNRModalities() out of the profile file (prod file) #358
Move getSNRModalities() out of the profile file (prod file) #358
Conversation
I added the blocked tag for now until we agree on which milestone this PR and the LORIS one should go to. To follow up with @ridz1208 |
This should go to 20.2 so removing the Blocked label |
my $base = basename($filename); | ||
my $fullpath = "$data_dir/$filename"; | ||
my $message; | ||
if ( grep(/$fileScanType/, @{$modalities}) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not check for equality instead of a pattern match, as in
if( grep($_ eq $fileScanType, @$modalities) ) {
If you have modalities like T1
and T1weighted
and you are checking for the modalities that match pattern /T1/
then both will match and that's probably not what you want...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good point! Changing it to equality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolasbrossard Thank you for the suggestion!! I integrated it and fixed the message inserted in the notification_spool
table. Please re-review.
my $base = basename($filename); | ||
my $fullpath = "$data_dir/$filename"; | ||
my $message; | ||
if ( grep(/$fileScanType/, @{$modalities}) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good point! Changing it to equality.
Description
Moves the function
getSNRModalities()
out of the profile file. The list of modalities to compute SNR on will now be stored in the Config module of LORIS under the Imaging Pipeline Section as shown in the screenshot below:The function
computeSNR()
ofMRIProcessingUtility.pm
has been updated to grep that information from the Config module now instead of the profile file.SQL for this changes are in aces/Loris#4159
This resolves...
Caveat for existing projects:
Make sure you have run the patch from this LORIS PR (aces/Loris#4159; link to be updated to final URL of the patch at the time of release documentation) and that you have updated the Config module with the modalities listed in the function
getSNRModalities
of your profile file.From now on, the insertion scripts will rely on the values stored in the Config module instead of the profile file and the function
getSNRModalities
can be removed from your profile file.To test this
BackPopulateSNRAndAcquisitionOrder.pl
on oneTarchiveID
for which you have previously removed the SNR values fromparameter_file
and make sure it computes the SNR as expected