-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correction for the method SubCircuit.check_nodes() #136
base: master
Are you sure you want to change the base?
Conversation
Change of the definition of Node to ensure the node name is always stored in lower case. Converted the _external_nodes in SubCircuit into a tuple of Nodes. Modified SubCircuit.check_nodes to use the Node name property, and a dictionary to verify if a node has more than one element connected.
Remove unused line.
Schemdraw
Thanks to help to improve PySpice ! Main concern is to find a way to decouple the netlist and the schematic stuff so as to keep PySpice independent of the simulator and the schematic renderer. Must found some time to work on this and the latest issues ! Will try during Christmas week ! |
Adding the possibility to use parameters with the spice name in an element.
Add the management of expressions inside brackets.
Avoding .idea.
Work with lower case in all the cases, to be consistent with SPICE's case-insensitive behaviour.
Rename celsius SPICE suffix.
Manage an expression as positional parameter.
Correction of unit name.
Update PrefixedUnit and UnitValue to manage expressions.
Take into account the case when the Unit value is already an Expression. And the associated test.
Correction to avoid circular imports.
Update the example.
It is subsided by EBNFParser.
Updates on Library and Netlist to allow the use of EBNFParser in library.
Solved issues with the inclusion of the spice.
Change to numpy frombuffer to avoid warning.
Improve the errors information.
Improve the errors detection.
Updated to use python 311
Added a new test to confirm that multiple elements are read.
Added a check to avoid loosing files data.
Correction of the method an associated test.
Improve docs.
Added tatsu requirement and update python version.
Solve issue with raw streams.
@jmgc Are you willing to mantain this fork? |
QUANTITY = 'power' | ||
SI_UNIT = 'kg*m^2*s^-3' | ||
DEFAULT_UNIT = True | ||
# J/s | ||
|
||
class Coulomb(Unit): | ||
UNIT_NAME = 'coulomb' | ||
UNIT_SUFFIX = 'C' | ||
UNIT_SUFFIX = 'c' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that really necessary?
@@ -101,7 +101,7 @@ | |||
WaveForm, | |||
) | |||
from PySpice.Tools.EnumFactory import EnumFactory | |||
from PySpice.Unit import u_V, u_A, u_s, u_Hz, u_F, u_Degree | |||
from PySpice.Unit import u_V, u_A, u_s, u_Hz, u_F, u_celsius |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -29,7 +29,7 @@ | |||
|
|||
#################################################################################################### | |||
|
|||
from PySpice.Unit import u_Degree, u_V, u_A, u_s, u_Hz | |||
from PySpice.Unit import u_c, u_v, u_a, u_s, u_hz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u_c is Coulomb not u_celsius, you got yourself confused by your own change?
While there are many cool changes, it seems this introduces some not backward compatbile unnecessary changes.. Not really user friendly, there are things I can agree with like Degree->celcius, but some other things need a lot of work. |
I have made some slight changes to correct the check_nodes method in SubCircuit, and convert a SubCircuit node in an object of the class Node so the code can be reused.
Thanks in advance