Skip to main content

SEMapp - SEM Data Visualization Application

A comprehensive PyQt5-based desktop application for visualizing and analyzing Scanning Electron Microscope (SEM) data. SEMapp supports multiple KLARF file formats (Standard, COMPLUS4T, and KRONOS), providing an intuitive interface for defect mapping, image analysis, and batch processing.

Features

Core Functionality

  • Multi-Format KLARF Support: Parse and extract defect data from .001 (KLARF) files
    • Standard mode: Traditional KLARF format
    • COMPLUS4T mode: Multi-wafer KLARF files with automatic wafer detection
    • KRONOS mode: Special format with OCR-based number detection
  • Interactive Wafer Mapping: Visual representation of defect positions on wafer surface
  • Image Visualization: Display TIFF images corresponding to defect locations
  • Dynamic Defect Filtering: Real-time defect filtering based on size threshold
  • Overview Window: Full-screen mapping with image thumbnails

Data Processing

  • Automatic File Organization: Organize TIFF files into wafer-specific subfolders
  • Coordinate Extraction: Extract and convert defect coordinates from KLARF format
  • TIFF Splitting: Split multi-page TIFF files into individual images
  • File Renaming: Automatic renaming based on coordinates and settings
  • CSV Export: Save defect mapping data for external analysis
  • Batch Processing: Process multiple wafers in a single session

Image Processing

  • Threshold Processing: Detect and analyze particles in SEM images
  • Particle Detection: Configurable threshold and minimum size parameters
  • Mapping Generation: Create interpolated maps of particle density and statistics
  • OCR Detection: Automatic number detection in KRONOS mode using Tesseract

User Interface

  • Wafer Selection: Grid-based wafer slot selection (1-26)
  • Image Type Selection: Choose from different image scales and types
  • Defect Size Slider: Dynamic threshold control for defect visualization
  • Interactive Plot: Click on defect positions to view corresponding images
  • Settings Configuration: Customize image types and processing parameters
  • Toast Notifications: Non-intrusive feedback for operations
  • Progress Dialogs: Visual feedback during long operations

Installation

Prerequisites

  • Python 3.9 or higher
  • pip package manager
  • Tesseract OCR (optional, for KRONOS mode number detection)
    • Windows: Download from UB-Mannheim Tesseract
    • Linux: sudo apt-get install tesseract-ocr
    • macOS: brew install tesseract

Install from PyPI

pip install semapp

Install from Source

git clone https://github.com/thi-mey/SEMapp.git
cd SEM_VF
pip install -e .

Dependencies

All dependencies are automatically installed:

  • PyQt5 >= 5.15.11
  • matplotlib >= 3.10.3
  • pandas >= 2.2.3
  • Pillow >= 11.2.1
  • numpy >= 2.2.5
  • pytesseract (optional, for OCR features)

Quick Start

Launching the Application

# From command line after installation
semapp

# Or run directly from source
python -m semapp.main

Basic Workflow

  1. Select a Directory

    • Click "Select Folder" to choose your data directory
    • Application automatically detects standard, COMPLUS4T, or KRONOS mode
  2. Choose a Wafer

    • Select a wafer slot from the grid (1-26)
    • Available wafers are highlighted in green
  3. Configure Settings (Optional)

    • Click "Settings" to configure image types and scales
    • Define scale and image type combinations
  4. Open TIFF Data

    • Click "Open TIFF" to load defect data and images
    • Wafer mapping is displayed automatically
  5. Analyze Defects

    • Click on defect points in the map to view corresponding images
    • Use the defect size slider to filter by threshold
    • Adjust threshold and min size sliders for particle detection
  6. View Overview

    • Click "Overview" to see full-screen mapping with image thumbnails
    • Save the overview as PNG, PDF, or SVG

File Structure

Standard Mode

project_directory/
├── 1/                          # Wafer slot 1
│   ├── data.tif               # TIFF image file
│   ├── recipe_file.001        # KLARF defect file
│   └── mapping.csv            # Generated coordinate mapping
├── 2/                          # Wafer slot 2
│   ├── data.tif
│   ├── recipe_file.001
│   └── mapping.csv
└── ...

COMPLUS4T Mode

project_directory/
├── data.tiff                   # Single TIFF file with all defects
├── recipe_file.001             # KLARF file containing multiple wafer IDs
├── 16/                         # Subfolder created for wafer ID 16
│   ├── data_page_331.tiff      # Split TIFF pages
│   ├── -9.1_1.1.tif            # Renamed files
│   └── mapping.csv             # Wafer-specific mapping
├── 21/                         # Subfolder created for wafer ID 21
│   └── mapping.csv
└── ...

KRONOS Mode

