예제 #1
0
    def hz_kernel_vertical_magnetic_dipole(
        self, lamda, f, n_layer, sig, chi, depth, h, z,
        flag, output_type='response'
    ):

        """
            Kernel for vertical magnetic component (Hz) due to
            vertical magnetic diopole (VMD) source in (kx,ky) domain

        """
        u0 = lamda
        coefficient_wavenumber = 1/(4*np.pi)*lamda**3/u0

        n_frequency = self.survey.n_frequency
        n_layer = self.survey.n_layer
        n_filter = self.n_filter

        if output_type == 'sensitivity_sigma':
            drTE = np.zeros([n_layer, n_frequency, n_filter], dtype=np.complex128, order='F')
            rte_fortran.rte_sensitivity(f, lamda, sig, chi, depth, self.survey.half_switch, drTE, n_layer, n_frequency, n_filter)

            kernel = drTE * np.exp(-u0*(z+h)) * coefficient_wavenumber
        else:
            rTE = np.empty([n_frequency, n_filter], dtype=np.complex128, order='F')
            rte_fortran.rte_forward(f, lamda, sig, chi, depth, self.survey.half_switch, rTE, n_layer, n_frequency, n_filter) 

            kernel = rTE * np.exp(-u0*(z+h)) * coefficient_wavenumber
            if output_type == 'sensitivity_height':
                kernel *= -2*u0

        return kernel
예제 #2
0
파일: EM1D.py 프로젝트: simpeg/simpegEM1D
    def hz_kernel_vertical_magnetic_dipole(
        self, lamda, f, n_layer, sig, chi, depth, h, z,
        flag, output_type='response'
    ):

        """
            Kernel for vertical magnetic component (Hz) due to
            vertical magnetic diopole (VMD) source in (kx,ky) domain

        """
        u0 = lamda
        coefficient_wavenumber = 1/(4*np.pi)*lamda**3/u0

        n_frequency = self.survey.n_frequency
        n_layer = self.survey.n_layer
        n_filter = self.n_filter

        if output_type == 'sensitivity_sigma':
            drTE = np.zeros(
                [n_layer, n_frequency, n_filter],
                dtype=np.complex128, order='F'
            )
            if rte_fortran is None:
                drTE = rTEfunjac(
                    n_layer, f, lamda, sig, chi, depth, self.survey.half_switch
                )
            else:
                rte_fortran.rte_sensitivity(
                    f, lamda, sig, chi, depth, self.survey.half_switch, drTE,
                    n_layer, n_frequency, n_filter
                    )

            kernel = drTE * np.exp(-u0*(z+h)) * coefficient_wavenumber
        else:
            rTE = np.empty(
                [n_frequency, n_filter], dtype=np.complex128, order='F'
            )
            if rte_fortran is None:
                    rTE = rTEfunfwd(
                        n_layer, f, lamda, sig, chi, depth,
                        self.survey.half_switch
                    )
            else:
                rte_fortran.rte_forward(
                    f, lamda, sig, chi, depth, self.survey.half_switch,
                    rTE, n_layer, n_frequency, n_filter
                )

            kernel = rTE * np.exp(-u0*(z+h)) * coefficient_wavenumber
            if output_type == 'sensitivity_height':
                kernel *= -2*u0

        return kernel
