mingrisch / compartmentmodels

Tracer-kinetic models for DCE MRI
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Get and set methods for the parameter dictionary #19

Closed mingrisch closed 9 years ago

mingrisch commented 9 years ago

convert_startdict and get_parameters are, in fact, getters and setters. Maybe the should be renamed in a more consistent fashion. Also get_readable_parameters falls into this category. Thinking about it: startdict is also a not very sensible name.

All this concerns the internal dictionary that contains physiological parameters, which need to be converted to 'raw' parameters that can be used for fitting.

This might be a large API change, but maybe it should be done in near future, before too much breaks. Doing this warrants:

mingrisch commented 9 years ago

Maybe self._parameters should be renamed to self._fitparameters, to highlight that these parameters are used for fitting the model. Likewise, the parameter conversion routines could be renamed as self.to_fitparameters and self.from_fitparameters.

Better suggestions are welcome!

mingrisch commented 9 years ago

we could rename to:

We also should provide functions self.phys_to_fit and self.fit_to_phys.

These functions should accept and return either lists or numpy arrays; and they should also be used to calculate physiological bootstrap parameter estimates from bootstrapped fit parameters (in the bootstrap matrix).

mingrisch commented 9 years ago

This looks like a job for @AndreasMittermeier or @michimichi, and it should be done before new models are implemented by willing contributors.