Exemple #1
0
def plot_GraphAnalysis():
    netlist = NetlistThieleSmallNL()
    graph = Graph(netlist=netlist)
    graph.to_core()
    graph.analysis.plot(show=False)
    os.remove(path)
    return True
Exemple #2
0
def plot_GraphAnalysis():
    netlist = NetlistThieleSmallNL()
    graph = Graph(netlist=netlist)
    graph.to_core()
    graph.analysis.plot(show=False)
    os.remove(path)
    return True
Exemple #3
0
def TestCore2Tex():
    netlist = NetlistThieleSmallNL()
    graph = Graph(netlist=netlist)
    core = graph.to_core()
    content = netlist2tex(netlist)
    content += graphplot2tex(graph)
    content += core2tex(core)
    texdocument(content, path, title='test core2tex')
    os.remove(path)
    return True
Exemple #4
0
def TestCore2Tex():
    netlist = NetlistThieleSmallNL()
    graph = Graph(netlist=netlist)
    core = graph.to_core()
    folder = os.path.join(here, 'temp')
    if not os.path.exists(folder):
        os.mkdir(folder)
    path = os.path.join(folder, 'test_core2tex.tex')
    content = netlist2tex(netlist)
    content += graphplot2tex(graph, folder=folder)
    content += core2tex(core)
    texdocument(content, path, title='test core2tex')
    shutil.rmtree(folder)
    return True
Exemple #5
0
from __future__ import absolute_import, division, print_function

import os
from pyphs import Netlist, Graph

label = 'triodeamp'

path = os.path.realpath(__file__)[:os.path.realpath(__file__).rfind(os.sep)]

netlist_filename = path + os.sep + label + '.net'

netlist = Netlist(netlist_filename)

graph = Graph(netlist=netlist)

core = graph.to_core(verbose=False)
core.linear_nonlinear()
core.subsinverse()

#core.reduce_z()

#if __name__ == '__main__':
#
#    from pyphs import signalgenerator
#
#    config = {'fs': 96e3,
#              'split': True,
#              'pbar': True,
#              'maxit': 100,
#              'eps': 1e-9,
#              'lang': 'python'
Exemple #6
0
from pyphs import Netlist, Graph

# ---------------------------  NETLIST  ------------------------------------- #
label = 'piano_hammer'
this_script = os.path.realpath(__file__)
here = this_script[:this_script.rfind(os.sep)]
netlist_filename = here + os.sep + label + '.net'
netlist = Netlist(netlist_filename)


# ---------------------------  GRAPH  --------------------------------------- #
graph = Graph(netlist=netlist)


# ---------------------------  CORE  ---------------------------------------- #
core = graph.to_core()


## ---------------------------  SIMULATION  ---------------------------------- #
#if __name__ == '__main__':
#
#    import numpy
#    import matplotlib.pyplot as plt
#    from pyphs import Simulation
#
#    core.reduce_z()
#
#    # Define the simulation parameters
#    config = {'fs': 48e3,           # Sample rate (Hz)
#              'grad': 'discret',    # In {'discret', 'theta', 'trapez'}
#              'theta': 0.,          # Theta-scheme for the structure
Exemple #7
0
import os
from pyphs import Netlist, Graph

# ---------------------------  NETLIST  ------------------------------------- #
label = 'piano_hammer'
this_script = os.path.realpath(__file__)
here = this_script[:this_script.rfind(os.sep)]
netlist_filename = here + os.sep + label + '.net'
netlist = Netlist(netlist_filename)

# ---------------------------  GRAPH  --------------------------------------- #
graph = Graph(netlist=netlist)

# ---------------------------  CORE  ---------------------------------------- #
core = graph.to_core()

## ---------------------------  SIMULATION  ---------------------------------- #
#if __name__ == '__main__':
#
#    import numpy
#    import matplotlib.pyplot as plt
#    from pyphs import Simulation
#
#    core.reduce_z()
#
#    # Define the simulation parameters
#    config = {'fs': 48e3,           # Sample rate (Hz)
#              'grad': 'discret',    # In {'discret', 'theta', 'trapez'}
#              'theta': 0.,          # Theta-scheme for the structure
#              'split': True,       # split implicit from explicit part
Exemple #8
0
import os
from pyphs import Netlist, Graph


label = 'triodeamp'

path = os.path.realpath(__file__)[:os.path.realpath(__file__).rfind(os.sep)]

netlist_filename = path + os.sep + label + '.net'

netlist = Netlist(netlist_filename)

graph = Graph(netlist=netlist)

core = graph.to_core(verbose=False)
core.linear_nonlinear()
core.subsinverse()

#core.reduce_z()

#if __name__ == '__main__':
#
#    from pyphs import signalgenerator
#
#    config = {'fs': 96e3,
#              'split': True,
#              'pbar': True,
#              'maxit': 100,
#              'eps': 1e-9,
#              'lang': 'python'