manoharan-lab / holopy

Hologram processing and light scattering in python
GNU General Public License v3.0
131 stars 50 forks source link

Can't fit multiple particles #353

Closed barkls closed 3 years ago

barkls commented 4 years ago

Right now you can't use the convenient fit function on Scatterers objects.

This is because hp.inference.interface.parameterize_scatterer calls hp.scattering.scatterer.scatterer._interpret_parameters, which was changed in #279 to colons in parameter names as special characters to denote dictionaries or xarrays of parameter values. Unfortunately hp.scattering.scatterer.Scatterers.parameters also uses colons to denote different particles within a Scatterers object. This hadn't been noticed as a problem because _interpret_parameters is mostly used in from_parameters, and Scatterers defines their own.

barkls commented 4 years ago

Thanks @anna-wang for finding this bug.