balbasty / nitorch

Neuroimaging in PyTorch
Other
86 stars 14 forks source link

Feature(qmri): tools to fit MR relaxometry models #41

Closed balbasty closed 3 years ago

balbasty commented 3 years ago

It is mostly working and this branch contains quite a few fixes to other parts of nitorch that it is important to merge upstream, so I will merge that now.

There is a qmri-specific io module that wraps the main io stuff into classes that are specific to some types of data (specific MR sequences, field maps, etc). It can be improved a bit, but could be useful for these types of algorithms that have very specific assumptions on the data.

I'll try to also write scripts that can be used from the comandline. I am not sure where these would be best kept. Maybe in a scripts or bin folder at the root of the project?

There's also a new Option class in core.options which I think can be useful in general. It alows to create nested structures of options, can be converted to/from dict, have a smart way of being copied, etc.

balbasty commented 3 years ago

I just realized that a few files are now redundant and must be removed. I'll push that soon

balbasty commented 3 years ago

And I need to hide some matplotlib imports

brudfors commented 3 years ago

"I'll try to also write scripts that can be used from the comandline. I am not sure where these would be best kept. Maybe in a scripts or bin folder at the root of the project?"

@balbasty I think bin is for compiled code, how about a bash folder (or apps)?

balbasty commented 3 years ago

There is actually a built in mechanism for that in the setup script called "console_scripts" entry points.

https://packaging.python.org/specifications/entry-points/

http://python-packaging.readthedocs.io/en/latest/command-line-scripts.html

You just write a function somewhere in the library and point to it from the setup script, which will automatically create and install the script. I will do that I think (at least to try it)