criosx / molgroups

Composition space modeling for scattering data analysis
MIT License
2 stars 0 forks source link

Duplicated code for calculating scattering length densities and areas #16

Closed hoogerheide closed 3 years ago

hoogerheide commented 3 years ago

Composite objects have routines for adding up the areas from their constituent components and for calculating scattering length densities and scattering lengths. These could be combined into a single "composite object" base class (which in turn is based on nSLDObj) so this code does not need to be duplicated.

Could automatically detect constituent classes, or could use a list. Need to determine whether or not to pass bulknsld to all of them. A separate list could determine whether or not to pass bulknsld; alternatively, during initialization a ProtonExchange switch could be set that determines whether or not bulknsld is used.