Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CEM electrodes: Example using Python and complex forward modeling #359

Draft
wants to merge 30 commits into
base: dev
Choose a base branch
from

Conversation

m-weigand
Copy link
Contributor

Dear all,

I'm opening this draft pull request to make you aware of this ongoing work - its by far not finished yet and will probably still take some time before merging can be considered. Naturally, I appreciate any input/suggestions at any point..

This works aims to:

  • provide a pygimli-example of using CEM electrodes using the Python interface.
  • adapt the Python classes (i.e., ERTManager) along the way to facilitate using CEM electrodes
  • use this/these examples to document some peculiarities of using CEM electrodes (e.g., electrode assignments are a mix of electrode position and electrode number, which can be confusing)
  • make the CEM modeling work with complex resistivity forward modeling (but not to extend the CEM model to complex contact impedances!)

So far I mostly committed the complex modeling parts - I still need to polish a basic CEM example before committing.

are still real!).
* assembleCompleteElectrodeModel_ is more or less copied from its
  real-values counterpart, with a few required type changes
* potentialsCEM_ is resized to hold the imaginary parts in calculateK_
* imaginary parts are then stored in potentialsCEM using the "new"
  inline function TmpToImagHACK
* Warning: This commit still contains debug output
	* cast 'start' and 'end' parameters to a numpy array to allow
	  for array-based operations
	* Slightly rework the docstring
@carsten-forty2
Copy link
Contributor

Thanks for the work.

We need to check in detail if there are some side effects, hope this will not take to long.

real-valued mode even if a complex modeling is requested
contact resistances for CEM electrodes:
	* add the setter function setContactResistances so we can
	  directly set electrode contact resistances from the Python
	  side
	* adding this function required slight changes in the internal
	  handling logic. Previously the code needed only to look for
	  contact impedances registered using the setter function, and thus it
	  was easier to decide which resistance type to actually use
          (contact impedances and contact resistances can be converted to each
          other if the electrode surface area is known). Now we solve this by an
          explicit parameter `use_cimp` which decides if the provided impedance
          (=true) or resistance (=false) vectors shall be used further.
	* setter functions are overwritten by input from files
	  contactImpedance.map and contactResistance.map.
	* resistance input always overwrites impedance input
…esistances parameters that can be used to set CEM contact impedances and contact resistances
if-statement and make output more consistent
contact impedances and resistances with the real-valued version of this
function
and setting of multiple columns:

	data = pg.DataContainer()
	data[['a', 'b']] = [[1, 2, 3], [4, 5, 6]]
	print(data[['a', 'b']])

Also add a few tests for this new functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants