Skip to content
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

Package initial version #3

Merged
merged 46 commits into from
Aug 21, 2023
Merged

Package initial version #3

merged 46 commits into from
Aug 21, 2023

Conversation

Laura2305
Copy link
Contributor

No description provided.

@alexjaffray
Copy link
Collaborator

@Laura2305 I've managed to get everything to run through on the example data, with some requirements noted down that I had to figure out, but all good. I will add my review by Thursday.

@alexjaffray
Copy link
Collaborator

@Laura2305 I would like to propose some code changes in a new branch as part of the review, which you can then merge into setup and we can proceed with the PR. To do this I need write access to the git repo (and also I have some similar changes for the example). Could you give me write access?

Copy link
Collaborator

@alexjaffray alexjaffray left a comment

Choose a reason for hiding this comment

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

I've gone through and finished my review of the code. In general it looks great, but I have proposed some changes in my branch #4. Please take a look at my proposed changes, they are mostly related to a function name and adding the REPL dependency explicitly, as well as the filtfilt call with less than 5 slices. These three topics must be addressed, but the formatting changes are up to you if you'd like to keep them or not.

src/AdjustData.jl Show resolved Hide resolved
src/AdjustData.jl Show resolved Hide resolved
src/AdjustData.jl Outdated Show resolved Hide resolved
src/AdjustData.jl Outdated Show resolved Hide resolved
src/CoilSensMap.jl Outdated Show resolved Hide resolved
src/Navigator.jl Show resolved Hide resolved

SCT reference: https://spinalcordtoolbox.com
"""
function callSCT(params::Dict{Symbol, Any})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a warning or a check for sct installation present, as well as fsleyes

src/Unwrap.jl Outdated
padd_size = size(correlation, 1)
corr_padd = zeros(Float64, padd_size)
corr_filt = cat(corr_padd .= correlation[1], correlation, corr_padd .= correlation[end], dims=1)
corr_filt = filtfilt(filter, corr_filt)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The call to filtfilt can fail for small numbers of slices, see my PR for a possible workaround or we just check if the sizes are compatible and throw an error if they are not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, this makes sense. We can just skip that part and use the correlation sign for a small number of slices.

@@ -0,0 +1,54 @@

function test_AdjustData(datadir::String)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good atomic test

end


function testdata(datadir::String, tmpResdir::String)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good testset in general. Maybe we should look at setting up a CI run that checks code coverage

Update CI to use a julia version within the scope of MRINavigator's compat
@alexjaffray
Copy link
Collaborator

@Laura2305 The failing CI runs are fixed in my branch. I've changed the CI to use Julia 1.3 and 1.8, let me know if this is alright

1.3 isn't supported by MRIFiles it seems... changing to 1.6
@Laura2305
Copy link
Contributor Author

@Laura2305 The failing CI runs are fixed in my branch. I've changed the CI to use Julia 1.3 and 1.8, let me know if this is alright

@alexjaffray that's great. Thanks!

@alexjaffray alexjaffray merged commit 5f2cd07 into main Aug 21, 2023
3 checks passed
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.

2 participants