postprocessing.py

Define the functions for post-processing stage.

petgem.postprocessing.postprocessing.EpReceiverComputation(model, point)[source]

Compute the primary electric field for an array of point (receivers).

Parameters:
  • model (object_modelling) – CSEM modelling with physical parameters.
  • point (ndarray) – receiver spatial coordinates.
Returns:

primary electric field on receivers.

Return type:

ndarray.

petgem.postprocessing.postprocessing.EsReceiverComputation(field, coordEle, coordReceiver, nodesEle)[source]

Compute the secondary electric field on receivers.

Parameters:
  • field (ndarray) – secondary field to be interpolated.
  • coordElement (ndarray) – element spatial coordinates.
  • coordReceiver (ndarray) – receiver spatial coordinates.
  • nodesEle (ndarray) – nodal indices of element (element container).
Returns:

secondary electric field on receivers.

Return type:

ndarray.

petgem.postprocessing.postprocessing.EtReceiverComputation(primary_field, secondary_field)[source]

Compute the total electric field on receivers.

Parameters:
  • primary_field (ndarray) – primary electric field on receiver.
  • secondary_field (ndarray) – secondary electric field on receiver.
Returns:

total electric field on receivers.

Return type:

ndarray.

petgem.postprocessing.postprocessing.computeFieldsReceiver(modelling, coordReceiver, coordElement, nodesElement, x_field)[source]

Compute the CSEM modelling output: primary electric field, secondary electric field and total electric field on receivers position.

Parameters:
  • model (object_modelling) – CSEM modelling with physical parameters.
  • coordReceiver (ndarray) – receiver spatial coordinates.
  • coordElement (ndarray) – element spatial coordinates.
  • nodesElement (ndarray) – nodal indices of element (element container).
  • x_field (ndarray) – vector solution for receiver.
Returns:

primary, secondary and total electric field

Return type:

ndarray

petgem.postprocessing.postprocessing.create_directory_output(out_dir)[source]
petgem.postprocessing.postprocessing.export_output(primary_field, secondary_field, total_field, out_prefix, out_dir)[source]

Export the results of CSEM FM modelling by using EFEM in a HDF5 format, namely, this function export the primary field (Ep), secondary field (Es) and total field (Et).

Parameters:
  • primary_field (ndarray) – primary electric field on receivers.
  • secondary_field (ndarray) – secondary electric field on receivers.
  • total_field (ndarray) – total electric field on receivers.
Returns:

None

petgem.postprocessing.postprocessing.postprocessing(model, field, mesh, edgesN, elemsE)[source]

Compute the CSEM modelling output: primary electric field, secondary electric field and total electric field on receivers position.

Parameters:
  • model (object_modelling) – CSEM modelling with physical parameters.
  • field (ndarray) – secondary field to be interpolated.
  • mesh (mesh_object) – mesh object with element/nodes connectivity, element/nodes connectivity, nodal coordinates and element/sigma values.
  • edgesN (ndarray) – edges/nodes connectivity.
  • elemsE (ndarray) – element/edges connectivity.
petgem.postprocessing.postprocessing.read_receivers_file(file_name)[source]

Read a receivers file in a hdf5 format. It file contain receivers spatial coordinates.

Parameters:receivers_file (str) – file name to be readed.
Returns:receivers spatial coordinates.
Return type:ndarray.
petgem.postprocessing.postprocessing.unitary_test()[source]

Unitary test for post_processing.py script.