A Python implementation for visualising magnetic field patterns of tetracoil configurations using VectorFieldPlot, designed for electromagnetic field analysis and research applications.
The script produces high-quality magnetic field visualisations showing the characteristic field line patterns of the tetracoil system:
Figure: Magnetic field lines generated by the tetracoil configuration, showing the uniform central field region and characteristic field line topology.
This repository contains code to generate magnetic field visualisations for tetracoil systems based on the four-coil exposure system described in Gottardi et al. (2003). The tetracoil configuration is designed to produce highly uniform magnetic fields, making it valuable for bioelectromagnetic research and electromagnetic field studies.
The implementation uses the VectorFieldPlot library to compute accurate field line representations and generate publication-quality visualisations suitable for scientific documentation and research presentations.
- High-Quality Visualisation: Generates publication-ready SVG magnetic field plots with customisable styling
- Scientifically Accurate: Implements tetracoil configuration based on peer-reviewed research parameters
- Uniform Field Generation: Optimised for creating uniform magnetic field regions suitable for experimental applications
- Precise Positioning: Coil positioning based on validated research parameters from Gottardi et al. (2003)
- Customisable Output: Adjustable field line density, arrow styling, and visualisation parameters
- Clone the repository:
git clone https://github.com/AdzCoder/tetracoil-field-visualisation.git
cd tetracoil-field-visualisation
- Install required dependencies:
pip install -r requirements.txt
Run the visualisation script:
python src/tetracoil_field.py
The generated SVG file will be saved to the directory.
Modify the parameters in tetracoil_field.py
to adjust:
- Field line density
- Visualisation region
- Coil positioning
- Arrow styling
- Output resolution
- Python: 3.6 or higher
- VectorFieldPlot: For field line computation and visualisation
- NumPy: For numerical computations
- SciPy: For scientific computing functions
Install all dependencies with:
pip install vectorfieldplot numpy scipy
This project uses dual licensing to accommodate both open-source development and academic use:
- Source Code (
tetracoil_field.py
): GNU General Public License v3.0 - Generated Visualisations (
VFPt_tetracoil.svg
): Creative Commons Attribution 4.0
If you use this code in your research, please cite:
@software{bhatti2025tetracoil,
author = {Bhatti, Adil Wahab},
title = {Tetracoil Magnetic Field Visualisation},
year = {2025},
url = {https://github.com/AdzCoder/tetracoil-field-visualisation},
version = {1.0.0}
}
- Gottardi, G., Mesirca, P., Agostini, C., Remondini, D., & Bersani, F. (2003). A four coil exposure system (tetracoil) producing a highly uniform magnetic field. Bioelectromagnetics, 24(2), 125-133. DOI: 10.1002/bem.10074
- VectorFieldPlot by Geek3: Wikimedia Commons
Contributions are welcome! Please feel free to submit a Pull Request for:
- 🐛 Bug fixes and improvements
- ✨ New features and enhancements
- 📚 Documentation improvements
- 🧪 Additional test cases and validation
- 🎨 Visualisation enhancements
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Author: Adil Wahab Bhatti
- GitHub: @AdzCoder
- Institution: University of Warwick
- University of Warwick for research support
- Gottardi et al. for the original tetracoil research
- The VectorFieldPlot library developers for the visualisation framework
- The scientific computing community for the underlying numerical libraries
This project is part of ongoing research in electromagnetic field analysis at the University of Warwick.