Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

PSSPLT does not support Python or Iplan. I would recommend to use module dyntools to open and read an out-file and loop through all channel in order to decide if the performed simulation was unstable or not.

The following script shows a function that returns the lowest value of all voltage channels (VOLT) in an outfile.

import dyntools

def find_lowest_voltage(outfile,channelid='VOLT'):
    """ Returns lowest value of all channels with id channelid in outfile
    """
    chnfobj = dyntools.CHNF(outfile)
    sh_ttl, ch_id, ch_data = chnfobj.get_data()
    chanrange = chnfobj.get_range()
    lowest = 9e21
    print ch_id
    for k in range(1,len(ch_id)):
        print k,len(ch_id),ch_id.get(k)
        if ch_id.get(k)[:4]==channelid:
            lowest = min(chanrange[k]['min'],lowest)
    return lowest

The returned value can be used to decide on stability or not, i.e. < 0.7 in your case.

PSSPLT does not support Python or Iplan. I would recommend to use module dyntools to open and read an out-file and loop through all channel in order to decide if the performed simulation was unstable or not.

The following script shows a function that returns the lowest value of all voltage channels (VOLT) in an outfile.

import dyntools

def find_lowest_voltage(outfile,channelid='VOLT'):
    """ Returns lowest value of all channels with id channelid in outfile
    """
    chnfobj = dyntools.CHNF(outfile)
    sh_ttl, ch_id, ch_data = chnfobj.get_data()
    chanrange = chnfobj.get_range()
    lowest = 9e21
    print ch_id
    for k in range(1,len(ch_id)):
        print k,len(ch_id),ch_id.get(k)
        if ch_id.get(k)[:4]==channelid:
            lowest = min(chanrange[k]['min'],lowest)
    return lowest

The returned value can be used to decide on stability or not, i.e. < 0.7 in your case.

PSSPLT does not support Python or Iplan. I would recommend to use module dyntools to open and read an out-file and loop through all channel in order to decide if the performed simulation was unstable or not.

The following script shows a function that returns the lowest value of all voltage channels (VOLT) in an outfile.

import dyntools

def find_lowest_voltage(outfile,channelid='VOLT'):
    """ Returns lowest value of all channels with id channelid in outfile
    """
    chnfobj = dyntools.CHNF(outfile)
    sh_ttl, ch_id, ch_data = chnfobj.get_data()
    chanrange = chnfobj.get_range()
    lowest = 9e21
    idlen = len(channelid)
    for k in range(1,len(ch_id)):
        if ch_id.get(k)[:4]==channelid:
ch_id.get(k)[:idlen]==channelid:
            lowest = min(chanrange[k]['min'],lowest)
    return lowest

The returned value can be used to decide on stability or not, i.e. < 0.7 in your case.

EDIT: inserted variable idlen in the script above