Skip to content
aai2kPublic

Repository files navigation

TFStudio

An open-source design, analysis, and optimization environment for optical thin-film coatings.

MIT License Version Downloads Platform Maintainability TFStudio DOI

Website · Tutorials · Live demo · Documentation · API · Download · Roadmap

English · 简体中文 · Italiano

TFStudio 2.2.0 is the first Rust/Tauri release. 2.1.0 was the last Electron release, with source on js-legacy.

TFStudio main window

What is TFStudio?

TFStudio is a desktop application for designing and analyzing optical thin-film coatings: antireflection coatings, mirrors, beamsplitters, bandpass and edge filters, and more. It provides an optical engine, refinement and synthesis algorithms, and an analysis suite, in a docked, multi-window interface.

This edition uses a Rust optical engine and a React and TypeScript interface hosted by Tauri. Save and back up your designs and material catalogs before switching from the Electron app.

⚠️ Status: TFStudio is independently developed software. Always verify critical designs against your own calculations and measurements before committing them to a production deposition run.

Key features

Design & evaluation

  • Transfer-matrix method (TMM) for absorbing and dispersive media at oblique incidence, both s- and p-polarization
  • Full-system modeling: front coating, substrate (with absorption), and back coating, including incoherent substrate multiple reflections
  • Design the front coating, the back coating or both at once, the back optionally held as the mirror of the front; every window evaluates one side alone or the whole part
  • Averaging over a convergent or divergent illumination cone, with a uniform, Lambertian or tabulated intensity
  • Reflectance / transmittance / absorptance spectra in percent, decibels or optical density, color, integral figures of merit
  • Layer editor with simultaneous physical / optical / quarter-wave / full-wave thickness representations
  • Stack formula: build a whole stack from a formula such as (HL)^4 H
  • Specification: design requirements as live pass/fail checks, turned into merit-function rows with one button and used as the pass criterion of a Monte Carlo yield run
  • Coating library: coatings kept as reusable stacks with their substrate, medium, band and angle, a built-in shelf of starting designs beside your own, placed on either side of a design

Optimization & synthesis

  • Refinement methods: SQP with bounds, damped least squares (Levenberg-Marquardt), conjugate gradient, Newton, trust-region Newton, Newton-CG, multi-start DLS, differential evolution and simulated annealing. Try all methods in turn to keep the best result. Gradient methods use analytic derivatives where available.
  • Needle optimization and gradual evolution synthesis (automatic layer insertion from scratch)
  • Structural optimization over the layer count itself
  • Refinement and synthesis across multiple environments, including material substitutions and temperature changes
  • Filter design wizard: multi-cavity Fabry-Perot bandpass and notch prototypes (DWDM, LWDM) built in a few guided steps, at normal or oblique incidence
  • Edge filter: finds a non-polarizing edge filter, whose s and p edges meet at the angle of incidence
  • Flexible merit function: spectral targets, ramps, band averages, worst-case operands, thickness constraints, and a search step per row down to 0.001 nm for narrow peaks and pass bands
  • Fitting to an imported measured spectrum, as one more row in the merit function
  • Variator: sliders on each layer's thickness and on the substrate that every open window follows, and on each material's n and k
  • Design cleaner: merges adjacent layers of one material and removes very thin ones, then refines again if asked
  • The desktop transfer-matrix kernel runs in Rust. Synthesis can evaluate independent candidates on multiple threads.

A broadband AR target set in the merit function wizard, then Gradual Evolution building an 8-layer coating from a bare substrate

A 50 % transmittance target drawn on the plot, then Refinement bringing an 8-layer stack onto it

Analysis windows

  • Optical evaluation, wavelength vs angle maps, admittance diagrams, electric-field profiles, group delay / GDD, dispersion through a bulk material, ellipsometric parameters, color evaluation, refractive-index profile, layer thickness diagram
  • Plot engine: custom multi-curve plots, or any quantity mapped over two swept variables as a heatmap or 3D surface
  • Pulse analysis: a Gaussian, sech² or super-Gaussian pulse, or a measured spectrum with its phase, reflected off or sent through the coating for any number of bounces, drawn against the Fourier-limited pulse of the same spectrum, with output duration, peak, delay and residual GDD
  • Tolerance & manufacturing analysis: Monte Carlo error analysis, layer sensitivity, inhomogeneity, roughness/scattering, systematic deviations
  • Stress: per-film stress with its thermal part, the bow it leaves in the substrate, and how close the stack is to cracking or delaminating, from mechanical constants kept on each material; an STR merit operand balances the film force for a flat part
Angle-map example

A quarter-wave mirror typed into Stack Formula, then its reflectance over wavelength and angle of incidence as a 3D surface

Materials

  • Built-in library: Sellmeier glasses written out from their papers and the Schott datasheet, and tabulated films and metals generated from the refractiveindex.info database (CC0)
  • Dispersion: the Zemax formulas, general Sellmeier and Cauchy, the OptiLayer Schott, Hartmann and Drude forms, the refractiveindex.info formulas, and tabulated n,k; complex index with explicit conventions
  • Import of material catalogs from Zemax AGF, TFCalc, Essential Macleod and OptiLayer files, and an in-app refractiveindex.info browser
  • Ships with the Schott glass catalog, coating and substrate material catalogs, and an offline copy of the refractiveindex.info database, so the browser works without a connection

RefractiveIndex.info material browser

Measured data

  • Import of measured R / T / A spectra and of ellipsometric Ψ and Δ, drawn over the calculated curves
  • Reads delimited text in any common layout (PerkinElmer, Shimadzu, Cary and Filmetrics exports among them), JCAMP-DX, and Woollam and Accurion ellipsometer exports
  • Curve editor: type, paste or correct a curve's points before it is applied
  • n,k characterization: derive a film's index, extinction and thickness from a measured transmittance and reflectance, or from a Ψ and Δ pair, and save the result as a material
  • Fitting a design to a measured Ψ and Δ: the curve becomes merit-function targets for refinement
  • Export of measured or calculated curves in nm, µm or wavenumber, as a fraction or a percentage

Manufacturing

  • Deposition / monitoring simulation (broadband and monochromatic optical monitoring)
  • Monitoring worksheet: per-layer monitoring wavelength and witness-chip assignment, with the layers that cannot be terminated closely enough flagged before the run
  • Process exporter
  • Coating exchange with lens design software, both ways: Zemax OpticStudio COATING.DAT and CODE V MULTILAYER .seq / .mul
  • Design import from TFCalc (.tfd), Essential Macleod (.dds) and OptiLayer (.dsg), with materials matched to your catalogs
  • Report: a document built from blocks over one or several designs, saved as PDF or a single HTML file

Scripts, Python and AI assistants

  • Script Console: runs JavaScript or Python on the open design. JavaScript uses the bundled Node.js runtime. Python uses a local interpreter, version 3.8 or newer.
  • Python package: build, evaluate, refine and synthesize designs from your own Python programs, on their own or on the design open in TFStudio
  • AI assistants: started with --mcp, TFStudio lets an assistant such as Claude open, build, evaluate, refine, synthesize and save designs; started with --mcp --live, after you click Interactive it works on the open design, each change one step that Ctrl+Z undoes
  • The API gives the numbers the windows show for most analysis windows, specification checks and yield, tolerancing, the monitoring worksheet, measured data and coating exchange: see the API reference, the Python page and AI assistants

Platform

  • Desktop app with Tauri, React, and TypeScript
  • Tabbed ribbon with a search box that finds any tool by name
  • Windows dock, or tear off the layout onto a second monitor
  • English, Russian, Chinese and Italian UI

Scientific basis

Methods and their sources:

  • Transfer-matrix method: H. A. Macleod, Thin-Film Optical Filters, 5th ed.
  • Numerical needle synthesis: Sullivan & Dobrowolski, Appl. Opt. 35, 5484 (1996); Tikhonravov et al., Appl. Opt. 35, 5493 (1996)
  • Gradual evolution: Tikhonravov et al. (2007)
  • Dispersion and pulse propagation: Birge & Kärtner, Appl. Opt. 45, 1478 (2006)
  • Film stress, substrate bow and failure criteria: Klokholm, IBM J. Res. Dev. 31, 585 (1987); Suhir, J. Appl. Phys. 88, 2363 (2000); Klein, J. Appl. Phys. 88, 5487 (2000) and Opt. Eng. 40, 1115 (2001)

The transfer-matrix engine is published separately as tmmcore for Rust, JavaScript, and Python. The desktop app uses the Rust crate. Its comparison page gives accuracy and speed measurements and describes how to reproduce them.

Platforms and downloads

Download TFStudio from Releases.

When upgrading from 2.1.0, save open designs before closing the old app. The new app opens the saved files. Edits you left unsaved are available only in the 2.1.0 session.

Windows x64

Windows 10 or newer with Microsoft Edge WebView2.

  • Installer: Run *-setup.exe.
  • Portable: Run TFStudio-2.2.1-Portable.exe from a writable folder. To upgrade a portable copy, place the new executable beside its existing AppData folder so it can read your settings.
  • Windows 7 and 8.1: Use the Win7 installer or portable build from TFStudio 2.1.0.

Linux x64

Debian package for Ubuntu 24.04. Install it and launch TFStudio from the applications menu.

sudo apt install ./TFStudio_*_amd64.deb
Run the AppImage
chmod +x TFStudio_*_amd64.AppImage
./TFStudio_*_amd64.AppImage
Install the Flatpak bundle
flatpak install --user ./TFStudio-2.2.1-x86_64.flatpak
flatpak run xyz.tfstudio.TFStudio

The live web demo has editable designs and live spectra.

Build from source

Use Git, Rust 1.100.0 via rustup, and Node.js 24.18.0 with npm.

From your checkout of the Rust code:

npm --prefix app ci
npm --prefix app run tauri dev
Build a release executable
npm --prefix docs-site ci
npm --prefix app run tauri build -- --no-bundle -- --locked

The executable is target/release/TFStudio.exe on Windows and target/release/tfstudio on Linux. See Building packages for the installer, Linux bundles, and offline material catalogs.

The user manual is maintained in docs-site/.

Citing TFStudio

If TFStudio contributes to your work, please cite it using the project DOI, which covers all versions. Citation metadata is in CITATION.cff.

Contributing

Issues and pull requests are welcome. Because TFStudio is a scientific tool, contributions to the optical engine are held to a physics-correctness bar (cite your sources, validate against a reference, add a test). Please read CONTRIBUTING.md before opening a pull request.

License

MIT © 2026 Andrey Achapovsky.

Author

Andrey Achapovsky: ORCID 0009-0005-1497-6279

Acknowledgements

Releases

Used by

Contributors

Languages