Skip to content

Commit

Permalink
Alignment to spicelib 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nunobrum committed Mar 9, 2024
1 parent 3170a28 commit 9f3ec95
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,11 @@ _Make sure to initialize the root logger before importing the library to be able
* Alternative contact : [nuno.brum@gmail.com](mailto:nuno.brum@gmail.com)

## History ##
Version 5.2
* Version 5.3
* Correction on the run_montecarlo.py and run_worst_case.py examples.
* Fixes on the spicelib (Version 1.0.3)

* Version 5.2
* SimAnalysis supporting both Qspice and LTSpice logfiles.
* FastWorstCaseAnalysis algorithm implemented
* Fix on the log reading of fourier data.
Expand Down
14 changes: 13 additions & 1 deletion examples/run_montecarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@

mc.run_testbench(runs_per_sim=100) # Runs the simulation with splits of 100 runs each
logs = mc.read_logfiles() # Reads the log files and stores the results in the results attribute
logs.export_data('./temp_mc/data.csv') # Exports the data to a csv file
logs.obtain_amplitude_and_phase_from_complex_values() # Splits the complex values into real and imaginary parts
logs.export_data('./temp_mc/data_testbench.csv') # Exports the data to a csv file
logs.plot_histogram('fcut') # Plots the histograms for the results
mc.cleanup_files() # Deletes the temporary files

print("=====================================")
# Now using the second method, where the simulations are ran one by one
mc.clear_simulation_data() # Clears the simulation data
mc.reset_netlist() # Resets the netlist to the original
mc.run_analysis(num_runs=1000) # Runs the 1000 simulations
logs = mc.read_logfiles() # Reads the log files and stores the results in the results attribute
logs.export_data('./temp_mc/data_sims.csv') # Exports the data to a csv file
logs.plot_histogram('fcut') # Plots the histograms for the results
mc.cleanup_files() # Deletes the temporary files

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ readme = "README.md"
license = { file="LICENSE" }
requires-python = ">=3.8"
dependencies = [
"spicelib>=0.9",
"spicelib>=1.0.3",
]
classifiers=[
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit 9f3ec95

Please sign in to comment.