nipy/dipy — pull request #247 by arokem (2013-09-13 04:00:07+00:00)
Title: WIP: Model base

Following discussions on this PR: https://github.com/nipy/dipy/pull/237 and our conversation at the hangout the other day, I am trying to implement a base-class for ReconstModel's and ReconstFit's, to enforce a uniform interface.

While I'm at it, I am trying to use the `gradients` attr as much as possible.

ATM, I am failing at both :confounded:

The `gradients` thing is probably close. I left my attempts commented out here: https://github.com/arokem/dipy/blob/69abf35913918086bd79304d2d37aecf07ac8a81/dipy/reconst/dti.py#L1647

The base-class thing is being confounded by the `multi_voxel_model` decorator. By the time I get to the base-class `__init__`, the object has already mutated and is no longer an instance of ReconstModel, so the function doesn't know what to do with `self`.

Anyone have any ideas how to proceed here?