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

Move masking/unmasking functions into new masking module #250

Closed
tsalo opened this issue Apr 5, 2019 · 3 comments
Closed

Move masking/unmasking functions into new masking module #250

tsalo opened this issue Apr 5, 2019 · 3 comments
Labels
discussion issues that still need to be discussed refactoring issues proposing/requesting changes to the code which do not impact behavior

Comments

@tsalo
Copy link
Member

tsalo commented Apr 5, 2019

Summary

We have a handful of masking/unmasking functions that I think should be moved out of utils and into their own module. While I would ultimately prefer to operate mostly on img-like objects (to make it easier for users to call each function in the package without knowing all of the details behind our data loading, masking, unmasking, and data saving procedures), we should move relevant functions out of utils (and potentially io) to reduce bloat in the meantime.

Additional Detail

The functions utils.load_image, utils.make_adaptive_mask, utils.unmask, decomposition._utils.eimask, and potentially io.new_nii_like are all related to masking and/or converting between imgs and arrays. I think that these would be best organized in a masking module.

Next Steps

  1. Create masking file (masking.py).
  2. Move functions from their current positions to new file.
  3. Update imports throughout package.
  4. Update tests.
  5. Update API organization in docs.
@tsalo tsalo added discussion issues that still need to be discussed refactoring issues proposing/requesting changes to the code which do not impact behavior labels Apr 5, 2019
@emdupre
Copy link
Member

emdupre commented Apr 11, 2019

Sorry, is this instead of #251 ? I'm 👍 on just operating on imgs directly, if that helps in the discussion !

@tsalo
Copy link
Member Author

tsalo commented Apr 11, 2019

I was thinking that this would be in addition to that. We’ll be able to eliminate most masking/loading functions but we may want one or two to gracefully apply the masks on the list of imgs. Plus we’ll still have eimask and make_adaptive_mask.

@stale
Copy link

stale bot commented Nov 9, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to tedana:tada: !

@stale stale bot added the stale label Nov 9, 2019
@stale stale bot closed this as completed Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion issues that still need to be discussed refactoring issues proposing/requesting changes to the code which do not impact behavior
Projects
None yet
Development

No branches or pull requests

3 participants