Skip to main content

Library to read/write STDF/ATDF files

Project description

Semi-ATE's STDF (Standard Test Data Format) library

MIT License CI codecov CD GitHub release (latest SemVer) PyPI Conda (channel only)

This library is NOT intended to be the fastes in the world!

Often people are searching for 'the fastest' STDF parser. If this is what you are after, keep on looking and by all means, hit the wall later on, and at that point you might consider to return! 🤣

Ok, a fast parser is first of all writen in probably C/C++, and it has to dispence of a lot of the checking/correcting in order to become realy fast, and probably throwing away information not deemed interesting enough (and later turns out to be vital). However in real life STDF files are far from perfect, meaning that fast parsers will FAIL to do their intended job! You might tweak them for one or another ATE in your environment, but it will not be a can-do-everything parser!

In any case, when you start parsing STDF's at the moment you want to interact with the data, you are, as they say, too little too late ... you must still be living in the last century (not to say last millennium 🤪)

A good parser is written in a higher level language (like Python) and it does an awefull lot of checking (and if needed correcting) and doesn't throw any information away, so as to return reliably with full, meaningfull and correct data! This of course makes it slower. One can optimize that a bit by using Cython or maybe numba but that is besides the point.

The point is that STDF data should be converted to a useable format like pandas (numpy alone will not do as plenty of data is not numerical) WHILE the data is being generated, preferrably not post-factum and definitely not pre-usage!

Think of it like this: STDF is a very good format from the point of view of the ATE, because if a test program is crashing, we lost virtually no data! Also, in STDF everything conserning an ATE has his defined place! (as opposed to CSV or similar ... naaah, you can not call it a 'format' can you?) Anyway, STDF is an un-usable format from the point of view of data analysis! Therefore we need to convert the data to a format that is usable. (and if now you are thinking 'SQL', then I can confirm that you are a die-hard masochist that still lives in the last millennium because you are clearly not up to speed when it comes to data science! 🧐)

Anyway, I did put pandas forward, because Semi-ATE is Python (>=3.7) based, but to be fair one could also go the SAS- or the R way but those make less sense in the Semi-ATE concept.

In any case, Semi-ATE is outputting STDF data, so whatever (legacy) system(s) you have, Semi-ATE will play along nicely!

The Semi-ATE-Metis project builds on Semi-ATE-STDF/numpy/scipy/pandas/GStreamer/HDF5/matplotlib to deliver data analysis tailored to the semiconductor test industry ... in open source!

Eat that Mentor! For years you took money-for-nothing, and in the end you still screwed your customers (cfr. PAT). My-silver-lining: now we will do some screwing! See how that feels! 😋

It is also NOT just a parser!

In Semi-ATE we also need to write STDF files!

Infact here are the specifications of the Semi-ATE-STDF library:

  • Endianness: Little & Big
  • Formats: STDF & ATDF
  • Versions & Extensions:
    • V3: support depricated
    • V4:
  • Modes: read & write
  • compressions: (in all modes!)
    • gzip
    • lzma → turns out to be the best compressor for STDF files. 🤫
    • bz2
  • encodings:
    • ASCII
    • UTF-8 (added to support things like 'ηA', 'μV', '°C', '-∞', ... but also to make STDF compatible with python3 itself 😎)
  • floating point extensions:
  • Python3 (support for python2 is depricated)
    • Python 3.7
    • Python 3.8 ---add-badges-here--- (code coverage, build)
    • Python 3.9
  • Packaging:
    • PyPI : ---add-badges-here---
    • conda-forge : ---add-badges-here---

Installation

Stand alone

conda (preferred)

$ conda install Semi_ATE_STDF

pip (discouraged but possible)

$ pip install Semi_ATE_STDF

As part of the Semi-ATE suit

conda (preferred)

$ conda install Semi_ATE

pip (discouraged but possible)

$ pip install Semi_ATE

Usage examples

This STDF library is a part of the Semi-ATE suit, and it shares the namespace.

print an STDF in a human readable form on the standard output

from Semi_ATE.data import STDF

for REC in STDF.records_from_file("blahbla.stdf"):
    print(REC)

work with a STDF file storred in compressed form (lzma)

from Semi_ATE.data import STDF

for REC in STDF.records_from_file("blahbla.stdf.xz"):
    print(REC)

convert an STDF file into an ATDF file

from Semi_ATE.data import STDF

basename = "blahblah"

with open(f"{basename}.atdf", "w") as atdf:
   for REC in STDF.records_from_file(f"{basename}.stdf"):
       atdf.write(REC.to_atdf())

Note

You could use this library to make your own "converters", however this is the goal of the Semi-ATE-Metis project, so by unsing Semi-ATE-Metis (which depends on Semi-ATE-STDF) you don't need to handle the 'conversion' anymore and you can directly make your hands dirty with the 'tool' you want to have !!! :thumbsup:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Semi-ATE-STDF-0.1.9.tar.gz (75.5 kB view details)

Uploaded Source

File details

Details for the file Semi-ATE-STDF-0.1.9.tar.gz.

File metadata

  • Download URL: Semi-ATE-STDF-0.1.9.tar.gz
  • Upload date:
  • Size: 75.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.7

File hashes

Hashes for Semi-ATE-STDF-0.1.9.tar.gz
Algorithm Hash digest
SHA256 55e95d00df80ede92dadb4e57521b9f0650a0ea63ece80bb671e8371d6aa1e37
MD5 ae68ec7d51fe003d697b0a4b8037ad0a
BLAKE2b-256 952b729a84bcd44ecbdd25f193fc525f7ec4013af3e304ab2837524c17a5d947

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page