A Python tool for thermo-mechanical property analysis of transient grating spectroscopy (TGS) signals. Input is a raw TGS signal and output is thermal diffusivity, surface acoustic wave speed, and other fitting constants of the characteristic TGS equation.
-
Clone the repository:
git clone https://github.com/shortlab/PyTGS.git cd PyTGS
-
Run the automated setup script:
On Unix/MacOS:
chmod +x setup.sh ./setup.sh
On Windows:
bash setup.sh
Note: On Windows, you'll need Git Bash or a similar bash shell. If you don't have one use the manual installation below.
Manual Installation (Windows/Unix/MacOS):
python -m venv PyTGS-venv # On Windows: PyTGS-venv\Scripts\activate # On Unix/MacOS: source PyTGS-venv/bin/activate pip install --upgrade pip pip install -e . # or pip install -r requirements.txt
-
Activate the virtual environment:
On Unix/MacOS:
source PyTGS-venv/bin/activate
On Windows:
PyTGS-venv\Scripts\activate
-
Edit
config.yaml
with your data path and desired fitting parameters. -
Run the analysis:
python main.py
Fitting results and figures will be saved in
fit/
andfigures/
directories, respectively. You can view example input/output files in theexample/
directory.
The package includes tests that validate correctness of the analysis pipeline using synthetic TGS signals.
To run the tests, use the following command:
pytest tests/test.py -v