:py:mod:`pemtk.fit._sym` ======================== .. py:module:: pemtk.fit._sym Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: pemtk.fit._sym.symCheckDefns pemtk.fit._sym.symCheck .. py:function:: symCheckDefns() Set dictionary of lambda functions for matrix element symmetry relation checks. Currently set to check for identity, abs, phase & complex rotations (+/-pi/2). .. py:function:: symCheck(self, pdTest=None, matE=None, colDim='it', lams=None, verbose=1) Check symmetrization of input matrix elements. :param pdTest: Matrix elements to check, as set in a Pandas table format. Currently expects 1D array of matrix elements, as set in setMatEFit(). If None, matE will be used to create the test data. :type pdTest: pandas DataFrame, optional, default = None :param matE: Matrix elements to check. If None, then uses self.data[self.subKey]['matE'] :type matE: Xarray, optional, default = None :param colDims: Quick hack to allow for restacking via ep.multiDimXrToPD, this will set to cols = 'it', then restack to 1D dataframe. This should always work for setting matE > fit parameters, but can be overridden if required. :type colDims: dict, default = 'it' :param lams: Dictionary of test lambda functions. If not set, will use lams = symCheckDefns() :type lams: dict, optional, default = None :returns: * *dict* -- Set of parameter mappings/constraints, suitable to use for self.setMatEFit(paramsCons = newDict) * *dict of DataFrames* -- - 'unique', Reduced set of unique matrix elements only. - 'constraints', List of constraints (as per parameters dict). - 'tests', Full list of tests & relations found. TODO: - Wrap for class. - Input checks and set default cases (see setMatEFit()). Should tidy to single input and then check type?