def toRecArray(self, returnType='RealImag'):
    "\n        Returns a numpy.recarray for a SimpegNSEM impedance data object.\n\n        :param returnType: Switches between returning a rec array where the impedance is split to real and imaginary ('RealImag') or is a complex ('Complex')\n        :type returnType: str, optional\n        :rtype: numpy.recarray\n        :return: Record array with data, with indexed columns\n        "
    dtRI = [('freq', float), ('x', float), ('y', float), ('z', float), ('zxxr', float), ('zxxi', float), ('zxyr', float), ('zxyi', float), ('zyxr', float), ('zyxi', float), ('zyyr', float), ('zyyi', float), ('tzxr', float), ('tzxi', float), ('tzyr', float), ('tzyi', float)]
    dtCP = [('freq', float), ('x', float), ('y', float), ('z', float), ('zxx', complex), ('zxy', complex), ('zyx', complex), ('zyy', complex), ('tzx', complex), ('tzy', complex)]
    for src in self.survey.source_list:
        locs = src.receiver_list[0].locations
        if (locs.shape[1] == 1):
            locs = np.hstack((np.array([[0.0, 0.0]]), locs))
        elif (locs.shape[1] == 2):
            locs = np.hstack((np.array([[0.0]]), locs))
        tArrRec = np.concatenate(((src.freq * np.ones((locs.shape[0], 1))), locs, (np.nan * np.ones((locs.shape[0], 12)))), axis=1).view(dtRI)
        typeList = [[rx.orientation, rx.component, self[(src, rx)]] for rx in src.receiver_list]
        for (nr, (k, c, val)) in enumerate(typeList):
            zt_type = ('t' if ('z' in k) else 'z')
            key = ((zt_type + k) + c[0])
            tArrRec[key] = mkvc(val, 2)
        try:
            outTemp = recFunc.stack_arrays((outTemp, tArrRec))
        except NameError:
            outTemp = tArrRec.copy()
        if ('RealImag' in returnType):
            outArr = outTemp.copy()
        elif ('Complex' in returnType):
            outArr = np.empty(outTemp.shape, dtype=dtCP)
            for comp in ['freq', 'x', 'y', 'z']:
                outArr[comp] = outTemp[comp].copy()
            for comp in ['zxx', 'zxy', 'zyx', 'zyy', 'tzx', 'tzy']:
                outArr[comp] = (outTemp[(comp + 'r')].copy() + (1j * outTemp[(comp + 'i')].copy()))
        else:
            raise NotImplementedError('{:s} is not implemented, as to be RealImag or Complex.')
    return outArr
Returns a numpy.recarray for a SimpegNSEM impedance data object.

:param returnType: Switches between returning a rec array where the impedance is split to real and imaginary ('RealImag') or is a complex ('Complex')
:type returnType: str, optional
:rtype: numpy.recarray
:return: Record array with data, with indexed columns
def toRecArray(self, returnType='RealImag'):
    "\n        Returns a numpy.recarray for a SimpegNSEM impedance data object.\n\n        :param returnType: Switches between returning a rec array where the impedance is split to real and imaginary ('RealImag') or is a complex ('Complex')\n        :type returnType: str, optional\n        :rtype: numpy.recarray\n        :return: Record array with data, with indexed columns\n        "
    dtRI = [('freq', float), ('x', float), ('y', float), ('z', float), ('zxxr', float), ('zxxi', float), ('zxyr', float), ('zxyi', float), ('zyxr', float), ('zyxi', float), ('zyyr', float), ('zyyi', float), ('tzxr', float), ('tzxi', float), ('tzyr', float), ('tzyi', float)]
    dtCP = [('freq', float), ('x', float), ('y', float), ('z', float), ('zxx', complex), ('zxy', complex), ('zyx', complex), ('zyy', complex), ('tzx', complex), ('tzy', complex)]
    for src in self.survey.source_list:
        locs = src.receiver_list[0].locations
        if (locs.shape[1] == 1):
            locs = np.hstack((np.array([[0.0, 0.0]]), locs))
        elif (locs.shape[1] == 2):
            locs = np.hstack((np.array([[0.0]]), locs))
        tArrRec = np.concatenate(((src.freq * np.ones((locs.shape[0], 1))), locs, (np.nan * np.ones((locs.shape[0], 12)))), axis=1).view(dtRI)
        typeList = [[rx.orientation, rx.component, self[(src, rx)]] for rx in src.receiver_list]
        for (nr, (k, c, val)) in enumerate(typeList):
            zt_type = ('t' if ('z' in k) else 'z')
            key = ((zt_type + k) + c[0])
            tArrRec[key] = mkvc(val, 2)
        try:
            outTemp = recFunc.stack_arrays((outTemp, tArrRec))
        except NameError:
            outTemp = tArrRec.copy()
        if ('RealImag' in returnType):
            outArr = outTemp.copy()
        elif ('Complex' in returnType):
            outArr = np.empty(outTemp.shape, dtype=dtCP)
            for comp in ['freq', 'x', 'y', 'z']:
                outArr[comp] = outTemp[comp].copy()
            for comp in ['zxx', 'zxy', 'zyx', 'zyy', 'tzx', 'tzy']:
                outArr[comp] = (outTemp[(comp + 'r')].copy() + (1j * outTemp[(comp + 'i')].copy()))
        else:
            raise NotImplementedError('{:s} is not implemented, as to be RealImag or Complex.')
    return outArr