Пример #1
0
def p8tables(event=None, filedir='.', topdir=None, idl=False, eclphase=0.5):
    import p8tables as p8
    reload(p8)
    global numevents, nummodels
    if event == None:
        event = p7Restore(filedir, topdir, idl)
    cwd = os.getcwd().split("/")
    if cwd[-1] == event[0].modeldir:
        os.chdir('..')
    printout = printoutput.init(event[0].params.printout, event)
    for j in range(numevents):
        print("\n" + event[j].eventname, file=printout)
        event[j].meanphase = eclphase
        for i in range(nummodels.min()):
            print("\nCurrent model = " + str(event[j].params.model[i]), file=printout)
            p8.tables(event[j], i, printout)
    printoutput.close(printout)
    return
Пример #2
0
def p8tables(events=None, directory='./', idl=False, eclphase=0.5):

    if events == None:
        events = p7Restore(directory, idl)

    nummodels = np.array([len(event.params.model) for event in events],
                             dtype=int)

    printout = po.init(events[0].params.printout, events)
    for event in events:
        print("\n" + event.eventname, file=printout)
        event.meanphase = eclphase
        for i in range(nummodels.min()):
            print("\nCurrent model = " + str(event.params.model[i]),
                  file=printout)
            p8.tables(event, i, printout)
    po.close(printout)

    return