bkloppenborg / simtoi

The SImulation and Modeling Tool for Optical Interferometry
GNU General Public License v3.0
7 stars 6 forks source link

Parameter assignment is too obfuscated, needs to be improved. #71

Closed bkloppenborg closed 10 years ago

bkloppenborg commented 10 years ago

Within a model the parameter assignment seems unnecessarily obfuscated. For instance, you must remember that CModel defines the position angle, inclination, rotation, and color to indicies 0-3. Inheriting models have to calculate an offset done using mBaseParams. This seems likely to confuse people writing a new SIMTOI model unless they read the documentation clearly.

This structure was necessitated to maintain the ability to pass off a float array to the minimization engine in a consistent format. I wonder if there wouldn't be some way to get the indicies or store the values more clearly using a std::map or std::unordered_list.

bkloppenborg commented 10 years ago

A new CParameterMap class was created and all models have been transitioned over to its use as of commit 075c073.