This workspace contains two small Python utilities:
Imagel.py: thermal model of a spherical microparticle under beam heating with radiative cooling.Retrieval.py: extract frames from a video and save cropped images.
Install dependencies (preferably in a virtual environment):
numpy
scipy
matplotlib
opencv-python
You can also install from requirements.txt.
Imagel (defaults match the original script):
python Imagel.py --t-end 0.005 --t-steps 500 --output heat_20241127.jpg --xlim 0.0005Retrieval (defaults match the original script):
python Retrieval.py --video 300kV_50nA.mp4 --outdir data_300kV_50nA --x 564 --y 200 --w 638 --h 578Optional flags for Retrieval:
--start: start frame index (default 0)--max-frames: limit number of frames to write (-1 for all)
- ROI in
Retrieval.pyis clipped to the frame bounds to avoid errors. Imagel.pyimplements a forward-Euler integrator; adjust parameters as needed.