WebCalEM is a browser-based TEM magnification calibration tool. It loads test specimen images, lets you select image regions, computes FFT/radial profiles in the browser, and exports measurement and statistics results.
Open the hosted app: WebCalEM on GitHub Pages
For local development or offline testing, first clone the repo:
git clone https://github.com/jianglab/WebCalEM.git
cd WebCalEMThen serve the repo folder with:
python -m http.server 8766Then open:
http://127.0.0.1:8766/
The app is contained in index.html. The local server only serves static files; you do not need to install the old Python app dependencies. Plotly and MathJax are bundled in vendor/, so local plotting and equation hints work without internet access. You can also download the repo as a ZIP, unzip it, open a terminal in that folder, and run the same python -m http.server 8766 command.
Avoid launching by double-clicking index.html for offline use. Browsers block automatic loading of bundled local image paths from file:// pages, so use the local server command above or switch to Upload and click Browse.
- Load an image from the URL box or switch to Upload and click Browse.
- Choose the specimen lattice spacing from Specimen, or use Custom.
- Set the nominal pixel size in Nominal (A/px).
- Drag a region on the Original Image panel. FFT and radial analysis update after the drag finishes.
- Use 1D Radial Profile for radial peak picking, or 2D Spectrum for FFT peak/ellipse correction.
- Review the Pixel Size result and click Add to Table.
- Use the Measurements and Statistics section to review rows, group summaries, and scatter statistics.
- Click Download Results to export the measurements CSV, grouped statistics CSV, and statistics plot PNG.
- Hover over controls, images, plots, and table cells for contextual hints and preview snapshots.
- Drag a box on Plotly plots to zoom. Use the modebar, wheel zoom, pan, and reset controls as needed.
- Click a row in the Measurements table to reload its saved image region for manual correction, then click Update Row.
- Use Autosample with Upload mode to sample multiple regions per image. Set Regions and Region size, then click Start.
- The Autocorrect checkbox snaps 1D clicks to nearby local maxima and 2D clicks to the brightest pixel in a small window.
- Resize splitters between panels to allocate more space to the image, FFT analysis, or statistics areas.
The test_image folder includes sample TIFF images for quick validation. The default image path in the app points to test_image/130k-Pixel0.75A.tiff, a graphene test image with a nominal pixel size around 0.75 A/px.
- Computation runs client-side in the browser; large regions and large FFT grids can be memory-intensive.
- URL images are fetched by the browser. Remote links must allow browser fetches/CORS; if a JPEG link fails, download it and use Upload or serve it from the same local folder.
- TIFF and MRC parsing are intentionally lightweight and may not cover every microscopy file variant.