Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit d0a95d89ef0b6c89c4219b9bc41d7b599720f56e @zonca committed Nov 25, 2010
@@ -0,0 +1,4 @@
+Python package for automating QUCS simulations
+python-qucs: http://andreazonca.com/software/python-qucs
+hosted on Github: https://github.com/zonca/python-qucs
+QUCS: http://qucs.sf.net
@@ -0,0 +1 @@
+Demo project for QUCS, to be copied into your .qucs folder
@@ -0,0 +1,46 @@
+import sys
+import logging as l
+import re
+
+sys.path.append('..')
+import qucs.simulate
+
+class DemoSimulationDescription(qucs.simulate.SimulationDescription):
+ ''' Simple example of SimulationDescription subclassing,
+
+ it is necessary to reimplement the constructor and the modify netlist method
+ the modify_netlist method replaces the amplifier input
+ output
+ '''
+
+ def __init__(self, name, n):
+ self.name = name
+ self.n = n
+ self.template_netlist_file = '/home/zonca/.qucs/netlist.txt'
+
+ def modify_netlist(self):
+ # simple replacement of any low noise amplifier s2p input file with the number defined in the constructor
+ self.netlist = re.sub('lownoiseamplifier[0-9]*\.s2p','lownoiseamplifier%d.s2p' % self.n, self.template_netlist)
+ return self.netlist
+
+def demo():
+
+ # creating simulation descriptions
+ simulation_descriptions = [DemoSimulationDescription('amp0',0), DemoSimulationDescription('amp1',1)]
+
+ # creating simulation objects using descriptions
+ simulations = map(qucs.simulate.Simulation,simulation_descriptions)
+
+ # running simulations
+ for sim in simulations:
+ sim.run()
+ sim.extract_data()
+ # writing S21 vs freq
+ sim.write_result('acfrequency', 's21db')
+ return simulations
+
+# if launched as a script
+if __name__ == '__main__':
+ l.basicConfig(level=l.DEBUG)
+ simulations = demo()
+ # qucs simulation outputs are saved in simulations[0].results as dictionary
Binary file not shown.
@@ -0,0 +1,304 @@
+# Ghz S DB R 50
+35 -7 0 0 0 -9999 0 -7 0
+35.1 -7 0 0.5 0 -9999 0 -7 0
+35.2 -7 0 1 0 -9999 0 -7 0
+35.3 -7 0 1.5 0 -9999 0 -7 0
+35.4 -7 0 2 0 -9999 0 -7 0
+35.5 -7 0 2.5 0 -9999 0 -7 0
+35.6 -7 0 3 0 -9999 0 -7 0
+35.7 -7 0 3.5 0 -9999 0 -7 0
+35.8 -7 0 4 0 -9999 0 -7 0
+35.9 -7 0 4.5 0 -9999 0 -7 0
+36 -7 0 5 0 -9999 0 -7 0
+36.1 -7 0 5.5 0 -9999 0 -7 0
+36.2 -7 0 6 0 -9999 0 -7 0
+36.3 -7 0 6.5 0 -9999 0 -7 0
+36.4 -7 0 7 0 -9999 0 -7 0
+36.5 -7 0 7.5 0 -9999 0 -7 0
+36.6 -7 0 8 0 -9999 0 -7 0
+36.7 -7 0 12 0 -9999 0 -7 0
+36.8 -7 0 16 0 -9999 0 -7 0
+36.9 -7 0 20 0 -9999 0 -7 0
+37 -7 0 24 0 -9999 0 -7 0
+37.1 -7 0 28 0 -9999 0 -7 0
+37.2 -7 0 32 0 -9999 0 -7 0
+37.3 -7 0 33 0 -9999 0 -7 0
+37.4 -7 0 34 0 -9999 0 -7 0
+37.5 -7 0 35 0 -9999 0 -7 0
+37.6 -7 0 36 0 -9999 0 -7 0
+37.7 -7 0 37 0 -9999 0 -7 0
+37.8 -7 0 38 0 -9999 0 -7 0
+37.9 -7 0 39 0 -9999 0 -7 0
+38 -7 0 40 0 -9999 0 -7 0
+38.1 -7 0 40 0 -9999 0 -7 0
+38.2 -7 0 40 0 -9999 0 -7 0
+38.3 -7 0 40 0 -9999 0 -7 0
+38.4 -7 0 40 0 -9999 0 -7 0
+38.5 -7 0 40 0 -9999 0 -7 0
+38.6 -7 0 40 0 -9999 0 -7 0
+38.7 -7 0 40 0 -9999 0 -7 0
+38.8 -7 0 40 0 -9999 0 -7 0
+38.9 -7 0 40 0 -9999 0 -7 0
+39 -7 0 40 0 -9999 0 -7 0
+39.1 -7 0 40 0 -9999 0 -7 0
+39.2 -7 0 40 0 -9999 0 -7 0
+39.3 -7 0 40 0 -9999 0 -7 0
+39.4 -7 0 40 0 -9999 0 -7 0
+39.5 -7 0 40 0 -9999 0 -7 0
+39.6 -7 0 40 0 -9999 0 -7 0
+39.7 -7 0 40 0 -9999 0 -7 0
+39.8 -7 0 40 0 -9999 0 -7 0
+39.9 -7 0 40 0 -9999 0 -7 0
+40 -7 0 40 0 -9999 0 -7 0
+40.1 -7 0 40 0 -9999 0 -7 0
+40.2 -7 0 40 0 -9999 0 -7 0
+40.3 -7 0 40 0 -9999 0 -7 0
+40.4 -7 0 40 0 -9999 0 -7 0
+40.5 -7 0 40 0 -9999 0 -7 0
+40.6 -7 0 40 0 -9999 0 -7 0
+40.7 -7 0 40 0 -9999 0 -7 0
+40.8 -7 0 40 0 -9999 0 -7 0
+40.9 -7 0 40 0 -9999 0 -7 0
+41 -7 0 40 0 -9999 0 -7 0
+41.1 -7 0 40 0 -9999 0 -7 0
+41.2 -7 0 40 0 -9999 0 -7 0
+41.3 -7 0 40 0 -9999 0 -7 0
+41.4 -7 0 40 0 -9999 0 -7 0
+41.5 -7 0 40 0 -9999 0 -7 0
+41.6 -7 0 40 0 -9999 0 -7 0
+41.7 -7 0 40 0 -9999 0 -7 0
+41.8 -7 0 40 0 -9999 0 -7 0
+41.9 -7 0 40 0 -9999 0 -7 0
+42 -7 0 40 0 -9999 0 -7 0
+42.1 -7 0 40 0 -9999 0 -7 0
+42.2 -7 0 40 0 -9999 0 -7 0
+42.3 -7 0 40 0 -9999 0 -7 0
+42.4 -7 0 40 0 -9999 0 -7 0
+42.5 -7 0 40 0 -9999 0 -7 0
+42.6 -7 0 40 0 -9999 0 -7 0
+42.7 -7 0 40 0 -9999 0 -7 0
+42.8 -7 0 40 0 -9999 0 -7 0
+42.9 -7 0 40 0 -9999 0 -7 0
+43 -7 0 40 0 -9999 0 -7 0
+43.1 -7 0 40 0 -9999 0 -7 0
+43.2 -7 0 40 0 -9999 0 -7 0
+43.3 -7 0 40 0 -9999 0 -7 0
+43.4 -7 0 40 0 -9999 0 -7 0
+43.5 -7 0 40 0 -9999 0 -7 0
+43.6 -7 0 40 0 -9999 0 -7 0
+43.7 -7 0 40 0 -9999 0 -7 0
+43.8 -7 0 40 0 -9999 0 -7 0
+43.9 -7 0 40 0 -9999 0 -7 0
+44 -7 0 40 0 -9999 0 -7 0
+44.1 -7 0 40 0 -9999 0 -7 0
+44.2 -7 0 40 0 -9999 0 -7 0
+44.3 -7 0 40 0 -9999 0 -7 0
+44.4 -7 0 40 0 -9999 0 -7 0
+44.5 -7 0 40 0 -9999 0 -7 0
+44.6 -7 0 40 0 -9999 0 -7 0
+44.7 -7 0 40 0 -9999 0 -7 0
+44.8 -7 0 40 0 -9999 0 -7 0
+44.9 -7 0 40 0 -9999 0 -7 0
+45 -7 0 40 0 -9999 0 -7 0
+45.1 -7 0 40 0 -9999 0 -7 0
+45.2 -7 0 40 0 -9999 0 -7 0
+45.3 -7 0 40 0 -9999 0 -7 0
+45.4 -7 0 40 0 -9999 0 -7 0
+45.5 -7 0 40 0 -9999 0 -7 0
+45.6 -7 0 40 0 -9999 0 -7 0
+45.7 -7 0 40 0 -9999 0 -7 0
+45.8 -7 0 40 0 -9999 0 -7 0
+45.9 -7 0 40 0 -9999 0 -7 0
+46 -7 0 40 0 -9999 0 -7 0
+46.1 -7 0 40 0 -9999 0 -7 0
+46.2 -7 0 40 0 -9999 0 -7 0
+46.3 -7 0 40 0 -9999 0 -7 0
+46.4 -7 0 40 0 -9999 0 -7 0
+46.5 -7 0 40 0 -9999 0 -7 0
+46.6 -7 0 40 0 -9999 0 -7 0
+46.7 -7 0 40 0 -9999 0 -7 0
+46.8 -7 0 40 0 -9999 0 -7 0
+46.9 -7 0 40 0 -9999 0 -7 0
+47 -7 0 40 0 -9999 0 -7 0
+47.1 -7 0 40 0 -9999 0 -7 0
+47.2 -7 0 40 0 -9999 0 -7 0
+47.3 -7 0 40 0 -9999 0 -7 0
+47.4 -7 0 40 0 -9999 0 -7 0
+47.5 -7 0 40 0 -9999 0 -7 0
+47.6 -7 0 37 0 -9999 0 -7 0
+47.7 -7 0 34 0 -9999 0 -7 0
+47.8 -7 0 31 0 -9999 0 -7 0
+47.9 -7 0 28 0 -9999 0 -7 0
+48 -7 0 25 0 -9999 0 -7 0
+48.1 -7 0 25 0 -9999 0 -7 0
+48.2 -7 0 25 0 -9999 0 -7 0
+48.3 -7 0 25 0 -9999 0 -7 0
+48.4 -7 0 25 0 -9999 0 -7 0
+48.5 -7 0 25 0 -9999 0 -7 0
+48.6 -7 0 25 0 -9999 0 -7 0
+48.7 -7 0 25 0 -9999 0 -7 0
+48.8 -7 0 25 0 -9999 0 -7 0
+48.9 -7 0 25 0 -9999 0 -7 0
+49 -7 0 25 0 -9999 0 -7 0
+49.1 -7 0 25 0 -9999 0 -7 0
+49.2 -7 0 25 0 -9999 0 -7 0
+49.3 -7 0 25 0 -9999 0 -7 0
+49.4 -7 0 25 0 -9999 0 -7 0
+49.5 -7 0 25 0 -9999 0 -7 0
+49.6 -7 0 25 0 -9999 0 -7 0
+49.7 -7 0 25 0 -9999 0 -7 0
+49.8 -7 0 25 0 -9999 0 -7 0
+49.9 -7 0 25 0 -9999 0 -7 0
+50 -7 0 25 0 -9999 0 -7 0
+! Noise parameters
+35 0.7 0 0 0
+35.1 0.65 0 0 0
+35.2 0.6 0 0 0
+35.3 0.55 0 0 0
+35.4 0.5 0 0 0
+35.5 0.5 0 0 0
+35.6 0.5 0 0 0
+35.7 0.5 0 0 0
+35.8 0.5 0 0 0
+35.9 0.5 0 0 0
+36 0.5 0 0 0
+36.1 0.5 0 0 0
+36.2 0.5 0 0 0
+36.3 0.5 0 0 0
+36.4 0.5 0 0 0
+36.5 0.5 0 0 0
+36.6 0.5 0 0 0
+36.7 0.5 0 0 0
+36.8 0.5 0 0 0
+36.9 0.5 0 0 0
+37 0.5 0 0 0
+37.1 0.5 0 0 0
+37.2 0.5 0 0 0
+37.3 0.5 0 0 0
+37.4 0.5 0 0 0
+37.5 0.3 0 0 0
+37.6 0.3 0 0 0
+37.7 0.3 0 0 0
+37.8 0.3 0 0 0
+37.9 0.3 0 0 0
+38 0.3 0 0 0
+38.1 0.3 0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0
+45.1 0.2 0 0 0
+45.2 0.2 0 0 0
+45.3 0.2 0 0 0
+45.4 0.2 0 0 0
+45.5 0.2 0 0 0
+45.6 0.2 0 0 0
+45.7 0.2 0 0 0
+45.8 0.2 0 0 0
+45.9 0.2 0 0 0
+46 0.2 0 0 0
+46.1 0.2 0 0 0
+46.2 0.2 0 0 0
+46.3 0.2 0 0 0
+46.4 0.2 0 0 0
+46.5 0.2 0 0 0
+46.6 0.2 0 0 0
+46.7 0.2 0 0 0
+46.8 0.2 0 0 0
+46.9 0.2 0 0 0
+47 0.2 0 0 0
+47.1 0.2 0 0 0
+47.2 0.2 0 0 0
+47.3 0.2 0 0 0
+47.4 0.2 0 0 0
+47.5 0.2 0 0 0
+47.6 0.2 0 0 0
+47.7 0.2 0 0 0
+47.8 0.2 0 0 0
+47.9 0.2 0 0 0
+48 0.2 0 0 0
+48.1 0.2 0 0 0
+48.2 0.2 0 0 0
+48.3 0.2 0 0 0
+48.4 0.2 0 0 0
+48.5 0.2 0 0 0
+48.6 0.2 0 0 0
+48.7 0.2 0 0 0
+48.8 0.2 0 0 0
+48.9 0.2 0 0 0
+49 0.2 0 0 0
+49.1 0.2 0 0 0
+49.2 0.2 0 0 0
+49.3 0.2 0 0 0
+49.4 0.2 0 0 0
+49.5 0.2 0 0 0
+49.6 0.2 0 0 0
+49.7 0.2 0 0 0
+49.8 0.2 0 0 0
+49.9 0.2 0 0 0
+50 0.2 0 0 0
Oops, something went wrong.

0 comments on commit d0a95d8

Please sign in to comment.