The Basics

Import Reader class from stdf module, with std as the suggested object:

from stdf import Reader
std = Reader()

Loading STDF files

You can specificy the stdf file directly as an argument:

std = Reader(stdf_file = 'input_file.std')

Alternatively, call the load_stdf_file method:

files = ['file1.std', file2.std']
std = Reader()
for input_file in files:
    std.load_stdf_file(input_file)
    # do something

Accessing STDF Content

The std object could act as an iterator, and the recommended way is to iterate through it:

for rec_name, header, body in std:
    print(rec_name)
    # ... or do something else

Each iteration will yield 3 items:

  • rec_name
  • header
  • body
rec_name
A string indicating the standard 3-characters record name. Starts with ‘FAR’.
header
A tuple with 3 elements which are the content of every record header: (record length, record type and record subtype).
body
A dictionary containing the body of stdf record. Every record will return different dictionary keys depending on the stdf record type.