(lines)
| 692 | return traceDict |
| 693 | |
| 694 | def _makeDCTRNStraces(lines): |
| 695 | traceDict = {} |
| 696 | for i in range(len(lines)): |
| 697 | fields = lines[i].split() |
| 698 | if i == 0: |
| 699 | xVar = fields[0] |
| 700 | if fields[0] == xVar: |
| 701 | # We have a new trace |
| 702 | labels = [fields[j] for j in range(1, len(fields))] |
| 703 | for label in labels: |
| 704 | traceDict[label] = [[],[]] # time, value |
| 705 | else: |
| 706 | for j in range(len(labels)): |
| 707 | traceDict[labels[j]][0].append(eval(fields[0])) # time |
| 708 | traceDict[labels[j]][1].append(eval(fields[j+1])) # value |
| 709 | for key in traceDict: |
| 710 | traceDict[key] = trace((traceDict[key][0], traceDict[key][1])) |
| 711 | traceDict[key].label = key |
| 712 | if xVar == "frequency": |
| 713 | xUnits = "Hz" |
| 714 | elif xVar == "time": |
| 715 | xUnits = "s" |
| 716 | else: |
| 717 | xUnits = "" |
| 718 | return traceDict, xVar, xUnits |
| 719 | |
| 720 | def _makeACtraces(lines, traceType): |
| 721 | reMagDict = {} |
no test coverage detected