project_directory/
├── 11/                         # Wafer ID 11
│   ├── data.tiff               # Multi-page TIFF
│   ├── recipe_file.001        # KLARF file
│   ├── detection_results.csv   # OCR detection results
│   ├── mapping.csv             # Filtered defect mapping
│   └── data_page_10.tiff       # Split pages
└── ...

KLARF File Format

SEMapp parses KLARF (.001) files to extract:

  • Wafer IDs:
    • WaferID "@16"; (COMPLUS4T mode)
    • WaferID "Read Failed.11"; (KRONOS mode)
  • Sample Size: Total number of defects
  • Die Pitch: X and Y pitch values
  • Die Origin: Origin coordinates
  • Sample Center Location: Center coordinates
  • Defect List: Individual defect positions and sizes

Processing Operations

Split and Rename

  • Split TIFF: Split multi-page TIFF files into individual pages
  • Rename Files: Rename files based on coordinates and settings
  • Batch Processing: Process all wafers at once

Threshold Processing

  • Particle Detection: Detect particles using configurable threshold
  • Statistics: Calculate density, area, and particle counts
  • CSV Export: Save results for analysis

Mapping

  • Interpolated Maps: Generate interpolated maps of particle statistics
  • Multiple Metrics: Density, average area, total area percentage
  • Visualization: Save maps as PNG files

Clean Operations

  • Remove Non-Conforming Files: Clean up files that don't match naming conventions
  • Organize Structure: Create proper directory structure

Configuration

Settings File

The application uses a JSON settings file to define image types and scales:

[
  {
    "Scale": "5x5",
    "Image Type": "SE"
  },
  {
    "Scale": "10x10",
    "Image Type": "BSE"
  }
]

Detection Configuration (KRONOS)

  • ROI: Region of Interest for number detection (default: X: 1100, Y: 0, W: 250, H: 35)
  • CPU Cores: Configurable number of CPU cores for multiprocessing
  • Resize Factor: Optional image resizing for faster processing

Keyboard Shortcuts

  • Escape: Close overview window
  • Ctrl+T: Toggle theme (if enabled)

Troubleshooting

Tesseract Not Found

If you encounter Tesseract errors in KRONOS mode:

  1. Install Tesseract OCR (see Prerequisites)
  2. On Windows, ensure it's installed in the default path or update the path in detection.py

No Images Displayed

  • Verify TIFF files are in the correct location
  • Check that KLARF files contain valid defect data
  • Ensure coordinates are correctly extracted (check mapping.csv)

Processing Errors

  • Verify file permissions
  • Check that all required files exist
  • Review console output for detailed error messages

Development

Project Structure

semapp/
├── main.py                 # Main application entry point
├── Layout/                 # UI layout components
│   ├── create_button.py   # Button and control creation
│   ├── main_window_att.py # Window layout management
│   ├── settings.py        # Settings window
│   └── styles.py          # UI styles
├── Plot/                  # Plotting and visualization
│   ├── frame_attributes.py # Main plot frame
│   ├── overview_window.py  # Overview window
│   └── utils.py            # Plot utilities
└── Processing/            # Data processing modules
    ├── klarf_reader.py     # KLARF file parsing
    ├── processing.py       # Main processing class
    ├── rename_tif.py        # File renaming
    ├── split_tif.py         # TIFF splitting
    ├── threshold.py        # Threshold processing
    └── detection.py        # OCR detection

Running Tests

# Run from project root
python -m semapp.main

License

This project is licensed under the GPL-3.0-or-later License - see the LICENSE file for details.

Author

Thibaut Meyer

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

  • PyQt5 community for the excellent GUI framework
  • Tesseract OCR for number detection capabilities
  • All contributors and users of SEMapp

Metadata

Release files for Semapp 1.0.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Semapp 1.0.21
File Size Uploaded
semapp-1.0.21.tar.gz 808.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Semapp 1.0.21
File Interpreter ABI Platform
semapp-1.0.21-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / semapp-1.0.21.tar.gz

Download URL semapp-1.0.21.tar.gz
Size 808.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6ea57aa52b4c7126c7d1265df1d722cc9ef4e8703b495cd4ae6327c1df77bff2
BLAKE2b-256 checksum
How to use checksums
44c9670b2e00d85bd3c203dd614d4f82bd2f2c1f3dc22d16bcbd1a0ac4fec8b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / semapp-1.0.21-py3-none-any.whl

Download URL semapp-1.0.21-py3-none-any.whl
Size 837.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47c3c0545f3f1c0f57dfd26a9d2195514f022a837a326e0e293be041a2ce4a15
BLAKE2b-256 checksum
How to use checksums
15cd5696a86a1e18afc7a086edaf28950fb0ca789b4f136ce1eb027818029853
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release history Release notifications | RSS feed

This release

1.0.21 This release

2 release files

1.0.19

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

1 release file

1.0.14

2 release files

1.0.13

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page