Skip to content
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

ZMT zurich med tech

  1. Home
  2. Sim4Life
  3. Python API
  4. Xtracting S11 data via python

Xtracting S11 data via python

Scheduled Pinned Locked Moved Python API
5 Posts 2 Posters 2.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Spuky
    wrote on last edited by
    #1

    Hi everybody,

    I am trying to extract S11 data of an EdgeSource sensor from a broadband simulation via python, however I found only the way how to extract frequency data.
    How can I access the S11 data as well? Part of my code is

    simEM_results = sim.Results()
    S11_axis = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"].Data.Axis

    S11_data = ???

    Basically I am looking for equivalent to SEMCAD X 14.8.6 XNumPy.AsArray() function.

    Thanks,

    Spuky

    SylvainS 1 Reply Last reply
    1
    • S Spuky

      Hi everybody,

      I am trying to extract S11 data of an EdgeSource sensor from a broadband simulation via python, however I found only the way how to extract frequency data.
      How can I access the S11 data as well? Part of my code is

      simEM_results = sim.Results()
      S11_axis = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"].Data.Axis

      S11_data = ???

      Basically I am looking for equivalent to SEMCAD X 14.8.6 XNumPy.AsArray() function.

      Thanks,

      Spuky

      SylvainS Offline
      SylvainS Offline
      Sylvain
      ZMT
      wrote on last edited by
      #2

      @spuky basically, you need to:

      1. load the data object (i.e. read data from disk and push it through the postprocessing pipeline)
      S11 = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"].Update()
      
      1. get the data you need from the data object
      S11_axis = S11.Data.Axis
      S11_data = S11.Data.GetComponent(0)
      

      Note that, once you have executed step 1, you can easily explore what the data object contains by using auto-completion in the Console environement: just type "S11" followed by a dot (.) in the Console and you can navigate its data structure.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Spuky
        wrote on last edited by
        #3

        Hello Sylvain,

        Thank you for your quick answer however when I do

        S11 = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"].Update()

        The S11 is True (Boolean) and it does not contain any Data.

        Regards,

        Spuky

        1 Reply Last reply
        0
        • SylvainS Offline
          SylvainS Offline
          Sylvain
          ZMT
          wrote on last edited by
          #4

          my mistake... that's because Update() is returning a Boolean. This is what I meant:

          S11 = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"]
          S11.Update()
          
          1 Reply Last reply
          0
          • SylvainS Offline
            SylvainS Offline
            Sylvain
            ZMT
            wrote on last edited by
            #5

            Note: I would even recommend to raise an exception if the pipeline fails to update, before continuing with the data processing. This makes the scripts easier to maintain in the long run:

            S11 = simEM_results["EdgeSource (Dipole)"]["Reflection Coefficient(f)"]
            assert S11.Update(), 'Failed to update pipeline'
            S11_data = S11.Data.GetComponent(0)
            
            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Search