diff --git a/README.md b/README.md index 9b7aefb..41aa3d1 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/examples/run_montecarlo.py b/examples/run_montecarlo.py index 41be43b..a7c3c7b 100644 --- a/examples/run_montecarlo.py +++ b/examples/run_montecarlo.py @@ -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 + diff --git a/pyproject.toml b/pyproject.toml index 4f41f61..6b0eb1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",