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

RandomGhosting: restore parameter has no effect #1196

Open
1 task done
sravan953 opened this issue Sep 20, 2024 · 2 comments · May be fixed by #1211
Open
1 task done

RandomGhosting: restore parameter has no effect #1196

sravan953 opened this issue Sep 20, 2024 · 2 comments · May be fixed by #1211
Labels
bug Something isn't working

Comments

@sravan953
Copy link

sravan953 commented Sep 20, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Bug summary

See --

ri, rj, rk = np.round(restore_center * shape).astype(np.uint16)

ri, rj, rk are not used anywhere else in the code. Per the current implementation, only the center line of k-space is restored.

Code for reproduction

RandomGhosting(
                num_ghosts=(4, 10),
                intensity=(0.5, 0.7),
                restore=0.9,
)

Actual outcome

restore has no effect on the ghosting transform.

Error messages

No response

Expected outcome

Was the intended design to restore x% of the entire k-space, or x% of the center line of k-space? Or something else?

System info

No response

@sravan953 sravan953 added the bug Something isn't working label Sep 20, 2024
@romainVala
Copy link
Contributor

Hi,
Thanks for the report, you are right : the implementation choose to restore only (and always) the three center plane of the kspace (with no use of the restore parameter)

I am not sure if there is a need to control this restore parameter (restore=1 would remove the artefact). You can already control the artefact strength with the intensity parameter.

But for sure the documentation should be changed ...

@fepegar
Copy link
Owner

fepegar commented Sep 23, 2024

Great catch, @sravan953. I'm disappointed that linters haven't caught this. It turns out that feature is in preview mode.

Was the intended design to restore x% of the entire k-space, or x% of the center line of k-space? Or something else?

The intended design was indeed to restore a percentage of the k-space. I will investigate and either fix this or remove the parameter.

@fepegar fepegar linked a pull request Sep 23, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants