See details from GitHub:
https://github.com/LKong92/Kong_Panel
KONG Panel (KP) is an Igor Pro source package for scanning tunneling microscopy (STM/STS) data processing, interactive visualization, spectral analysis, FFT/QPI workflows, lattice/strain analysis, and simple model simulation. It was developed by Lingyuan Kong as a working research panel: the goal is to keep the everyday analysis path inside one Igor environment, from loading raw Nanonis data to plotting maps, extracting spectra, fitting linecuts, running simulations, and formatting final figures.
Start with these two guides when browsing the package on GitHub:
Function, Proc, Window, Macro, and Menudefinitions parsed from src/*.ipf.The repository also includes interactive HTML manuals with search and navigation. After GitHub Pages is enabled for this repository, these links open the rendered manuals directly in a browser:
GitHub shows the Markdown files directly in the repository browser. The GitHub Pages links above are the preferred way to use the interactive HTML versions from the web.
Selected KP modules and related standalone tools have also been posted separately on WaveMetrics:
KP has been developed as a personal research workflow since 2016年04月15日, with the surviving update log beginning on 2021年09月17日. The package grew gradually from everyday STM/STS, ARPES, FFT/Fourier-transform analysis, lattice-analysis, and modeling needs rather than from a single one-time software design pass. Parts of the early code base grew from a general ARPES Igor template written by Pierre Richard and Hong Ding.
Many STM/STS workflows for real-space image analysis, Fourier-transform analysis, and spectroscopic-map processing in KP were developed while processing data for Kong et al., "Cooper-pair density modulation state in an iron-based superconductor," Nature 640, 55-61 (2025). This GitHub package provides the Igor analysis source code used for data analysis in that Nature work; the source data themselves are published with the article. Together, the paper and its associated source data provide a scientific demonstration of the type of real-space STM analysis that can be realized with KONG Panel.
If KP is useful for your work, citation of that Nature paper is appreciated:
Kong, L. et al. Cooper-pair density modulation state in an iron-based superconductor.
Nature 640, 55-61 (2025). https://doi.org/10.1038/s41586-025-08703-x
9.04.16, dated 2026年05月18日.src/KP_NanonisLoaders.ipf.src/KP_NewColorTables.itx when the panel opens.template.pxp are recreated from src/KP_GlobalState.ipf when the panel opens.src/Kong_Igor_panel.ipf is self-contained: opening that panel source also includes all of the action-procedure files used by its controls.templates/KongPanel_Template_20260520.pxp.KONG Panel can be used in two ways:
src/ into Igor's User Procedures area, include Load_KongPanel.ipf, and compile. This keeps KP available from any new Igor experiment.templates/KongPanel_Template_20260520.pxp into a dataset folder and open that copy directly. This starts from a self-contained Igor experiment with the KP procedure pages, custom color tables, physical constants, startup globals, and main panel template already packed in.For the source install, the loader file, src/Load_KongPanel.ipf, includes the main panel recreation file, which then includes the analysis, display, fitting, simulation, and utility procedure files used by the panel. When the procedures compile, Igor adds a Kong Panel menu item; opening the panel loads the 47 custom color-table waves from KP_NewColorTables.itx into root:Packages:NewColortable and recreates the required startup globals documented in docs/STARTUP_STATE.md.
KP is prepared and tested with the Igor Pro 9 series. Install Igor Pro 9 from WaveMetrics before using this package:
Igor Pro is commercial software. WaveMetrics provides a fully functional 30-day evaluation period; after that, an unlicensed installation enters limited-functionality mode. WaveMetrics offers Standard, Academic, Student, and multi-user/coursework license options. As checked on 2026年05月19日, WaveMetrics lists Igor Pro 10 as Windows-only, while Igor Pro 9 provides macOS and Windows installers; KP is tested here against Igor Pro 9.
This is the recommended setup if you want KP available from any clean Igor experiment.
#include "Load_KongPanel"
src/ folder into Igor Pro's User Procedures folder. Keeping the files together in a folder named KongPanel is recommended.Documents/WaveMetrics/Igor Pro 9 User Files/User Procedures/.Help -> Show Igor Pro User Files to locate the correct user-files folder.KP_NewColorTables.itx with the .ipf files, preferably inside the same KongPanel or srcfolder. This file contains the 47 custom color-table waves used by KP.Windows -> Procedure Windows -> Procedure Window, or create a new procedure window via Windows -> New -> Procedure.#include "Load_KongPanel"
Compile in the procedure window, or by using Igor's procedure compile command.Kong Panel -> Open Kong Panel, or run:Kong_Igor_panel()
You can also explicitly open the loader file using File -> Open File -> Procedure... and select src/Load_KongPanel.ipf. Igor's official documentation recommends #include for shared procedure packages; quoted includes search the Igor Pro User Files User Procedures folder and its subfolders.
If you prefer each dataset to live in its own self-contained Igor experiment, use the included clean template:
templates/KongPanel_Template_20260520.pxp
Recommended workflow:
templates/KongPanel_Template_20260520.pxp into that folder..pxp in Igor Pro 9 and load/analyze the data there.The template has a short cleaned command history, opens without requiring the source files to be in User Procedures, and contains the adopted KP procedure pages plus the required startup objects. This mode is convenient for keeping each experiment folder portable and independent.
To rebuild your own template from the source package:
src/ folder.Kong_Igor_panel() once so the panel opens and the 47 color-table waves are loaded.AdoptFiles/A
KongPanel_Template.pxp.KongPanel_Template.pxp into that folder, open it, and load/analyze the data there. This keeps each project as an independent .pxp and does not require the daily analysis session to find KP files in User Procedures.Avoid loading this source package on top of another KP experiment that already contains KP procedure pages with the same function names. A mixed session with duplicate KP procedure pages can produce duplicate-definition errors.
When preparing a GitHub release or ZIP archive, include both src/KP_ColorTables.ipf and src/KP_NewColorTables.itx. Without the .itx file, the source package can still compile, but popups and graph-formatting functions that reference root:Packages:NewColortable:* will not have the custom color waves available.
KP is broad by design. The panel is arranged as a collection of compact work areas rather than a single linear wizard. The following map summarizes the main functional groups visible in the panel and the corresponding IPF modules.
KP provides loaders and converters for common Nanonis-style STM/STS workflows:
.3ds linecuts and grid maps..sxm and .nsp topography files..sxm/.nsp files.The KP-local Nanonis loader in KP_NanonisLoaders.ipf supports the panel's .3ds, .sxm, and .nspworkflows. It was rewritten from the small subset of Kohsaka Macro (KM) loading behavior that KP used; KM was written by Yuhki Kohsaka. No full KM package management or unrelated KM UI behavior is included.
Main files:
src/KP_NanonisLoaders.ipfsrc/UNISOKU3dscutextract.ipfsrc/Miscellaneous_Codes.ipfKP includes fast display tools for 1D, 2D, and 3D waves:
dI/dV, distance-vs-voltage, conductance unit labels, topography maps, axis arrows, plan/auto/rectangle figure styles, and label-on/label-off figure modes.Some of these display tools are also available as standalone WaveMetrics posts on the author page.
Main files:
src/SmartDisplay.ipfsrc/Smart_3D_Viewer_New.ipfsrc/transfergraph.ipfsrc/Miscellaneous_Codes.ipfThe FFT and QPI area is one of the largest parts of KP:
Get A/Get B/Get Q style marker workflows.Main files:
src/FFT.ipfsrc/Lawler-Fujita Drift Correction.ipfsrc/Map_the_phase_difference_between_two_image.ipfsrc/Symmetrization.ipfsrc/PR_QPI.ipfsrc/Shear Correction for C4.ipfKP contains many Igor wave operations that are useful when repeatedly cleaning and reshaping STM/ARPES matrices:
Main files:
src/MatrixCalculation.ipfsrc/FFT.ipfsrc/Miscellaneous_Codes.ipfsrc/Procedure.ipfKP includes STS analysis routines used for maps, linecuts, and individual spectra:
I/V to dI/dV by differentiation.Main files:
src/MultipeakforLinecut.ipfsrc/General_Simu.ipfsrc/Miscellaneous_Codes.ipfsrc/UNISOKU3dscutextract.ipfKP still carries a large ARPES/template section inherited from earlier Igor workflows:
kx-ky, kz, and photon-energy maps.Main file:
src/Pierre's Template.ipfKP includes tools for real-space lattice work and moire analysis:
Main files:
src/Triangle Lattice_Graphene_like.ipfsrc/Lattice Segregation.ipfsrc/General_Simu.ipfsrc/Shear Correction for C4.ipfKP contains model simulators and teaching/research calculations that can be launched from the panel:
A(k, omega) and Berry-curvature style outputs.A(k, omega, L) utilities.k.p, QPI, LDOS, and Fermi-surface simulations.q0, h, G0, muB, kB, eV, meV, and m0.topgraph*, colorsetedc*, colorinverseedc, zn_cons, and related strings. The exact defaults and validation commands are listed in docs/STARTUP_STATE.md.s0/sx/sy/sz, st0/stx/sty/stz), tensor products (mpc/mpn/mpt), text matrix addition (plust), and automated Pauli-sequence builders (automatrixT/automatrixC).Main files:
src/Models.ipfsrc/ModelingTunneling.ipfsrc/General_Simu.ipfThe docs/ folder contains both release notes and generated code references.
docs/CHANGELOG.md: polished GitHub-facing changelog.docs/STARTUP_STATE.md: startup-state compatibility note listing the globals restored from template.pxp.docs/KP_update_log_20260518.md: short update entry for the 2026年05月18日 GitHub preparation.docs/KP_update_log_original.rtf: original update-log copy.docs/KP_update_log_raw.txt: plain-text conversion of the original log.docs/code_inventory.md: source extraction, include layout, and Nanonis loader notes.docs/FUNCTION_BOOK.html: color-coded function manual generated from all IPF files.docs/FUNCTION_INDEX.md: GitHub-readable Markdown function index, organized by workflow rather than by IPF file.docs/assets/kong_panel_main.png: GitHub-friendly main-panel image.docs/PANEL_GUIDE.html: main-panel image plus button-to-procedure guide.docs/PANEL_GUIDE.md: Markdown version of the panel guide.docs/function_catalog.json: machine-readable function catalog.docs/panel_catalog.json: machine-readable panel/control catalog.The generated function manual covers every Function, Proc, Window, Macro, and Menu definition found in src/*.ipf.
Open this file in a browser for the best reading experience:
docs/FUNCTION_BOOK.html
The HTML manual is styled to resemble Igor procedure-code structure: keywords are blue, function/procedure names are visually separated, signatures use a monospace font, and panel callback controls are marked in purple. It is organized by workflow and role, not by IPF file, while still showing source file and line for navigation. The current generated catalog contains 3203 entries from 25 IPF files.
For GitHub browsing, use:
docs/FUNCTION_INDEX.md
For the main KONG Panel layout, button map, and secondary/internal panel overview, use:
docs/PANEL_GUIDE.html
src/Load_KongPanel.ipf: recommended loader; compiles all KP sources and adds the Kong Panel menu.src/Kong_Igor_panel.ipf: self-contained panel entry; opening it includes all required action-procedure files.src/KongPanel.ipf: compatibility umbrella include.src/KP_NanonisLoaders.ipf: KP-local Nanonis .3ds, .sxm, and .nsp loader.src/*.ipf: KP analysis, display, simulation, fitting, formatting, and panel modules.docs/: changelog, update-log copies, code inventory, and function reference.scripts/build_function_book.py: regenerates the function book, function index, panel guide, and JSON catalogs.KP uses several standard WaveMetrics/Igor procedure files through Igor's include system:
Resize ControlsPeak AutoFindGlobal Fit 2These files are not vendored into this repository. They should be available from Igor Pro/WaveMetrics procedure libraries or installed separately in the user's Igor procedure path.
KP was developed by Lingyuan Kong for STM data analysis and model simulation workflows, with development beginning on 2016年04月15日 according to the preserved project log. This GitHub version was prepared with the help of Codex. Earlier parts of the package grew from a general ARPES Igor template by Pierre Richard and Hong Ding, with some signal-enhancement functions referring to Peng Zhang's curvature-analysis macro.
KONG Panel is released under the MIT License.
Copyright (c) 2026 Lingyuan Kong. See LICENSE for details.
Forum
Support
Gallery
Learn More
Learn More
Learn More