MicEMD.fdem package

Submodules

MicEMD.fdem.collection module

The Collection class, conclude the parameters about collecting in underground detection system

Class: - Collection: the class conclude the parameters about collecting in FDEM

class MicEMD.fdem.collection.Collection(spacing, height, SNR, x_min, x_max, y_min, y_max, collection_direction)

Bases: object

spacing: float

the spacing of collection in x and y axis

height: float

The height of the detector above the ground

SNR: float

the SNR of the environment

x_min: float

the min value of the x axis collection

x_max: float

the max value of the x axis collection

y_min: float

the min value of the y axis collection

y_max: float

the max value of the y axis collection

collection_direction: str

the direction of the collection magnetic field

receiver_location:

return the sample location of the receiver

source_locations:

return the location of the transmitter

property receiver_location

define and get the sample location of the receiver

res: 2-D-ndarry

the location of the receiver, conclude the location of xyz axis every line is a location [x, y, z], the number of row represent the number of survey point

property source_locations

define and get the sample location of the transmitter

res: 2-D-ndarry

the location of the receiver, conclude the location of xyz axis every line is a location [x, y, z], the number of row represent the number of survey point

MicEMD.fdem.detector module

The detector class, represent the detector in FDEM

Class: - Detector: the detector class in FDEM

class MicEMD.fdem.detector.Detector(radius, current, frequency, pitch, roll)

Bases: object

the detector of the FDEM

radius: float

the radius of the detector

current: float

the current of the detector

frequency: float

the frequency of the detector

pitch: float

the pitch angle of the detector

roll: float

the roll angle of the detector

Methods: mag_moment:

return the magnetic moment value of transmitter coil

property mag_moment

Calculate magnetic moment value of transmitter coil according to detector parameters.

TYPEfloat

The value of magnetic moment of z axis.

MicEMD.fdem.inversion module

The inversion class in FDEM

Class: - Inversion: the implement class of the BaseFDEMInversion

Methods: - inverse: the interface of the inverse in FDEM

class MicEMD.fdem.inversion.Inversion(data, method, inv_para)

Bases: MicEMD.fdem.inversion.BaseFDEMInversion

inverse the properties of the target

based on the optimization algorithms to solve the inversion problem

data: tuple

the data conclude the observed data, target class and detector class

method: str

the name of the optimization

inv_para: dict

the parameters setting of the optimization

true_properties:

Returns the true properties of the target

inv_objective_function:

Returns the calculated objective_function value in x position

inv_objectfun_gradient:

Returns the calculated gradient value in x position

inv_residual_vector:

Returns the residual vector.

inv_get_preicted_data:

Returns Predicted secondary fields calculated by the dipole model at all receiver_loc.

inv_forward_calculation:

Returns predicted secondary fields according the linear magnetic dipole model at receiver_loc.

inv_residual_vector_grad:

Returns the gradient of all the residual vectors.

inv_forward_grad:

Returns the gradient of inv_forward_calculation()

polar_tensor_to_properties:

ransform the polar tensor to properties transform M11, M22, M33, M12, M13, M23 to polarizability and pitch and roll angle and return

find_xyz_polarizability_index:

make the order of eigenvalue correspond to the polarizability order

run:

run the process of the inversion and return the estimate values

error:

Returns the error between true value and estimate value

property error

calculate the error of the true value and estimate value

error: ndarray

return the error

find_xyz_polarizability_index(polarizability)

make the order of eigenvalue correspond to the polarizability order

polarizabilityTYPE

DESCRIPTION.

None.

inv_forward_calculation(detector, receiver_loc, x)

Forward calculation in inversion process. It generates predicted secondary fields according the linear magnetic dipole model at receiver_loc.

detector : class Detector receiver_loc : numpy.array, size=3

A receiver location.

xnumpy.array, size=9

See inv_objective_function x.

Bnumpy.mat, shape=(3*1)

Predicted secondary field.

Wan Y, Wang Z, Wang P, et al. A Comparative Study of Inversion Optimization Algorithms for Underground Metal Target Detection[J]. IEEE Access, 2020, 8: 126401-126413.

inv_forward_grad(detector, receiver_loc, x)

Use the difference method to calculate the gradient of inv_forward_calculation().

detector : class Detector receiver_loc : numpy.array, size=3

A receiver location.

xnumpy.array, size=9

See inv_objective_function x.

grad : numpy.mat, shape=(3*9)

inv_get_preicted_data(detector, receiver_locations, x)

It generates predicted secondary fields at all receiver locations.

detector : class Detector receiver_locations : numpy.ndarray, shape=(N*3)

See inv_objective_function receiver_locations.

xnumpy.array, size=9

See inv_objective_function x.

predicted_mag_datanumpy.ndarray, shape=(N*3)

Predicted secondary fields.

inv_objectfun_gradient(detector, receiver_locations, true_mag_data, x)

The gradient of the objective function with respect to x.

detector : class Detector receiver_locations : numpy.ndarray, shape=(N*3)

See inv_objective_function receiver_locations.

true_mag_datanumpy.ndarray, shape=(N*3)

See inv_objective_function true_mag_data.

xnumpy.array, size=9

See inv_objective_function x.

gradnumpy.array, size=9

The partial derivative of the objective function with respect to nine parameters.

inv_objective_function(detector, receiver_locations, true_mag_data, x)

Objective function.

detector : class Detector receiver_locations : numpy.ndarray, shape=(N*3), N=len(receiver_locations)

All acquisition locations of the detector. Each row represents an acquisition location and the three columns represent x, y and z axis locations of an acquisition location.

true_mag_datanumpy.ndarray, shape=(N*3)

All secondary fields of acquisition locations (x, y and z directions).

