Welcome to fasttomo, a Python package designed to address the critical task of identifying copper agglomerates in lithium-ion batteries during thermal runaway. Developed as part of my Master's thesis at ESRF (European Synchrotron Radiation Facility) from October 2023 to March 2024, fasttomo offers a powerful set of tools for analyzing and visualizing 4-dimensional CT data in
Key Features:
- Load and process 4-dimensional CT data stored as
NumPyarrays (.npyfiles). - Perform consistent segmentation of copper agglomerates over time.
- Visualize data interactively, with the option to overlay segmentation masks.
- Extract and plot various agglomerate features, such as volume, speed, and density.
- Generate
.stlmesh representations of the segmentation masks. - Seamlessly import
.stlmeshes into Blender for detailed rendering. - Create dynamic movies by sequencing still images.
fasttomo is a valuable tool for researchers, scientists, and engineers working on battery technology, providing insights into the behavior and characteristics of copper agglomerates in lithium-ion batteries under thermal stress.
For detailed instructions on installing, configuring, and using the package, please refer to the comprehensive documentation.
To install fasttomo, follow these steps:
-
First, clone the repository to your local machine:
git clone https://github.com/venturellimatteo/fasttomo.git
-
Navigate to the project directory:
cd fasttomo -
Create a conda virtual environment:
conda create -n venv
-
Activate the virtual environment:
conda activate venv
-
Install
Python 3.8.17:conda install python==3.8.17
-
Install
requirements.txtdependencies:pip install -r requirements.txt
Note
Blender 3.6.4 installation is required for the usage of selected functions to render segmentation results.
To use fasttomo, open the python notebook file notebook.ipynb, specify the name of the experiment to process in the exp variable, optionally specify the path and initiate an instance of the Data class. From there, run any of the desired functions to segment or visualize the data.
This example shows the code to process experiment P28A_FT_H_Exp4_2:
Dataclass instance is initialized;- Tomography data is segmented;
- Agglomerates features are extracted and saved as a
csvfile; - Agglomerate data is processed and plotted;
- Segmentation mask is converted into
stlmeshes; - Volumes are rendered as
pngfiles usingBlender; pngframes are sequenced into a movie.
import fasttomo
data = fasttomo.Data("P28A_FT_H_Exp4_2")
data.segment()
data.create_dataframe()
data.plots()
data.create_stls()
data.render()
data.create_render_movie()For detailed documentation, including API references and usage guides, please visit the project documentation.
If you encounter any issues, have questions, or would like to suggest improvements to the documentation, please open an issue on GitHub.
This project is licensed under the MIT License - see the LICENSE.md file for details.
The MIT License is a permissive open-source license that allows you to use, modify, and distribute the code in both open-source and proprietary projects. For more details, please refer to the MIT License.
I would like to thank Matilda Fransson and Ludovic Broche for their invaluable guidance and support. I was fortunate to have Matilda not just as a supervisor but as a friend, with whom I shared countless laughs and precious moments. I am equally grateful to Ludo for his willingness to help and answer any question, as well as the joy his ever-present smile brought to our work.
If you have any questions, feedback, or suggestions, feel free to reach out:
You can also open an issue on GitHub or participate in discussions on my project's GitHub repository.
Feel free to connect with me on LinkedIn for more updates and collaboration opportunities.
