PEMtk fitting setup & batch run demo
01/09/22
Outline of this notebook:
Use
setup_fit_demo.pyscript to load data and setup fitting environment.Run a batch of fits…
-
Serial with
self.fit()method.Parallel fitting routine with
self.multiFit()method. This uses XYZpy library for quick parallelization.
load a batch
-
Exploring the results… see the “analysis” notebook for more.
Versions
06/06/21 v1
22/08/22 v2
01/09/22 v2b
v2b updated version including:
Data IO with
self.writeFitData()method.fitting now supports additional backends, these are set in
self.fitOpts. For a list of available backends runself.backends(). Currently this implements support for AF or MF fitting routines.
Setup
[1]:
# Import & set paths
import pemtk
from pemtk.fit.fitClass import pemtkFit
from pathlib import Path
# Path for demo script
demoPath = Path(pemtk.__file__).parent.parent/Path('demos','fitting')
# Run demo script to configure workspace
%run {demoPath/"setup_fit_demo.py"}
*** ePSproc installation not found, setting for local copy.
* Setting plotter defaults with epsproc.basicPlotters.setPlotters(). Run directly to modify, or change options in local env.
* Set Holoviews with bokeh.
C:\Users\femtolab\.conda\envs\ePSdev\lib\site-packages\xyzpy\plot\xyz_cmaps.py:6: MatplotlibDeprecationWarning:
The revcmap function was deprecated in Matplotlib 3.2 and will be removed two minor releases later. Use Colormap.reversed() instead.
return LinearSegmentedColormap(name, cm.revcmap(cmap._segmentdata))
*** Setting up demo fitting workspace and main `data` class object...
For more details see https://pemtk.readthedocs.io/en/latest/fitting/PEMtk_fitting_basic_demo_030621-full.html
To use local source code, pass the parent path to this script at run time, e.g. "setup_fit_demo ~/github"
* Loading packages...