xnumpy.array, size=9

target’s parameters in inversion process, including position x, y, z, polarizability M11, M22, M33, M12, M13, M23.

objective_fun_value : float

inv_residual_vector(detector, receiver_locations, true_mag_data, x)

Construct the residual vector.

detector : class Detector receiver_locations : numpy.ndarray, shape=(N*3)

See inv_objective_function receiver_locations.

true_mag_datanumpy.ndarray, shape=(N*3)

See inv_objective_function true_mag_data.

xnumpy.array, size=9

See inv_objective_function x.

residualnumpy.mat, shape=(N*3,1)

Residual vector.

inv_residual_vector_grad(detector, receiver_locations, x)

Calculate the gradient of all the residual vectors.

detector : class Detector receiver_locations : numpy.ndarray, shape=(N * 3)

See inv_objective_function receiver_locations.

xnumpy.array, size=9

See inv_objective_function x.

gradnumpy.mat, shape=(N*3,9)

Jacobian matrix of the residual vector.

polar_tensor_to_properties(polar_tensor_vector)

transform the polar tensor to properties transform M11, M22, M33, M12, M13, M23 to polarizability and pitch and roll angle

polar_tensor_vectornumpy.array, size=6

M11, M22, M33, M12, M13, M23.

None.

run()

run the process of the inversion

res: ndarray

return the estimate properties[x, y, z, bx, by, bz, pitch, roll]

property true_properties

return the true properties

res: ndarry

return the true properties, conclude position, polarizability, pitch and roll angle of the target, amount to 8 inverse parameters

MicEMD.fdem.inversion.inverse(data, method, inv_para, *args, **kwargs)

the interface is used to handle the process of inversion

data: tuple

the data conclude the observed data, target class and detector class

method: str

the name of the optimization

inv_para: dict

the parameters setting of the optimization

res: dict

res conclude the predicted value, true value and the error value

MicEMD.fdem.model module

The model class, represent the model in FDEM

Class: - Model: the implement class of the BaseFDEMModel

class MicEMD.fdem.model.Model(Survey)

Bases: MicEMD.fdem.model.BaseFDEMModel

the model class we simulate the FDEM response based on Simpeg in MicEMD

Survey: class

the Survey class

dpred:

Returns the observed data

mag_data_add_noise:

add the noise for the mag_data and return

add_wgn:

add the noise for the data

add_wgn(data, snr)

add the noise for the data

dataTYPE

DESCRIPTION.

snrTYPE

DESCRIPTION.

res: ndarry

dpred()
getIndicesCylinder(center, radius, height, oritation, ccMesh)

Create the mesh indices of a custom cylinder

centerTYPE

DESCRIPTION.

radiusTYPE

DESCRIPTION.

heightTYPE

DESCRIPTION.

oritationTYPE

DESCRIPTION.

ccMeshTYPE

DESCRIPTION.

None.

https://zhuanlan.zhihu.com/p/24760577

mag_data_add_noise(mag_data, snr)

add the noise for the mag_data

mag_dataTYPE

DESCRIPTION.

snrTYPE

DESCRIPTION.

res: ndarry

MicEMD.fdem.results module

MicEMD.fdem.simulation module

The simulation in TDEM

Class: - Simulation: the implement class of the BaseFDEMSimulation

Methods: - simulate: the interface of the simulation in FDEM

class MicEMD.fdem.simulation.Simulation(model)

Bases: MicEMD.fdem.simulation.BaseSimulation

simulate the electromagnetic response

model: class

the model class which call the pred method to generate the observed data

pred: ndarry

Returns the observed data

pred()
MicEMD.fdem.simulation.simulate(target, detector, collection, model='simpeg', *args, **kwargs)

the simulate interface is used to handle organization and dispatch of directives of the simulation

target: class

the target class

detector: class

the detector class

collection: class

the collection class

model: class

the model class

result: ndarry

the observed data conclude the position and the magnetic field intensity

MicEMD.fdem.source module

The Source class, represent the source in FDEM

Class: - Source: implement class of the BaseTDEMSource in FDEM

class MicEMD.fdem.source.Source(Target, Detector, Collection, *args)

Bases: MicEMD.fdem.source.BaseFDEMSource

property source_list

return the source list conclude the information of transmitter and receiver

res: list

res conclude all the MagDipole class in simpeg

MicEMD.fdem.survey module

The survey class, represent the survey in FDEM

Class: - Survey: the implement class of the BaseFDEMSurvey

class MicEMD.fdem.survey.Survey(Source)

Bases: MicEMD.fdem.survey.BaseFDEMSurvey

property survey

MicEMD.fdem.target module

The target class, represent the target in underground detection

Class: - Target: the target class in FDEM

class MicEMD.fdem.target.Target(conductivity, permeability, radius, pitch, roll, length, position_x, position_y, position_z, **kwargs)

Bases: object

Refer in particular to cylinder targets.

conductivity: float

the conductivity of the target

permeability: float

the permeability of the target

radius: float

The radius of the base of a cylinder

pitch: float

the pitch angle of the cylinder

roll: float

the roll angle of the cylinder

length: float

the length of the target

position: list

the position of the target, [x, y, z]

get_principal_axis_polarizability

return the principal axis polarizabilities of the target

get_principal_axis_polarizability(frequency)

Calculate the principal axis polarizabilities of the target according to the target’s parameters and the frequency of primary field.

frequencyfloat

Frequency of the primary field.

polarizability : numpy.array, size=3

Wan Y, Wang Z, Wang P, et al. A Comparative Study of Inversion Optimization Algorithms for Underground Metal Target Detection[J]. IEEE Access, 2020, 8: 126401-126413. equation (9)(10).

Module contents