Skip to content
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

Open
wants to merge 141 commits into
base: master
Choose a base branch
from

Conversation

jmgc
Copy link

@jmgc jmgc commented Nov 28, 2018

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

chaffra and others added 8 commits November 25, 2018 23:18
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.
@FabriceSalvaire
Copy link
Collaborator

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 !

jmgc added 25 commits March 9, 2023 02:09
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.
@Kreijstal
Copy link

@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'

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

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

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?

@Kreijstal
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants