Algorithm "Max Modulation" was not yet exposed in the Python API
-
The current extractor essentially calculates the current between two electrodes by integrating the current density field through a closed surface (defined as an isopotential surface surrounding one electrode -the user can use the default isopotential value or customize it, this will affect this number of NaNs). To access these parameters as part of your code use the following:
current_extractor.IsoSurfacePerCentThreshold = Enter Value
current_extractor.SurfaceRefinement = Enter Value -
@halder thank you for the explanation and laying out the steps for scaling the field. I'm also trying to normalize my current to 1mA in my simulations. However, I'm running an older version of sim4life, v6.2. Is this "Current Extractor" tool only available in newer versions of the software? Are there any concerns with backwards compatibility of previous models if I were to update to the current version of sim4life?
I was following the steps on an old post and using the "Total Flux" to evaluate my currents. Would an equivalent method to the "Current Extractor" tool be to evaluate "Total Flux" for the Absolute Value of J field on the surface of my boundary condition? Thanks in advance
-
@halder This is the max modulation value I extracted, and the vast majority of the values are NaN. However, when I checked the slice viewer, I didn't notice any issues. Are these NaN values treated as 0 in the slice viewer? I extracted this value to create a 3D dataset, so I'm a bit confused about how to handle these NaN values.
-
As mentioned changing IsoSurfacePerCentThreshold/SurfaceRefinement will effect the NaNs calculated. I would start with using the default, then before extracting the field quantities applying a NaN filter (which will replace it with 0s) and then exporting the data. Then go back and recalculate using the current extractor by refining these quantities and follow the same procedure and check what the difference is just to be sure.
-
@halder After normalizing both Overall Fields to 1mA and using Max Modulation, I see that there are two weights. What is the purpose of this? If I want to see the superimposed field of 1.8mA and 0.2mA, which corresponds to a 9:1 TI field, should I normalize the Overall Fields to 1.8mA and 0.2mA respectively and then calculate using Max Modulation with weight of 1 and 1 , or should I directly use the fields normalized to 1mA and then use weights of 9 and 1 for Max Modulation?
-
@halder When I performed TI simulation using the spherical model, I found that if I changed the current direction of one pair of electrodes, the maximum value of the TI Max (x, y, z) slice remained unchanged. Changing the current of one pair of electrodes should have shifted from the original same-direction superposition to a reverse weakening, so why does it remain unchanged? Is it because Max Modulation only uses EM for calculations?