Skip to main content

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...

  • Python 3.10.15
  • TensorFlow-gpu 2.10.1

Main user file:

  1. 'DeepONet_Resnet_Exp.py' % for script use
  2. 'DeepONet_Resnet_Exp.ipynb' % for jupyter editor use

Script files:

  1. 'self_layers.py' %to import some self-defined layers
  2. 'PINN_Model_Predict.py' % run the model, output MATLAB .mat file, visualize the prediction
  3. 'self_Predict_ModelResult.py' % child file of the 'PINN_Model_Predict.py', including necessary code for Efield prediction

Model file (DDON) and model description

Instructions to use the model for Efield prediction:

  1. 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.

  2. 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.

  3. Normalize the measured EFISH profile (along the laser propagation axis, $z$) by its maximum: $P_\mathrm{norm}(z) = P(z)/P_\mathrm{max}$

  4. 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.

  5. 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]
    ## Choose how to use DDON

    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.Px and Profile_Px.u are 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.

    • Python 3.10.15
    • TensorFlow-gpu 2.10.1

    Main user file:

    1. 'DeepONet_Resnet_Exp.py' % for script use
    2. 'DeepONet_Resnet_Exp.ipynb' % for jupyter editor use

    Script files:

    1. 'self_layers.py' %to import some self-defined layers
    2. 'PINN_Model_Predict.py' % run the model, output MATLAB .mat file, visualize the prediction
    3. 'self_Predict_ModelResult.py' % child file of the 'PINN_Model_Predict.py', including necessary code for Efield prediction

    Model file (DDON) and model description

    Instructions to use the model for Efield prediction:

    1. 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.

    2. 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.

    3. Normalize the measured EFISH profile (along the laser propagation axis, $z$) by its maximum: $P_\mathrm{norm}(z) = P(z)/P_\mathrm{max}$

    4. 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.

    5. 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)

Source distribution for ddon-efish 1.0.0
File Size Uploaded
ddon_efish-1.0.0.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ddon-efish 1.0.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page