# Traceon
Traceon is a Python library designed for the modeling of electron microscopes.
Traceon features a Boundary Element Method (BEM) solver that computes electrostatic and magnetostatic fields for accurate particle tracing. By relying on the BEM rather than FEM, Traceon offers notable improvements in speed and accuracy compared to most commercial alternatives. It supports both radially symmetric and fully 3D geometries, while leveraging advanced axial field interpolations to greatly speed up the particle tracing.
### Wait, is this commercial?
The core of Traceon is completely free to use and open source, and distributed under the `MPL 2.0` license. The software downloaded when using `pip install traceon` does not include any closed source software. There is a commercial package called `traceon_pro` which builds on the `traceon` package to provide a more capable library.
| Feature | Traceon | Traceon Pro |
| --- | :---: | :---: |
| Parametric mesher | ✅ | ✅|
| Plot module | ✅ | ✅ |
| Radial symmetric solver (electrostatic, magnetostatic) | ✅ | ✅ |
| Radial symmetric particle tracer | ✅ | ✅ |
| Radial symmetric axial interpolation (fast tracing) | ✅ | ✅|
| 3D direct solver (electrostatic, magnetostatic) | | ✅|
| 3D solver using fast multipole method | | ✅|
| 3D particle tracing | | ✅|
| 3D axial interpolation (fast tracing) | | ✅|
| Coulomb interaction | | ✅|
## Documentation
[Website](https://traceon.org/)
[Examples](https://github.com/leon-vv/Traceon/tree/main/examples)
[API documentation v0.10.0](https://traceon.org/docs/v0.10.0/traceon/index.html)
[API documentation v0.9.0](https://traceon.org/docs/v0.9.0/traceon/index.html)
## Installation
Install using the Python package manager:
```
pip install traceon
```
The installation is known to work on Linux, Windows and Mac OS. Please reach out to me if you have any installation problems.
## Validations
To ensure the accuracy of the package, different problems from the literature have been analyzed using this software. See [/validation](https://github.com/leon-vv/Traceon/tree/main/validation) directory for more information. The validations can easily be executed from the command line, for example:
```bash
python3 ./validation/edwards2007.py --help
python3 ./validation/capacitance-sphere.py --help
etc...
```
## License
[MPL 2.0](https://mozilla.org/MPL/2.0/)
## Help! I have a problem!
Don't worry. You can reach me.
[Open an issue](https://github.com/leon-vv/Traceon/issues)
[Send me an email](mailto:leonvanvelzen@protonmail.com)
## Gallery



## Release notes
### v0.10.0
- Make Field a GeometricObject (which can be moved, rotated, etc)
- Introduce FieldSuperposition class to represent summation of arbitrary fields
- Add type hints throughout codebase
- Add initial support for couloumb interactions while tracing (pro only)
**Breaking changes**
- `Tracer.__call__` now takes velocities with unit m/s instead of eV
### v0.9.0
- Add permanent magnets
- Small improvements to geometry module (add annulus methods)
- More general rotations for GeometricObject
- Various bug fixes and improvements
**Breaking changes**
- `FieldRadialAxial` was moved from `solver.py` to `field.py`
### v0.8.0
- New plotting module (charge density, equipotential lines)
- Automatic orientation of normal vectors
- Geometry functions for extruding/revolving edges of surfaces
- Tracing of particles other than electrons (charge, mass as input)
- Various bug fixes and improvements
**Breaking changes**:
- Call `P.show()` after `P.plot_mesh()` to show figures
- Normal vectors should be oriented automatically (please check if this works correctly for your geometry)
<br />
### v0.7.0
- Generate structured, high quality meshes using the new parametric mesher (drop GMSH)
- Consistenly use 3D points and geometries throughout codebase
- Add support for Fast Multipole Method (Traceon Pro)
- Add support for Mac OS on x64
- Big improvements to code quality, testing, infrastructure
- Drop dependency on GSL
### v0.6.0:
- New methods to integrate triangle potential and field contribution over a triangle
- Fix 3D convergence issues by more accurately calculating neighbouring triangle interactions
- Fix error calculation in particle tracing
- Introduce logging module to control verbosity of printing
- Clean up unit tests
- Remove higher order (curved) triangle support, in preparation of parametric meshers and improved FFM implementation
### v0.5.0:
- Add preliminary support for magnetostatics
- Improve and generalize mesh class (allow import/export)
- Make consistent use of SI units
### v0.4.0:
- Introduce Fast Multipole Method (FMM) for large 3D problems
- Compute 3D radial expansion coefficients using analytical formulas
- Further speed up computation of 3D radial expansion coefficients
- Big code quality improvement of validation/ files
### v0.3.0:
- Use adaptive integration using GNU Scientific Library (GSL)
- Add support for boundary constraint
- Use [Vedo](https://vedo.embl.es/) for better plotting capabilities
- Use higher order triangle elements for 3D (curved triangles)
- Precompute jacobians/positions for better performance
- First implementation of element splitting based on charges (work in progress)
### v0.2.0:
- Use higher order charge distribution on line elements in radial symmetry
- Use higher order line elements (polynomials) in radial symmetry
- Better integration techniques, especially with regards to the logarithmic singularities
### v0.1.0:
- Uses the powerful [GMSH library](https://gmsh.info/) for meshing
- Solve for surface charge distribution using BEM
- General 3D geometries and radially symmetric geometries
- Dielectrics
- Floating conductors
- Accurate electron tracing using adaptive time steps
- Field/potential calculation by integration over surface charges
- Fast field/potential calculation by radial series expansion
- Superposition of electrostatic fields
Raw data
{
"_id": null,
"home_page": "https://github.com/leon-vv/Traceon",
"name": "traceon",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "boundary element method, BEM, electrostatic, electromagnetic, electron microscope, electron, tracing, particle, tracer, electron optics",
"author": "L\u00e9on van Velzen",
"author_email": "leonvanvelzen@protonmail.com",
"download_url": "https://files.pythonhosted.org/packages/ca/fa/8baba09943ad0bb08a575b29b90e09038d1053bc55d327a6a8b59084eb08/traceon-0.10.0.tar.gz",
"platform": null,
"description": "# Traceon\nTraceon is a Python library designed for the modeling of electron microscopes.\n\nTraceon features a Boundary Element Method (BEM) solver that computes electrostatic and magnetostatic fields for accurate particle tracing. By relying on the BEM rather than FEM, Traceon offers notable improvements in speed and accuracy compared to most commercial alternatives. It supports both radially symmetric and fully 3D geometries, while leveraging advanced axial field interpolations to greatly speed up the particle tracing.\n\n### Wait, is this commercial?\n\nThe core of Traceon is completely free to use and open source, and distributed under the `MPL 2.0` license. The software downloaded when using `pip install traceon` does not include any closed source software. There is a commercial package called `traceon_pro` which builds on the `traceon` package to provide a more capable library.\n\n| Feature | Traceon | Traceon Pro |\n| --- | :---: | :---: |\n| Parametric mesher | \u2705 | \u2705| \n| Plot module | \u2705 | \u2705 |\n| Radial symmetric solver (electrostatic, magnetostatic) | \u2705 | \u2705 |\n| Radial symmetric particle tracer | \u2705 | \u2705 |\n| Radial symmetric axial interpolation (fast tracing) | \u2705 | \u2705|\n| 3D direct solver (electrostatic, magnetostatic) | | \u2705|\n| 3D solver using fast multipole method | | \u2705|\n| 3D particle tracing | | \u2705|\n| 3D axial interpolation (fast tracing) | | \u2705|\n| Coulomb interaction | | \u2705|\n\n\n\n## Documentation\n\n[Website](https://traceon.org/)\n\n[Examples](https://github.com/leon-vv/Traceon/tree/main/examples)\n\n[API documentation v0.10.0](https://traceon.org/docs/v0.10.0/traceon/index.html)\n\n[API documentation v0.9.0](https://traceon.org/docs/v0.9.0/traceon/index.html)\n\n## Installation\n\nInstall using the Python package manager:\n```\npip install traceon\n```\n\nThe installation is known to work on Linux, Windows and Mac OS. Please reach out to me if you have any installation problems.\n\n## Validations\n\nTo ensure the accuracy of the package, different problems from the literature have been analyzed using this software. See [/validation](https://github.com/leon-vv/Traceon/tree/main/validation) directory for more information. The validations can easily be executed from the command line, for example:\n```bash\npython3 ./validation/edwards2007.py --help\npython3 ./validation/capacitance-sphere.py --help\netc...\n```\n\n## License\n\n[MPL 2.0](https://mozilla.org/MPL/2.0/)\n\n\n## Help! I have a problem!\n\nDon't worry. You can reach me.\n\n[Open an issue](https://github.com/leon-vv/Traceon/issues)\n\n[Send me an email](mailto:leonvanvelzen@protonmail.com)\n\n## Gallery\n\n\n\n\n\n## Release notes\n\n### v0.10.0\n- Make Field a GeometricObject (which can be moved, rotated, etc)\n- Introduce FieldSuperposition class to represent summation of arbitrary fields\n- Add type hints throughout codebase\n- Add initial support for couloumb interactions while tracing (pro only)\n\n**Breaking changes**\n- `Tracer.__call__` now takes velocities with unit m/s instead of eV\n\n### v0.9.0\n- Add permanent magnets\n- Small improvements to geometry module (add annulus methods)\n- More general rotations for GeometricObject\n- Various bug fixes and improvements\n\n**Breaking changes**\n- `FieldRadialAxial` was moved from `solver.py` to `field.py`\n\n### v0.8.0\n- New plotting module (charge density, equipotential lines)\n- Automatic orientation of normal vectors\n- Geometry functions for extruding/revolving edges of surfaces\n- Tracing of particles other than electrons (charge, mass as input)\n- Various bug fixes and improvements\n\n**Breaking changes**:\n- Call `P.show()` after `P.plot_mesh()` to show figures\n- Normal vectors should be oriented automatically (please check if this works correctly for your geometry)\n<br />\n\n### v0.7.0\n- Generate structured, high quality meshes using the new parametric mesher (drop GMSH)\n- Consistenly use 3D points and geometries throughout codebase\n- Add support for Fast Multipole Method (Traceon Pro)\n- Add support for Mac OS on x64\n- Big improvements to code quality, testing, infrastructure\n- Drop dependency on GSL\n\n### v0.6.0:\n- New methods to integrate triangle potential and field contribution over a triangle\n- Fix 3D convergence issues by more accurately calculating neighbouring triangle interactions\n- Fix error calculation in particle tracing\n- Introduce logging module to control verbosity of printing\n- Clean up unit tests\n- Remove higher order (curved) triangle support, in preparation of parametric meshers and improved FFM implementation\n\n### v0.5.0:\n- Add preliminary support for magnetostatics\n- Improve and generalize mesh class (allow import/export)\n- Make consistent use of SI units\n\n### v0.4.0:\n- Introduce Fast Multipole Method (FMM) for large 3D problems\n- Compute 3D radial expansion coefficients using analytical formulas\n- Further speed up computation of 3D radial expansion coefficients \n- Big code quality improvement of validation/ files\n\n### v0.3.0:\n- Use adaptive integration using GNU Scientific Library (GSL)\n- Add support for boundary constraint\n- Use [Vedo](https://vedo.embl.es/) for better plotting capabilities\n- Use higher order triangle elements for 3D (curved triangles)\n- Precompute jacobians/positions for better performance\n- First implementation of element splitting based on charges (work in progress)\n\n### v0.2.0:\n- Use higher order charge distribution on line elements in radial symmetry\n- Use higher order line elements (polynomials) in radial symmetry\n- Better integration techniques, especially with regards to the logarithmic singularities\n\n### v0.1.0:\n- Uses the powerful [GMSH library](https://gmsh.info/) for meshing\n- Solve for surface charge distribution using BEM\n- General 3D geometries and radially symmetric geometries\n- Dielectrics\n- Floating conductors\n- Accurate electron tracing using adaptive time steps\n- Field/potential calculation by integration over surface charges\n- Fast field/potential calculation by radial series expansion\n- Superposition of electrostatic fields\n\n\n",
"bugtrack_url": null,
"license": "MPL 2.0",
"summary": "Solver and tracer for electrostatic problems",
"version": "0.10.0",
"project_urls": {
"Code": "https://github.com/leon-vv/traceon",
"Documentation": "https://leon.science/traceon",
"Homepage": "https://github.com/leon-vv/Traceon",
"Issues": "https://github.com/leon-vv/traceon/issues"
},
"split_keywords": [
"boundary element method",
" bem",
" electrostatic",
" electromagnetic",
" electron microscope",
" electron",
" tracing",
" particle",
" tracer",
" electron optics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "162083ee11f78b2b4b9e235ae816f0693f2c200157cc47f3506fbdba3554ae15",
"md5": "aed28152b4ebc2ea13bb30f9f9ac5afa",
"sha256": "e2db4059a3f738668ab17dc7da7452d9af855ef86cf67ae492aacf965b62652e"
},
"downloads": -1,
"filename": "traceon-0.10.0-cp37-abi3-macosx_13_0_x86_64.whl",
"has_sig": false,
"md5_digest": "aed28152b4ebc2ea13bb30f9f9ac5afa",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 130107,
"upload_time": "2025-02-10T20:50:53",
"upload_time_iso_8601": "2025-02-10T20:50:53.255097Z",
"url": "https://files.pythonhosted.org/packages/16/20/83ee11f78b2b4b9e235ae816f0693f2c200157cc47f3506fbdba3554ae15/traceon-0.10.0-cp37-abi3-macosx_13_0_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8e09066c9b867949d91cbf17733bc21a344cb646be0af7bed11cc2039d96d5de",
"md5": "1b045106412ca996e26853b6795b789f",
"sha256": "12c3165a565961e7f8176649ae4ca5d87f689a71df748ae367372b1de52425ca"
},
"downloads": -1,
"filename": "traceon-0.10.0-cp37-abi3-manylinux_2_31_x86_64.whl",
"has_sig": false,
"md5_digest": "1b045106412ca996e26853b6795b789f",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 165639,
"upload_time": "2025-02-10T20:50:54",
"upload_time_iso_8601": "2025-02-10T20:50:54.397255Z",
"url": "https://files.pythonhosted.org/packages/8e/09/066c9b867949d91cbf17733bc21a344cb646be0af7bed11cc2039d96d5de/traceon-0.10.0-cp37-abi3-manylinux_2_31_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a6ca40c6e939aefd06d6141647e484a32e2918ecc8cf3cbfffc080d24ff9142c",
"md5": "a0e0ed2a177456f29408f97527ba93bd",
"sha256": "68427d89ec69f4c21ba509b99be7fd374abec66c9ec396ce3aac7d93af25a5ff"
},
"downloads": -1,
"filename": "traceon-0.10.0-cp37-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "a0e0ed2a177456f29408f97527ba93bd",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.7",
"size": 180253,
"upload_time": "2025-02-10T20:50:55",
"upload_time_iso_8601": "2025-02-10T20:50:55.521401Z",
"url": "https://files.pythonhosted.org/packages/a6/ca/40c6e939aefd06d6141647e484a32e2918ecc8cf3cbfffc080d24ff9142c/traceon-0.10.0-cp37-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cafa8baba09943ad0bb08a575b29b90e09038d1053bc55d327a6a8b59084eb08",
"md5": "9f973e2328076f2daee3ccaacd982568",
"sha256": "440ef2ebc020791805a6a1f164a41ea1fa3d3655ab459f16f15d24af62a09104"
},
"downloads": -1,
"filename": "traceon-0.10.0.tar.gz",
"has_sig": false,
"md5_digest": "9f973e2328076f2daee3ccaacd982568",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 95500,
"upload_time": "2025-02-10T20:50:56",
"upload_time_iso_8601": "2025-02-10T20:50:56.654192Z",
"url": "https://files.pythonhosted.org/packages/ca/fa/8baba09943ad0bb08a575b29b90e09038d1053bc55d327a6a8b59084eb08/traceon-0.10.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-10 20:50:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "leon-vv",
"github_project": "Traceon",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "traceon"
}