Complete documentation for Flask backend endpoints
The thin-film metrology system provides a REST API for spectral reflectometry calculations and
analysis. All endpoints accept JSON requests and return JSON responses. Base URL for local
development: http://localhost:5000
Simulates reflectance spectrum for a thin-film stack using transfer matrix method.
| Parameter | Type | Required | Description |
|---|---|---|---|
| film_material | string | Yes | Film material code (sio2, si3n4, tio2, etc.) |
| thickness_nm | number | Yes | Film thickness in nanometers |
| substrate | string | Yes | Substrate material (silicon, glass, etc.) |
| wavelength_min | number | No | Minimum wavelength (nm), default: 400 |
| wavelength_max | number | No | Maximum wavelength (nm), default: 800 |
Extracts film thickness from measured reflectance spectrum using optimization algorithms.
| Parameter | Type | Required | Description |
|---|---|---|---|
| wavelengths | array | Yes | Array of wavelength values (nm) |
| reflectances | array | Yes | Array of measured reflectance values |
| film_material | string | Yes | Film material code |
| algorithm | string | No | "lm" or "de", default: "lm" |
| initial_guess | number | No | Initial thickness guess (nm) |
| bounds | array | No | [min, max] thickness bounds |
Performs FFT-based thickness estimation from spectral data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| wavelengths | array | Yes | Array of wavelength values |
| reflectances | array | Yes | Array of reflectance values |
| film_material | string | Yes | Film material code |
| window | string | No | Window function: "hann", "hamming", "blackman" |
| detrend | boolean | No | Apply detrending, default: true |
Generates 2D thickness map from spatial scan data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| scan_pattern | string | Yes | "raster", "snake", "spiral", "random" |
| resolution_x | number | Yes | Number of points in X direction |
| resolution_y | number | Yes | Number of points in Y direction |
| film_material | string | Yes | Film material code |
| sample_size_mm | array | No | [width, height] in mm |
Returns list of available materials and their optical properties.
Low-level reflectance calculation for single wavelength.
| Parameter | Type | Required | Description |
|---|---|---|---|
| wavelength_nm | number | Yes | Single wavelength value |
| thickness_nm | number | Yes | Film thickness |
| film_material | string | Yes | Film material code |
| substrate | string | Yes | Substrate material |
| Status Code | Description | Example |
|---|---|---|
| 400 | Bad Request | {"error": "Missing required parameter: film_material"} |
| 404 | Not Found | {"error": "Material 'unknown' not found in database"} |
| 500 | Internal Server Error | {"error": "Fitting algorithm failed to converge"} |
For production deployment, implement rate limiting: