Skip to content
  • Export to CSV file

    Python API
    1
    0 Votes
    1 Posts
    8 Views
    No one has replied
  • 0 Votes
    4 Posts
    134 Views
    C
    Hi In Sim4Life the tissue properties are provided as a single values. However, the IT’IS website provides supplemental information on the tissue properties. In addition to the average value, you can find the standard deviation, minima and maxima. Low Frequency (Conductivity) » IT'IS Foundation](https://itis.swiss/virtual-population/tissue-properties/database/low-frequency-conductivity/)
  • Compute titration thresholds in current

    T-Neuro
    3
    0 Votes
    3 Posts
    646 Views
    AntoninoMCA
    @KK The titration procedure provides a scaling factor that must be applied to the stimulation source (incident E-field, input current, or voltage applied at electrode pairs) in order to initiate an action potential in a fiber or neuron. Here are some examples depending on the stimulation source: Source: Incident E-field (e.g., induced by TMS) Assume the incident electric field is 1 V/m, and the titration procedure yields a titration factor, tf. The threshold E-field is therefore tf [V/m]. If this 1 V/m field results from a coil current rate of change dI/dt = A [A/s], then the threshold dI/dt required is A × tf [A/s]. Source: Applied voltage Let the applied voltage across an electrode pair be V = V₀. This value is also used as the Dirichlet boundary condition in low-frequency (LF) simulations. If the titration factor is tf, the threshold voltage becomes V₀ × tf [V]. Source: Applied current Let the applied current to an electrode pair be I = I₀, typically derived from LF simulations via a current flux integrator. With a titration factor tf, the threshold current is I₀ × tf [A]. The titration factor tf is a dimensionless number that gains physical meaning when applied to the relevant stimulation quantity (electric field, voltage, or current). @LJ was suggesting the correct course of action. I hope this clarification is helpful!
  • Error in TI tutorial

    Python API
    19
    0 Votes
    19 Posts
    2k Views
    brynB
    BTW. this is a temporary fix, which breaks inline plotting with matplotlib. We have fixed it in the release branch. A slightly improved workaround may be to temporarily unset the MPLBACKEND environment variable before the call to HeadModelGeneration, e.g. something like this import os original_backend = os.environ.pop("MPLBACKEND", None) labelfield = HeadModelGeneration( images=image_list, add_dura=True, close_skin=True, close_csf=True, close_skull=True, version=ImageML.eHeadModel.head16, ) if original_backend is not None: os.environ["MPLBACKEND"] = original_backend
  • Electrode with Nerve Model tutorial

    Sim4Life
    5
    0 Votes
    5 Posts
    75 Views
    H
    Hi @cbenj33 we are aware of the inconsistencies (we have changed the position of the nerve and electrode, which will be part of the next release happening soon). For now, I am emailing you the pdf version of this tutorial documentation and explanations regarding the errors.
  • Inquiry Regarding TI Simulation Setup in Sim4Life

    Python API
    1
    0 Votes
    1 Posts
    39 Views
    No one has replied
  • 0 Votes
    4 Posts
    334 Views
    brynB
    thanks for this feedback. we will try to add more examples that demonstrate how to use/modify anatomical models, triangle meshes, etc.
  • Importing anatomical models in the python script

    Anatomical Models
    3
    0 Votes
    3 Posts
    433 Views
    M
    I ended up creating my Duke model in a separate script, where I first cloned him as static. Then I removed part of the body not relevant to me by boolean subtraction (entity by entity) and finally export the remain static model to a sab file, which I load in my main script instead of the entire Duke. It has been this confusion about entities and groups and what not disturbing the flow. Thanks for your suggestions bryn
  • Extraction of Tissue Properties Along a Spline

    Python API
    1
    0 Votes
    1 Posts
    92 Views
    No one has replied
  • 0 Votes
    2 Posts
    228 Views
    A
    Dear ZMT Team, I am currently studying the Temporal Interference tutorial with the SAM Head model, as provided in the Sim4Life documentation (Tutorials/EMLF/LF_Multiport.html#temporal-interference-with-sam-head). I have followed the steps carefully up to the solver stage. However, during the simulation run, I encountered the following warning: Solid X_Electrode (Selected_Electrode): PEC - no edges associated with this material and thus it is disregarded. Also, I’m not sure if the simulation problem affects the analysis. The E-field distribution doesn’t show up, but the tutorial shows it in the figure at the bottom. Could you kindly advise if this warning affects the simulation output, and how I might resolve the issue or verify my results? Thank you very much for your time and support.
  • Importing STL as Solid body

    Python API
    6
    1 Votes
    6 Posts
    691 Views
    brynB
    I tried to reproduce this doing the following. I create three entities a cylinder copy it and convert the copy to a triangle mesh generate an unstructured tetrahedral mesh Then I drag these entities to the Analysis (ModelToGridFilter in Python API). I tried to use the surface viewer, but since they have no fields, nothing is displayed (this changed since 7.0 or before - it used to display a white surface). To generate a field I used the Calculator, and added expressions like coordsY*jHat, i.e. (0, coordsY, 0) where coordsY is the y-coordinate from the points in the geometry. Create a vector viewer for each (from the left: Solid Body, TriangleMesh, UnstructuredMesh). The third one samples vector values using Line/Plane/Box sources. [image: 1749109986009-d5bc2f0e-af54-4fca-8265-1431e94207ca-image.png] To get the vectors on the surface of the UnstructuredMesh, I had to first extract the surface, via Field Data Tools -> Surface Filter [image: 1749110185730-938040d9-2fcf-4cad-a42e-7c2f0d4592ec-image.png] The generated Python ("To Python' in context menu) script for item 5 was: # This script was auto-generated by Sim4Life version 8.2.0.16890 import numpy import s4l_v1.analysis as analysis import s4l_v1.document as document import s4l_v1.model as model import s4l_v1.units as units from s4l_v1 import ReleaseVersion from s4l_v1 import Unit try: # Define the version to use for default values ReleaseVersion.set_active(ReleaseVersion.version8_2) # Creating the analysis pipeline # Adding a new ModelToGridFilter inputs = [] model_to_grid_filter = analysis.core.ModelToGridFilter(inputs=inputs) model_to_grid_filter.Name = "Cylinder 3" model_to_grid_filter.Entity = model.AllEntities()["Cylinder 3"] model_to_grid_filter.UpdateAttributes() document.AllAlgorithms.Add(model_to_grid_filter) # Adding a new FieldCalculator inputs = [model_to_grid_filter.Outputs["Unstructured Grid"]] field_calculator = analysis.field.FieldCalculator(inputs=inputs) field_calculator.Expression = u"coordsZ*kHat" field_calculator.UpdateAttributes() document.AllAlgorithms.Add(field_calculator) # Adding a new FieldSurfaceFilter inputs = [field_calculator.Outputs["Result(x,y,z)"]] field_surface_filter = analysis.field.FieldSurfaceFilter(inputs=inputs) field_surface_filter.UpdateAttributes() document.AllAlgorithms.Add(field_surface_filter) # Adding a new VectorFieldViewer inputs = [field_surface_filter.Outputs["Result(x,y,z)"]] vector_field_viewer = analysis.viewers.VectorFieldViewer(inputs=inputs) vector_field_viewer.Data.Phase = u"0°" vector_field_viewer.Vector.Plane.PlaneCenter = numpy.array([0.05300000309944153, -0.03099999949336052, 0.012000000104308128]) vector_field_viewer.UpdateAttributes() document.AllAlgorithms.Add(vector_field_viewer) except Exception as exc: import traceback traceback.print_exc() # Reset active version to default ReleaseVersion.reset() raise(exc)
  • 0 Votes
    2 Posts
    199 Views
    brynB
    The voxeler (re-)uses cached information about the geometry (solids, wires, etc.). It looks up the information for each model entity and emits this message if the cached geometry was not found. Questions: are you running this in the GUI or a script/notebook? did you potentially delete (or modify) some of the entities assigned to the simulation (I guess in voxeler settings)? If you deleted the entity or modified it in the modeler (some operations preserve the instance, while others may create a new instance and delete the old one), this would explain the error. We could improve the error message by providing more helpful instructions.
  • Simulation Combiner Channel Parameters

    Analysis & Postprocessing
    1
    0 Votes
    1 Posts
    183 Views
    No one has replied
  • 0 Votes
    1 Posts
    179 Views
    No one has replied
  • Python scripting padding settings

    Python API
    5
    0 Votes
    5 Posts
    576 Views
    T
    This is in an older version of sim4life 8.0, maybe the problem has already been fixed. Otherwise I think this was a multiport simulation but I forget now... Maybe that could be a strange bug where it works for multi but not single or vise versa.
  • 0 Votes
    5 Posts
    679 Views
    M
    So my problem was solved for the simple phantom a sphere. It can be voxeled. I am having a discussion with chatgpt about how to load Duke into the simulation section because currently it wont be voxeled. Is there a simple few lines of code that loads Duke and all the default tissue electrical properties or is it necessary to assign each tissue type in a loop or via thousands lines of code (as I have seen elsewhere)....
  • Jobs suddenly remain queued indefinitely

    Unsolved Simulations & Solvers
    13
    0 Votes
    13 Posts
    2k Views
    P
    After a call with S4L support, here is the solution for future reference: My machine had two GPUs connected, one of them old and deactivated. However, the script ExtractCudaInfo.py detected both of these in the line 'num_gpus = int(xml_root.find("attached_gpus").text)' and then got stuck trying to find information on the deactivated GPU. A quick fix for the issue is therefore to manually set the correct number, in my case 'num_gpus=1', in the script.
  • 0 Votes
    9 Posts
    1k Views
    L
    @Sylvain I exported the electric field results from an AC simulation and found that the last six columns of the data are imaginary numbers. Are these the electric field values in three different directions? Why aren't they time-varying? Did I only export the peak values?
  • High Field Values at Extremities

    Simulations & Solvers
    6
    0 Votes
    6 Posts
    739 Views
    V
    Hi @bryn, I think you’re right. The issue appears to be related to the boundary conditions on the outer bounding box. I changed the boundary to a flux(0) condition, and that resolved the problem with the localized high field values at the extremities. Thank you!
  • 0 Votes
    1 Posts
    153 Views
    No one has replied