# stdf: Parse Structured Test Data Format (STDF)

[ data, gpl, library, program ] [ Propose Tags ]
Versions [faq] 0.1.0.0, 0.2.0.0 aeson (==0.8.*), base (==4.7.*), base64-bytestring (==1.0.*), binary (==0.7.*), bytestring (==0.10.*), split (==0.2.*), stdf, text (==1.1.*) [details] GPL-2.0-only Michael Fox 415fox@gmail.com Data https://github.com/gitfoxi/Stdf by m at Wed Oct 8 22:45:39 UTC 2014 NixOS:0.2.0.0 WaferMap, StdfToJson 1311 total (72 in the last 30 days) (no votes yet) [estimated by Bayesian average] λ λ λ Docs uploaded by userBuild status unknown

## Modules

[Index]

#### Maintainer's Corner

For package maintainers and hackage trustees

[back to package description]

# Data.Stdf

Structured Test Data Format (STDF) is used to log test data by semiconductor automated test equipment (ATE).

There's a couple of good, open-source libraries for parsing STDF, notably PyStdf.

2. Fast

## Install

cabal install stdf -- Is a TODO. Just clone and build the package


## Usage

Here's an example of converting STDF to JSON. (What else would you want to do with it?)

import Data.Stdf
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Aeson

-- unparsed records have type Raw for the time being
notRaw :: Rec -> Bool
notRaw (Raw _) = False
notRaw _       = True

main = do
let recs = parse raw
let goodRecs = filter notRaw recs
mapM_ (BL.putStrLn . encode) goodRecs


## Included Examples Applications

• WaferMap -- prints a pretty wafermap like this:
\$ Examples/WaferMap test.stdf
File: test.stdf
.   .   .   .   .   11  11  11  11  11  .   .   .   .   .   .
.   .   .   11  11  11  11  6   1   6   11  11  11  .   .   .
.   .   11  11  1   11  11  11  1   11  1   1   11  11  .   .
.   1   1   1   11  1   1   1   1   6   6   6   1   1   11  .
203 11  11  11  11  11  1   6   11  1   1   11  1   11  11  .
11  11  11  11  1   11  6   1   1   1   11  11  11  11  11  11
11  11  11  11  1   1   11  1   11  6   1   11  1   11  11  11
203 11  11  1   1   11  6   1   11  212 6   1   11  11  11  .
.   200 6   11  1   1   1   1   1   6   11  1   1   11  11  .
.   .   11  11  11  11  1   1   1   11  1   1   1   11  .   .
.   .   .   11  11  1   11  11  1   11  11  11  11  .   .   .
.   .   .   .   .   11  11  11  11  200 212 .   .   .   .   .

• StdfToJson -- prints each Stdf record as a one-line JSON object for easy importing into other languages for further processing