:py:mod:`pemtk.fit._conv` ========================= .. py:module:: pemtk.fit._conv Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: pemtk.fit._conv.pdConv pemtk.fit._conv.pdConvRef pemtk.fit._conv.pdConvSetFit .. py:function:: pdConv(self, fitVars=['success', 'chisqr', 'redchi'], paramVars=['value', 'stderr', 'vary', 'expr'], dataRange=None, batches=None) Basic conversion for set of fit results > Pandas, long format. Extract fit and parameter results from lmFit objects and stack to PD dataframe. :param fitVars: Values to extract from lmfit result object (per fit). :type fitVars: optional, list, default = ['success', 'chisqr', 'redchi'] :param paramVars: Values to extract from lmfit params object (per parameter per fit). :type paramVars: optional, list, default = ['value', 'stderr', 'vary', 'expr'] :param dataRange: Range of indexes to use, defaults to [0, self.fitInd]. :type dataRange: optional, list, default = None :param batches: Additional batch of labelling for fits. - If int, label as ceil(fit #)/batches. E.g. batches = 100 will label fits per 100. - If list, use as labels per fit. (NOT YET IMPLEMENTED) :type batches: optional, int, default = None :param Todo: :param - Additional batching options: :param inc. by file for multiple read case.: :param 13/07/22: :type 13/07/22: Added type checking and casting, this seems to be an issue now/sometimes (PD version?) - currently defaulting all types to 'object' in testing, although was working previously! .. py:function:: pdConvRef(self, paramVars=['value'], outputIndex=['Fit', 'Type', 'pn']) Convert reference params set to reference PD table. Basic routine stripped from main pdConv() method for reuse elsewhere. TODO: add flexibility here. 13/07/22: Added type checking and casting, this seems to be an issue now/sometimes (PD version?) - currently defaulting all types to 'object' in testing, although was working previously! .. py:function:: pdConvSetFit(self, matE, colDim='it') Restack matE to pd.DataFrame and force to 1D. Utility function for setting up fit parameter sets.