This directory contains practical examples demonstrating how to use pyngb for various thermal analysis tasks.
- basic_parsing.py: Simple file parsing and data extraction
- baseline_subtraction_demo.py: Baseline correction examples
- batch_processing.py: Processing multiple files efficiently
- cli_baseline_examples.sh: Command-line baseline subtraction
- (Bring your own) Jupyter notebook to try code snippets from docs
- See docs User Guide sections for analysis patterns
# Install pyngb
pip install pyngb
# Optional tools for plotting/notebooks
pip install matplotlib pandas jupyter seabornSome examples use sample NGB files. You can:
- Use your own NGB files: Replace file paths in examples
- Download sample files: Check the test_files directory
- Generate mock data: Some examples create synthetic data
# Basic parsing example
python examples/basic_parsing.py
# Batch processing example
python examples/batch_processing.py --input-dir ./data/ --output-dir ./results/
# Interactive notebook
jupyter notebook examples/jupyter_notebook.ipynbPerfect for new users learning pyngb basics.
Examples showing how to analyze thermal data effectively.
Complex scenarios and customization examples.
Examples suitable for production environments and automation.
Have a useful example? We'd love to include it!
- Create a new Python file with a descriptive name
- Include comprehensive comments and docstrings
- Add error handling and user-friendly output
- Update this README with your example
- Submit a pull request
"""
Example: [Brief Description]
Description:
[Detailed description of what this example demonstrates]
Requirements:
- pyngb
- [other dependencies]
Usage:
python example_name.py [arguments]
Author: [Your Name]
"""
import pyngb
# ... rest of example- Read the Comments: Each example includes detailed explanations
- Modify Paths: Update file paths to match your data location
- Check Requirements: Some examples need additional packages
- Handle Errors: Examples include error handling patterns you can reuse
- Experiment: Try modifying examples to fit your specific needs
- Documentation: Full documentation
- Issues: Report problems
- Discussions: Ask questions