criosx / molgroups

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

fnSet should use Nones as default values #36

Open hoogerheide opened 2 years ago

hoogerheide commented 2 years ago

For the BLM-derived models, fnSet should use Nones as default values. The current risk is that the parameters are currently all keyword arguments, and thus optional; however, if you leave them out, the values will be reset to the default parameter values.

It would be better to have None as the default and then only set the parameter if it is not None. For most parameters this can be done in a single line:

def fnSet(self, par=None):
    self.par = par if par is not None