← Back to team overview

holopy-developers team mailing list archive

Tying parameters

 

I just pushed an initial implementation of parameter tying to dev (v102).

holopy.fit now accepts an additional optional parameter tie which is a scatterer object specifying parameter tying relationships.

This scatterer should have parameter values of 0 or None for any parameters that are not tied, and a unique value for each group of tied parameters (so for example 1 for index, 2 for radius)

An example of using this would be:

tie = SphereCluster([Sphere(n=1, r=2, center=None), Sphere(n=1, r=2, center=None])

fitresult = fit(..., tie=tie)

This would fit a dimer with index and radius tied for the two particles. I believe this only works while imaginary part of the index is fixed (which we always do, so I am not worrying about it).

Tom