예제 #3
0
    def hz_kernel_circular_loop(
        self, lamda, f, n_layer, sig, chi, depth, h, z, I, a,
        flag,  output_type='response'
    ):

        """

        Kernel for vertical magnetic component (Hz) at the center
        due to circular loop source in (kx,ky) domain

        .. math::

            H_z = \\frac{Ia}{2} \int_0^{\infty} [e^{-u_0|z+h|} +
            \\r_{TE}e^{u_0|z-h|}]
            \\frac{\lambda^2}{u_0} J_1(\lambda a)] d \lambda

        """

        n_frequency = self.survey.n_frequency
        n_layer = self.survey.n_layer
        n_filter = self.n_filter

        w = 2*np.pi*f
        u0 = lamda
        radius = np.empty([n_frequency, n_filter], order='F')
        radius[:, :] = np.tile(a.reshape([-1, 1]), (1, n_filter))

        coefficient_wavenumber = I*radius*0.5*lamda**2/u0

        if output_type == 'sensitivity_sigma':
            drTE = np.zeros([n_layer, n_frequency, n_filter], dtype=np.complex128, order='F')
            rte_fortran.rte_sensitivity(f, lamda, sig, chi, depth, self.survey.half_switch, drTE, n_layer, n_frequency, n_filter)

            kernel = drTE * np.exp(-u0*(z+h)) * coefficient_wavenumber
        else:
            rTE = np.empty([n_frequency, n_filter], dtype=np.complex128, order='F')
            rte_fortran.rte_forward(f, lamda, sig, chi, depth, self.survey.half_switch, rTE, n_layer, n_frequency, n_filter) 

            if flag == 'secondary':
                kernel = rTE * np.exp(-u0*(z+h)) * coefficient_wavenumber
            else:
                kernel = rTE * (
                    np.exp(-u0*(z+h)) + np.exp(u0*(z-h))
                ) * coefficient_wavenumber

            if output_type == 'sensitivity_height':
                kernel *= -2*u0

        return kernel
예제 #4
0
파일: EM1D.py 프로젝트: simpeg/simpegEM1D
    def hz_kernel_circular_loop(
        self, lamda, f, n_layer, sig, chi, depth, h, z, I, a,
        flag,  output_type='response'
    ):

        """

        Kernel for vertical magnetic component (Hz) at the center
        due to circular loop source in (kx,ky) domain

        .. math::

            H_z = \\frac{Ia}{2} \int_0^{\infty} [e^{-u_0|z+h|} +
            \\r_{TE}e^{u_0|z-h|}]
            \\frac{\lambda^2}{u_0} J_1(\lambda a)] d \lambda

        """

        n_frequency = self.survey.n_frequency
        n_layer = self.survey.n_layer
        n_filter = self.n_filter

        w = 2*np.pi*f
        u0 = lamda
        radius = np.empty([n_frequency, n_filter], order='F')
        radius[:, :] = np.tile(a.reshape([-1, 1]), (1, n_filter))

        coefficient_wavenumber = I*radius*0.5*lamda**2/u0

        if output_type == 'sensitivity_sigma':
            drTE = np.empty(
                [n_layer, n_frequency, n_filter],
                dtype=np.complex128, order='F'
            )
            if rte_fortran is None:
                    drTE[:, :] = rTEfunjac(
                        n_layer, f, lamda, sig, chi, depth,
                        self.survey.half_switch
                    )
            else:
                rte_fortran.rte_sensitivity(
                    f, lamda, sig, chi, depth, self.survey.half_switch,
                    drTE, n_layer, n_frequency, n_filter
                )

            kernel = drTE * np.exp(-u0*(z+h)) * coefficient_wavenumber
        else:
            rTE = np.empty(
                [n_frequency, n_filter], dtype=np.complex128, order='F'
            )
            if rte_fortran is None:
                rTE[:, :] = rTEfunfwd(
                    n_layer, f, lamda, sig, chi, depth, self.survey.half_switch
                )
            else:
                rte_fortran.rte_forward(
                    f, lamda, sig, chi, depth, self.survey.half_switch,
                    rTE, n_layer, n_frequency, n_filter
                )

            if flag == 'secondary':
                kernel = rTE * np.exp(-u0*(z+h)) * coefficient_wavenumber
            else:
                kernel = rTE * (
                    np.exp(-u0*(z+h)) + np.exp(u0*(z-h))
                ) * coefficient_wavenumber

            if output_type == 'sensitivity_height':
                kernel *= -2*u0

        return kernel