Skip to content

How to retrieve .measure results #346

@infinitymdm

Description

@infinitymdm

The main problem I'm having is that I just don't know where to find the results of .measure calls after running a simulation using PySpice. I get pretty plots that show I'm reaching what should be my measurement triggers, but I don't know where to find the data captured by the .measure call.

Environment (OS, Python version, PySpice version, simulator)

  • OS: Ubuntu 22.04
  • Python: 3.10.6
  • Pyspice: git master with a few tiny tweaks (see note below)
  • ngspice version 36

Note: I am using a slightly tweaked version of Pyspice. However, my changes are very small and shouldn't affect the ability to get results from .measure calls. You can compare differences here: https://github.com/PySpice-org/PySpice/compare/master...infinitymdm:PySpice:master?expand=1

Expected Behaviour

Results from simulator.measure() will be returned from the measure() call, or be accessible via __getitem__() in the Waveform object after running the appropriate simulation (e.g. for .meas tran my_var_name [...], results should be accessible via analysis['my_var_name']).

Actual Behaviour

I can't find the results from .measure() calls anywhere. It's possible I'm just misunderstanding how this is meant to be used, but I also can't seem to find much documentation on this feature. Poring through the source code seems to indicate to me that simulator.analyses should have an object containing the .measure results, but I can't seem to find anything there either.

Steps to reproduce the behaviour

Run make after setting up CharLib at commit f4bd88d8. See characterizer/char_comb.py for relevant code for setting up and running the spice simulation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions