Example Workflows
Example 1: Single-Point Thickness Measurement
Scenario: Measure SiO₂ film thickness on silicon wafer
Step 1: Simulate Expected Spectrum
import requests
# Simulate spectrum for ~250nm SiO2
response = requests.post('http://localhost:5000/api/simulate_spectrum', json={
"film_material": "sio2",
"thickness_nm": 250,
"substrate": "silicon",
"wavelength_min": 400,
"wavelength_max": 900
})
data = response.json()
wavelengths = data['wavelengths']
reflectances = data['reflectances']
Step 2: Quick FFT Estimation
response = requests.post('http://localhost:5000/api/fft_analysis', json={
"wavelengths": wavelengths,
"reflectances": reflectances,
"film_material": "sio2",
"window": "hann",
"detrend": True
})
fft_result = response.json()
print(f"FFT estimate: {fft_result['thickness_nm']:.1f} nm")
print(f"Confidence: {fft_result['confidence']:.1f}")
# Output: FFT estimate: 248.5 nm, Confidence: 8.3
Step 3: Precise Fitting
response = requests.post('http://localhost:5000/api/extract_thickness', json={
"wavelengths": wavelengths,
"reflectances": reflectances,
"film_material": "sio2",
"algorithm": "lm",
"initial_guess": fft_result['thickness_nm'],
"bounds": [200, 300]
})
fit_result = response.json()
print(f"Fitted thickness: {fit_result['thickness_nm']:.2f} ± {fit_result['uncertainty_nm']:.2f} nm")
print(f"χ²: {fit_result['chi_squared']:.2e}")
# Output: Fitted thickness: 250.15 ± 0.82 nm, χ²: 3.2e-05
Best Practice
Always use FFT as initial guess for optimization. This hybrid approach combines speed and accuracy.
Example 2: Batch Processing Multiple Samples
Scenario: Process 50 wafer measurements from production line
import pandas as pd
import numpy as np
# Load measurement data
measurements = pd.read_csv('batch_measurements.csv')
results = []
for idx, row in measurements.iterrows():
wavelengths = row['wavelengths'].split(',')
reflectances = row['reflectances'].split(',')
# Convert to numbers
wavelengths = [float(w) for w in wavelengths]
reflectances = [float(r) for r in reflectances]
# Extract thickness
response = requests.post('http://localhost:5000/api/extract_thickness', json={
"wavelengths": wavelengths,
"reflectances": reflectances,
"film_material": row['material'],
"algorithm": "lm",
"initial_guess": 250,
"bounds": [200, 300]
})
result = response.json()
results.append({
'wafer_id': row['wafer_id'],
'thickness_nm': result['thickness_nm'],
'uncertainty_nm': result['uncertainty_nm'],
'chi_squared': result['chi_squared']
})
# Statistical analysis
results_df = pd.DataFrame(results)
print(f"Mean thickness: {results_df['thickness_nm'].mean():.2f} nm")
print(f"Std deviation: {results_df['thickness_nm'].std():.2f} nm")
print(f"Process uniformity: ±{results_df['thickness_nm'].std() / results_df['thickness_nm'].mean() * 100:.1f}%")
Example 3: Automated 2D Thickness Mapping
Scenario: Map thickness uniformity across 100mm wafer
import matplotlib.pyplot as plt
# Generate thickness map
response = requests.post('http://localhost:5000/api/thickness_map', json={
"scan_pattern": "spiral",
"resolution_x": 30,
"resolution_y": 30,
"film_material": "si3n4",
"sample_size_mm": [100, 100]
})
map_data = response.json()
thickness_map = np.array(map_data['thickness_map'])
stats = map_data['statistics']
# Visualize
plt.figure(figsize=(10, 8))
plt.imshow(thickness_map, cmap='viridis', origin='lower')
plt.colorbar(label='Thickness (nm)')
plt.title(f"Thickness Map - Mean: {stats['mean_nm']:.1f} nm, σ: {stats['std_nm']:.1f} nm")
plt.xlabel('X Position (mm)')
plt.ylabel('Y Position (mm)')
plt.savefig('thickness_map.png', dpi=300, bbox_inches='tight')
print(f"Uniformity: ±{stats['uniformity_percent']:.2f}%")
print(f"Scan time: {map_data['scan_time_seconds']:.1f} seconds")
Real-World Applications
Semiconductor Manufacturing
Application: Gate oxide thickness monitoring in CMOS fabrication
- Material: SiO₂ gate dielectric (5-50 nm)
- Requirement: ±0.1 nm precision, 100% wafer inspection
- Solution: FFT + L-M fitting with 0.5 nm accuracy
- Throughput: 900 measurements/hour with automated mapping
Impact: Early detection of process drift, reduced yield loss
Solar Cell Manufacturing
Application: Anti-reflection coating optimization
- Material: Si₃N₄ AR coating (70-90 nm)
- Requirement: Uniformity <3% across 156mm cells
- Solution: 25×25 point mapping with snake pattern
- Result: Identified edge thinning, optimized PECVD parameters
Impact: 0.3% absolute efficiency gain, $2M annual savings
Optical Coatings
Application: Multi-layer AR coating for camera lenses
- Materials: Alternating TiO₂/SiO₂ layers
- Challenge: 7-layer stack, each layer 50-200 nm
- Solution: Sequential measurement after each deposition
- Quality control: Real-time thickness feedback to sputter control
Impact: <0.5% reflectance at 550nm, zero rework
Data Storage
Application: Hard disk magnetic layer thickness
- Material: CoCrPt magnetic layer (10-20 nm)
- Requirement: ±5% thickness control for bit density
- Solution: Inline reflectometry during sputter deposition
- Monitoring: 100-point mapping per disk
Impact: Consistent areal density, reduced magnetic spacing
Research & Development
Application: Process development for novel 2D materials
- Materials: MoS₂, WSe₂ monolayers (0.7 nm)
- Challenge: Near-transparency, very thin films
- Approach: High-index substrate (Si), narrow wavelength range
- Analysis: Differential evolution for robust global search
Impact: Rapid CVD recipe optimization, layer counting validation
Performance Benchmarks
| Application |
Film Type |
Thickness Range |
Accuracy |
Time/Measurement |
| Quick QC |
SiO₂ on Si |
100-500 nm |
±5 nm (FFT) |
0.01 s |
| Precision Metrology |
SiO₂ on Si |
100-500 nm |
±0.5 nm (L-M) |
0.11 s |
| Unknown Sample |
Any |
50-1000 nm |
±1 nm (DE) |
1.5 s |
| 2D Mapping (20×20) |
Si₃N₄ on Si |
150-250 nm |
±1 nm |
44 s total |
Benchmarks measured on Intel Core i7-9750H @ 2.6 GHz, 16GB RAM
Integration Examples
Python Script Integration
# save as: measure_thickness.py
import sys
import requests
def measure_thickness(wavelengths, reflectances, material='sio2'):
"""Convenience wrapper for thickness measurement"""
response = requests.post('http://localhost:5000/api/extract_thickness',
json={
"wavelengths": wavelengths,
"reflectances": reflectances,
"film_material": material,
"algorithm": "lm"
})
return response.json()
if __name__ == '__main__':
# Read data from file
data = np.loadtxt('measurement.txt', delimiter=',')
wavelengths = data[:, 0].tolist()
reflectances = data[:, 1].tolist()
result = measure_thickness(wavelengths, reflectances)
print(f"{result['thickness_nm']:.2f} ± {result['uncertainty_nm']:.2f} nm")
LabVIEW Integration
Use HTTP Client VI to send JSON requests to API endpoints. Parse JSON responses for thickness values.
MATLAB Integration
% MATLAB example
url = 'http://localhost:5000/api/extract_thickness';
data = struct('wavelengths', wavelengths, ...
'reflectances', reflectances, ...
'film_material', 'sio2', ...
'algorithm', 'lm');
options = weboptions('MediaType', 'application/json');
response = webwrite(url, data, options);
thickness = response.thickness_nm;
uncertainty = response.uncertainty_nm;
fprintf('Thickness: %.2f ± %.2f nm\n', thickness, uncertainty);