Decoder-DeepONet (DDON)
Model and code of Decoder DeepONet (DDON) for Electric field reconstruction from EFISH measurements. This model is specifically designed for vertically polarized EFISH signals (for a vertically
polarized probe beam).
To use the model and code, please cite:
''Yang, Z., Sugeng, E.S., Alicherif, M. and Chng, T.L., 2026. An interpretable operator-learning model for electric field profile reconstruction in discharges based on the EFISH method. Plasma Sources Science and Technology, 35(2), p.025035.''
The related paper and analysis are available at the DOI 10.1088/1361-6595/ae413f.
Note Scripts and model will be available soon...
Environment recommended (model trained on):
- Python 3.10.15
- TensorFlow-gpu 2.10.1
Main user file:
- 'DeepONet_Resnet_Exp.py' % for script use
- 'DeepONet_Resnet_Exp.ipynb' % for jupyter editor use
Script files:
- 'self_layers.py' %to import some self-defined layers
- 'PINN_Model_Predict.py' % run the model, output MATLAB .mat file, visualize the prediction
- 'self_Predict_ModelResult.py' % child file of the 'PINN_Model_Predict.py', including necessary code for Efield prediction
Model file (DDON) and model description
- Please download the DDON model via the release page for use (put it under the dir model log) or via:
https://github.com/ozzzzj/Decoder-DeepONet/releases/download/DDON/20260520_model_Batsize-512.h5
Instructions to use the model for Efield prediction:
-
To use the model, please first interpolate the EFISH file to the following grid via MATLAB: $z/z_R = [-50:2:-24 , -22:1:-16 , -15:0.5:-1.5 , -1:0.2:1 , 1.5:0.5:15 , 16:1:22 , 24:2:50]$;
or
$z/z_R = [-50:1:-2 , -1:0.2:1 , 2:1:50]$;Note: The first grid point is recommended and should be tried first, as it may always show good predictions; otherwise, try the second to see if better results can be gotten.
-
Then further normalize the $z/z_R$ by dividing $z_\mathrm{scale} = 50$, then the input grid should be:
$z^\prime = z/z_R/50 = [-50:2:-24 , -22:1:-16 , -15:0.5:-1.5 , -1:0.2:1 , 1.5:0.5:15 , 16:1:22 24:2:50]/50$;
or
$z^\prime = z/z_R/50 = [-50:1:-2 , -1:0.2:1 , 2:1:50]/50$;Note 1: $z^\prime \in [-1,1]$; crop the input EFISH profile if the normalized and scaled range (z/z_R/50) goes beyond this range.
Note 2: The sampling grid outside your experiment range could be set to zero, as the DDON accepts zero input outside the key feature range. For how to quantify the key range, please refer to our paper. Please ensure the input range is at least 4.2*FWHM of your input EFISH profile (normalized), although sometimes a smaller sampling range than this criterion also works. -
Normalize the measured EFISH profile (along the laser propagation axis, $z$) by its maximum: $P_\mathrm{norm}(z) = P(z)/P_\mathrm{max}$
-
Estimate the phase mismatch value $u$ through the wave-factor mismatch $\Delta k$ and Rayleigh range $z_\mathrm{R}$, and normalize it as input:
$u^\prime$ = $\Delta k \cdot z_\mathrm{R}$/-0.068.
Note: -0.068 is the max $u$ value from the training dataset. -
Import the MAT file as structure files and obtain the prediction. Or you can modify the code to fit your data structure as well.
The MAT file structure is as follows:
## Choose how to use DDONProfile_Px$P_x$ $[z, P_x]$ (experimentally measured EFISH and normalized $z'$; dim: [109,2]) $u$ The phase mismatch value along $z$; dim: [109,1] $E_x$ The electric field value along $z$; dim: [109,1] 1. Online Web App — no installation
Run DDON directly in a web browser:
Launch the DDON E-field Reconstruction Web App
The web app supports preprocessed CSV and MATLAB MAT inputs and performs inference locally in the browser using ONNX Runtime Web.
2. Local Packaged Inference — lightweight ONNX Runtime
For local prediction without installing TensorFlow, install this repository as a Python package:
pip install .
Python interface:
from ddon import DDON model = DDON() E = model.predict(values, u=-0.35)
Command-line interface:
ddon predict Efish_vertical.mat -o prediction.csv
For MATLAB MAT input,
Profile_Px.PxandProfile_Px.uare read automatically. CSV/TXT input can be used with--u:ddon predict input.csv --u -0.35 -o prediction.mat
The ONNX model is downloaded automatically on first use and cached locally. This mode requires only NumPy, SciPy, and ONNX Runtime.
3. Full Python Research Code — To be released
The full TensorFlow research implementation, including the original prediction, evaluation, and analysis workflow, is not included in the current public release and will be released separately in the future.
Environment recommended (model trained on):
- Python 3.10.15
- TensorFlow-gpu 2.10.1
Main user file:
- 'DeepONet_Resnet_Exp.py' % for script use
- 'DeepONet_Resnet_Exp.ipynb' % for jupyter editor use
Script files:
- 'self_layers.py' %to import some self-defined layers
- 'PINN_Model_Predict.py' % run the model, output MATLAB .mat file, visualize the prediction
- 'self_Predict_ModelResult.py' % child file of the 'PINN_Model_Predict.py', including necessary code for Efield prediction
Model file (DDON) and model description
- Please download the DDON model via the release page for use (put it under the dir model log) or via:
https://github.com/ozzzzj/Decoder-DeepONet/releases/download/DDON/20260520_model_Batsize-512.h5
Instructions to use the model for Efield prediction:
-
To use the model, please first interpolate the EFISH file to the following grid via MATLAB: $z/z_R = [-50:2:-24 , -22:1:-16 , -15:0.5:-1.5 , -1:0.2:1 , 1.5:0.5:15 , 16:1:22 , 24:2:50]$;
or
$z/z_R = [-50:1:-2 , -1:0.2:1 , 2:1:50]$;Note: The first grid point is recommended and should be tried first, as it may always show good predictions; otherwise, try the second to see if better results can be gotten.
-
Then further normalize the $z/z_R$ by dividing $z_\mathrm{scale} = 50$, then the input grid should be:
$z^\prime = z/z_R/50 = [-50:2:-24 , -22:1:-16 , -15:0.5:-1.5 , -1:0.2:1 , 1.5:0.5:15 , 16:1:22 24:2:50]/50$;
or
$z^\prime = z/z_R/50 = [-50:1:-2 , -1:0.2:1 , 2:1:50]/50$;Note 1: $z^\prime \in [-1,1]$; crop the input EFISH profile if the normalized and scaled range (z/z_R/50) goes beyond this range.
Note 2: The sampling grid outside your experiment range could be set to zero, as the DDON accepts zero input outside the key feature range. For how to quantify the key range, please refer to our paper. Please ensure the input range is at least 4.2*FWHM of your input EFISH profile (normalized), although sometimes a smaller sampling range than this criterion also works. -
Normalize the measured EFISH profile (along the laser propagation axis, $z$) by its maximum: $P_\mathrm{norm}(z) = P(z)/P_\mathrm{max}$
-
Estimate the phase mismatch value $u$ through the wave-factor mismatch $\Delta k$ and Rayleigh range $z_\mathrm{R}$, and normalize it as input:
$u^\prime$ = $\Delta k \cdot z_\mathrm{R}$/-0.068.
Note: -0.068 is the max $u$ value from the training dataset. -
Import the MAT file as structure files and obtain the prediction. Or you can modify the code to fit your data structure as well.
The MAT file structure is as follows:
Profile_Px$P_x$ $[z, P_x]$ (experimentally measured EFISH and normalized $z'$; dim: [109,2]) $u$ The phase mismatch value along $z$; dim: [109,1] $E_x$ The electric field value along $z$; dim: [109,1]
Metadata
Release files for ddon-efish 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ddon_efish-1.0.0.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ddon_efish-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / ddon_efish-1.0.0.tar.gz
| Download URL | ddon_efish-1.0.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
169ddeefb7160342229308f302d3ed391fffcf009bad79004a36c9909f1e6eba
|
|
BLAKE2b-256 checksum How to use checksums |
19c88dca9f6356951ee612fc84c1794182bd9b83016998e0bb3d3e9a79907b0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / ddon_efish-1.0.0-py3-none-any.whl
| Download URL | ddon_efish-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0983622c5340c04acec344aad03418a2e80e0c6cc7fca4aa7fe8fe20f9ea6a1a
|
|
BLAKE2b-256 checksum How to use checksums |
ad049d20cdf7e0ff8c44fcdff432bc50261056ac0837a6c14d724820a706eebd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency log