← Back to team overview

holopy-developers team mailing list archive

Fit output

 

I have put in place a good first step of of output for fits.

holopy.fit now returns a FitResult object that contains the result of the fit as well as all of the fitter internal state (covariance matrices, etc).

These objects (and indeed all scatterer and theory objects as well) can now be saved into yaml files with:
> holopy.io.save('filename', object)
and loaded with
> l = holopy.io.yaml_io.load('filename')

(holopy.io.load is currently taken as the way to load holograms, hence the extra namespace in the name. I may change something there eventually).

I would suggest using this capability to save each frame of fits, something kind of like

for frame in frames:
   fitresult = fit(...)
   holopy.io.save('name_including_frame_info', fitresult)

and then also make sure to save your fit script with the results since it will have all the info on how you set up the fits.

We can think about doing more automated logging in the future, but this should get us back a lot closer to parity with the logging of the old stable.

Tom