Skip to main content

PyGamLab

PyGamLab is a scientific Python library developed for researchers, engineers, and students who need access to fundamental constants, conversion tools, engineering formulas, and data analysis utilities. The package is designed with simplicity, clarity, and usability in mind.


📌 Overview

PyGAMLab stands for Python GAMLAb tools, a collection of scientific tools and functions developed at the GAMLab by Ali Pilehvar Meibody under the supervision of Prof. Malek Naderi at Gamlab (Graphene and Advanced Material Laboratory) under supervision of Amirkabir University of Technology (AUT).

  • Author: Ali Pilehvar Meibody
  • Supervisor: Prof. Naderi
  • Affiliation: GAMLab, Amirkabir University of Technology (AUT)

📦 Modules

PyGAMLab is composed of four core modules, each focused on a specific area of scientific computation:

🔹 Constants.py

This module includes a comprehensive set of scientific constants used in physics, chemistry, and engineering.

Examples:

  • Planck's constant
  • Boltzmann constant
  • Speed of light
  • Universal gas constant
  • Density of Metals
  • Tm of Metals
  • And many more...

🔹 Convertors.py

Contains unit conversion functions that follow the format:
FirstUnit_To_SecondUnit()

Examples:

  • Kelvin_To_Celsius(k)
  • Celsius_To_Kelvin(c)
  • Meter_To_Foot(m)
  • ...and many more standard conversions used in science and engineering.

🔹 Functions.py

This module provides a wide collection of scientific formulas and functional tools commonly used in engineering applications.

Examples:

  • Thermodynamics equations
  • Mechanical stress and strain calculations
  • Fluid dynamics formulas
  • General utility functions

🔹 Data_Analysis.py

Provides tools for working with data, either from a file path or directly from a DataFrame.

Features include:

  • Reading and preprocessing datasets
  • Performing scientific calculations
  • Creating visualizations (e.g., line plots, scatter plots, histograms)

📦 Requirements

To use PyGamLab, make sure you have the following Python packages installed:

  • numpy
  • pandas
  • scipy
  • matplotlib
  • seaborn
  • scikit-learn

You can install all dependencies using:

pip install numpy pandas scipy matplotlib seaborn scikit-learn

🚀 Installation

To install PyGAMLab via pip (after uploading it to PyPI):

pip install pygamlab

or

git clone https://github.com/APMaii/pygamlab.git

📖 Usage Example

import PyGamLab

#--------------Constants-----------------------

print(PyGamLab.Constants.melting_point_of_Cu)
print(PyGamLab.Constants.melting_point_of_Al)
print(PyGamLab.Constants.Fe_Tm_Alpha)
print(PyGamLab.Constants.Fe_Tm_Gama)

print(PyGamLab.Constants.Boltzmann_Constant)
print(PyGamLab.Constants.Faraday_Constant)

#----------------Convertors---------------------

print(PyGamLab.Convertos.Kelvin_to_Celcius(300))
print(PyGamLab.Convertos.Coulomb_To_Electron_volt())
print(PyGamLab.Convertos.Angstrom_To_Milimeter())
print(PyGamLab.Convertos.Bar_To_Pascal())

#------------Functions-----------------------

PyGamLab.Functions.Gibs_free_energy(H0,T,S0)


PyGamLab.Functions.Bragg_Law(h, k, l, a, y)


PyGamLab.Functions.Electrical_Resistance(v,i)


PyGamLab.Functions.Hall_Petch(d_grain,sigma0,k)

#-----------Data_Analysis--------------------
import pandas as pd

df= pd.read_csv('/users/apm/....../data.csv')
PyGamLab.Data_Analysis.Stress_Strain1(df, 'PLOT')
my_uts=PyGamLab.Data_Analysis.Stress_Strain1(df, 'UTS')


data=pd.read_csv('/users/apm/....../data.csv')
my_max=PyGamLab.Data_Analysis.Xrd_Analysis(data,'max intensity')
PyGamLab.Data_Analysis.Xrd_Analysis(data,'scatter plot')
PyGamLab.Data_Analysis.Xrd_Analysis(data,'line graph')

Structure

pygamlab/
├── __init__.py
├── Constants.py
├── Convertors.py
├── Functions.py
├── Data_Analysis.py
└── contributers.md



🤝 Contributing

Contributions are welcome! Here's how to get started:

Fork the repository. Create your feature branch

git checkout -b feature/my-feature

Commit your changes

git commit -am 'Add some feature'

Push to the branch

git push origin feature/my-feature

Create a new Pull Request. Please make sure to update tests as appropriate and follow PEP8 guidelines.


📄 License

This project is licensed under the MIT License — see the LICENSE.txt file for details


🙏 Acknowledgements

This project is part of the scientific research activities at GAMLab (Generalized Applied Mechanics Laboratory) at Amirkabir University of Technology (AUT).

Special thanks to:

  • Prof. Nader – For his guidance, mentorship, and continuous support.
  • Ali Pilehvar Meibody – Main developer and author of PyGamLab.
  • GAMLab Research Group – For providing a collaborative and innovative environment.

We would also like to thank all the students who participated in the GAMLab AI course and contributed to the growth and feedback of this project. Their names are proudly listed in the contributors.md file.

This project was made possible thanks to the powerful Python open-source ecosystem:
NumPy, SciPy, Pandas, Matplotlib, Seaborn, Scikit-learn, and many more.


Metadata

Release files for pygamlab 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygamlab 0.1.1
File Size Uploaded Provenance Actions
pygamlab-0.1.1.tar.gz 79.9 kB Without provenance Details for pygamlab-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pygamlab 0.1.1
File Interpreter ABI Platform Actions
pygamlab-0.1.1-py3-none-any.whl Python 3 none any Details for pygamlab-0.1.1-py3-none-any.whl

Total release size: 159.0 kB

Release files / pygamlab-0.1.1.tar.gz

Download URL pygamlab-0.1.1.tar.gz
Size 79.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b2af07250c1e2a1f389046c5953a2a1fd70172f72a6cd49f8c4552b43daeabbc
BLAKE2b-256 checksum
How to use checksums
f07978cd4faa550c5f85e0a1b40ccf73e7c7354b8e691a66139059cf6a165cee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / pygamlab-0.1.1-py3-none-any.whl

Download URL pygamlab-0.1.1-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d78d4725369b4c3f47cad9e81308639f0650da00c03283b4e4ed7b80e65587d7
BLAKE2b-256 checksum
How to use checksums
7dda7ea116641c85b3ff6c275b7fbf4706db854a89b2b96d7a608ff376fd8392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Security for pygamlab 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page