PyGamLab 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygamlab-0.1.1/PKG-INFO +261 -0
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab/Constants.py +0 -3
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab/Data_Analysis.py +45 -43
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab/__init__.py +8 -0
- pygamlab-0.1.1/PyGamLab.egg-info/PKG-INFO +261 -0
- pygamlab-0.1.1/README.md +236 -0
- {pygamlab-0.1.0 → pygamlab-0.1.1}/pyproject.toml +1 -1
- {pygamlab-0.1.0 → pygamlab-0.1.1}/setup.py +1 -1
- pygamlab-0.1.0/PKG-INFO +0 -122
- pygamlab-0.1.0/PyGamLab.egg-info/PKG-INFO +0 -122
- pygamlab-0.1.0/README.md +0 -97
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab/Convertos.py +0 -0
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab/Functions.py +0 -0
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab.egg-info/SOURCES.txt +0 -0
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab.egg-info/dependency_links.txt +0 -0
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab.egg-info/requires.txt +0 -0
- {pygamlab-0.1.0 → pygamlab-0.1.1}/PyGamLab.egg-info/top_level.txt +0 -0
- {pygamlab-0.1.0 → pygamlab-0.1.1}/setup.cfg +0 -0
pygamlab-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: PyGamLab
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: A scientific Python library with constants, unit convertors, formulas, and data analysis tools.
|
|
5
|
+
Home-page: https://github.com/APMaii/pygamlab/tree/main
|
|
6
|
+
Author: Ali Pilehvar Meibody
|
|
7
|
+
Author-email: Ali Pilehvar Meibody <ai.2024.pilehvar@Gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Project-URL: Source, https://github.com/APMaii/pygamlab/tree/main
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering
|
|
14
|
+
Requires-Python: >=3.7
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: pandas
|
|
18
|
+
Requires-Dist: scipy
|
|
19
|
+
Requires-Dist: matplotlib
|
|
20
|
+
Requires-Dist: seaborn
|
|
21
|
+
Requires-Dist: scikit-learn
|
|
22
|
+
Dynamic: author
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: requires-python
|
|
25
|
+
|
|
26
|
+
# PyGamLab
|
|
27
|
+
|
|
28
|
+
**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.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 📌 Overview
|
|
33
|
+
|
|
34
|
+
**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)**.
|
|
35
|
+
|
|
36
|
+
- **Author:** Ali Pilehvar Meibody
|
|
37
|
+
- **Supervisor:** Prof. Naderi
|
|
38
|
+
- **Affiliation:** GAMLab, Amirkabir University of Technology (AUT)
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 📦 Modules
|
|
43
|
+
|
|
44
|
+
PyGAMLab is composed of **four core modules**, each focused on a specific area of scientific computation:
|
|
45
|
+
|
|
46
|
+
### 🔹 ` Constants.py`
|
|
47
|
+
This module includes a comprehensive set of scientific constants used in physics, chemistry, and engineering.
|
|
48
|
+
|
|
49
|
+
Examples:
|
|
50
|
+
- Planck's constant
|
|
51
|
+
- Boltzmann constant
|
|
52
|
+
- Speed of light
|
|
53
|
+
- Universal gas constant
|
|
54
|
+
- Density of Metals
|
|
55
|
+
- Tm of Metals
|
|
56
|
+
- And many more...
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### 🔹 `Convertors.py`
|
|
61
|
+
Contains unit conversion functions that follow the format:
|
|
62
|
+
`FirstUnit_To_SecondUnit()`
|
|
63
|
+
|
|
64
|
+
Examples:
|
|
65
|
+
- `Kelvin_To_Celsius(k)`
|
|
66
|
+
- `Celsius_To_Kelvin(c)`
|
|
67
|
+
- `Meter_To_Foot(m)`
|
|
68
|
+
- ...and many more standard conversions used in science and engineering.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### 🔹 `Functions.py`
|
|
73
|
+
This module provides a wide collection of **scientific formulas and functional tools** commonly used in engineering applications.
|
|
74
|
+
|
|
75
|
+
Examples:
|
|
76
|
+
- Thermodynamics equations
|
|
77
|
+
- Mechanical stress and strain calculations
|
|
78
|
+
- Fluid dynamics formulas
|
|
79
|
+
- General utility functions
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### 🔹 `Data_Analysis.py`
|
|
84
|
+
Provides tools for working with data, either from a **file path** or directly from a **DataFrame**.
|
|
85
|
+
|
|
86
|
+
Features include:
|
|
87
|
+
- Reading and preprocessing datasets
|
|
88
|
+
- Performing scientific calculations
|
|
89
|
+
- Creating visualizations (e.g., line plots, scatter plots, histograms)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 📦 Requirements
|
|
96
|
+
|
|
97
|
+
To use **PyGamLab**, make sure you have the following Python packages installed:
|
|
98
|
+
|
|
99
|
+
- `numpy`
|
|
100
|
+
- `pandas`
|
|
101
|
+
- `scipy`
|
|
102
|
+
- `matplotlib`
|
|
103
|
+
- `seaborn`
|
|
104
|
+
- `scikit-learn`
|
|
105
|
+
|
|
106
|
+
You can install all dependencies using:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pip install numpy pandas scipy matplotlib seaborn scikit-learn
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 🚀 Installation
|
|
117
|
+
|
|
118
|
+
To install PyGAMLab via pip (after uploading it to PyPI):
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pip install pygamlab
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
or
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
git clone https://github.com/APMaii/pygamlab.git
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 📖 Usage Example
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
import PyGamLab
|
|
136
|
+
|
|
137
|
+
#--------------Constants-----------------------
|
|
138
|
+
|
|
139
|
+
print(PyGamLab.Constants.melting_point_of_Cu)
|
|
140
|
+
print(PyGamLab.Constants.melting_point_of_Al)
|
|
141
|
+
print(PyGamLab.Constants.Fe_Tm_Alpha)
|
|
142
|
+
print(PyGamLab.Constants.Fe_Tm_Gama)
|
|
143
|
+
|
|
144
|
+
print(PyGamLab.Constants.Boltzmann_Constant)
|
|
145
|
+
print(PyGamLab.Constants.Faraday_Constant)
|
|
146
|
+
|
|
147
|
+
#----------------Convertors---------------------
|
|
148
|
+
|
|
149
|
+
print(PyGamLab.Convertos.Kelvin_to_Celcius(300))
|
|
150
|
+
print(PyGamLab.Convertos.Coulomb_To_Electron_volt())
|
|
151
|
+
print(PyGamLab.Convertos.Angstrom_To_Milimeter())
|
|
152
|
+
print(PyGamLab.Convertos.Bar_To_Pascal())
|
|
153
|
+
|
|
154
|
+
#------------Functions-----------------------
|
|
155
|
+
|
|
156
|
+
PyGamLab.Functions.Gibs_free_energy(H0,T,S0)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
PyGamLab.Functions.Bragg_Law(h, k, l, a, y)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
PyGamLab.Functions.Electrical_Resistance(v,i)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
PyGamLab.Functions.Hall_Petch(d_grain,sigma0,k)
|
|
166
|
+
|
|
167
|
+
#-----------Data_Analysis--------------------
|
|
168
|
+
import pandas as pd
|
|
169
|
+
|
|
170
|
+
df= pd.read_csv('/users/apm/....../data.csv')
|
|
171
|
+
PyGamLab.Data_Analysis.Stress_Strain1(df, 'PLOT')
|
|
172
|
+
my_uts=PyGamLab.Data_Analysis.Stress_Strain1(df, 'UTS')
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
data=pd.read_csv('/users/apm/....../data.csv')
|
|
176
|
+
my_max=PyGamLab.Data_Analysis.Xrd_Analysis(data,'max intensity')
|
|
177
|
+
PyGamLab.Data_Analysis.Xrd_Analysis(data,'scatter plot')
|
|
178
|
+
PyGamLab.Data_Analysis.Xrd_Analysis(data,'line graph')
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Structure
|
|
186
|
+
```
|
|
187
|
+
pygamlab/
|
|
188
|
+
├── __init__.py
|
|
189
|
+
├── Constants.py
|
|
190
|
+
├── Convertors.py
|
|
191
|
+
├── Functions.py
|
|
192
|
+
├── Data_Analysis.py
|
|
193
|
+
└── contributers.md
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
## 🤝 Contributing
|
|
209
|
+
|
|
210
|
+
**Contributions** are welcome! Here's how to get started:
|
|
211
|
+
|
|
212
|
+
Fork the repository.
|
|
213
|
+
Create your feature branch
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
git checkout -b feature/my-feature
|
|
217
|
+
```
|
|
218
|
+
Commit your changes
|
|
219
|
+
```bash
|
|
220
|
+
git commit -am 'Add some feature'
|
|
221
|
+
```
|
|
222
|
+
Push to the branch
|
|
223
|
+
```bash
|
|
224
|
+
git push origin feature/my-feature
|
|
225
|
+
```
|
|
226
|
+
Create a new Pull Request.
|
|
227
|
+
Please make sure to update tests as appropriate and follow PEP8 guidelines.
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
## 📄 License
|
|
233
|
+
|
|
234
|
+
This project is licensed under the MIT License — see the LICENSE.txt file for details
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 🙏 Acknowledgements
|
|
241
|
+
|
|
242
|
+
This project is part of the scientific research activities at **GAMLab (Generalized Applied Mechanics Laboratory)** at **Amirkabir University of Technology (AUT)**.
|
|
243
|
+
|
|
244
|
+
Special thanks to:
|
|
245
|
+
|
|
246
|
+
- **Prof. Nader** – For his guidance, mentorship, and continuous support.
|
|
247
|
+
- **Ali Pilehvar Meibody** – Main developer and author of PyGamLab.
|
|
248
|
+
- **GAMLab Research Group** – For providing a collaborative and innovative environment.
|
|
249
|
+
|
|
250
|
+
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](contributors.md) file.
|
|
251
|
+
|
|
252
|
+
This project was made possible thanks to the powerful Python open-source ecosystem:
|
|
253
|
+
`NumPy`, `SciPy`, `Pandas`, `Matplotlib`, `Seaborn`, `Scikit-learn`, and many more.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
@@ -64,7 +64,6 @@ pi = 3.14159
|
|
|
64
64
|
e = 2.71828
|
|
65
65
|
g = 9.81 # Gravitational constant
|
|
66
66
|
h = 6.634 * 10**-34 # constant pelank
|
|
67
|
-
k , b = 1.38 * 10 ** -23 # J/mjck constant of boltzman
|
|
68
67
|
tau = 6.28
|
|
69
68
|
R =0.08206 #unit = ((L*atm) / (mol*k)) # Global constant of gases
|
|
70
69
|
pi=3.14
|
|
@@ -248,7 +247,6 @@ Tm=14.025 ## hydrojen melting point in K
|
|
|
248
247
|
|
|
249
248
|
vacuum_permeability=1
|
|
250
249
|
π=3.14
|
|
251
|
-
G=6.674 * 10^-11
|
|
252
250
|
e=2.71828
|
|
253
251
|
k=9*10**9
|
|
254
252
|
|
|
@@ -413,7 +411,6 @@ NA = 6.023*10**23
|
|
|
413
411
|
# Faraday's Constant
|
|
414
412
|
F= 96485 #C/mole
|
|
415
413
|
#Boltzmann Constant
|
|
416
|
-
k_B = 1.381*10**-23 #J/K
|
|
417
414
|
#Planck's Constant
|
|
418
415
|
h = 6.626*10**-34 #JS
|
|
419
416
|
|
|
@@ -187,46 +187,10 @@ def Energie(input_file,which):
|
|
|
187
187
|
|
|
188
188
|
|
|
189
189
|
|
|
190
|
-
def Stress_Strain1(input_file,which,count):
|
|
191
|
-
'''
|
|
192
|
-
This function claculates the stress and strain
|
|
193
|
-
Parameters from load and elongation data
|
|
194
|
-
----------
|
|
195
|
-
input_file : .csv format
|
|
196
|
-
the file must be inserted in csv.
|
|
197
|
-
whcih : str
|
|
198
|
-
please say which work we do ( plot or calculate?).
|
|
199
|
-
count: int
|
|
200
|
-
please enter the yarn count in Tex
|
|
201
|
-
remember: gauge length has been set in 250 mm
|
|
202
|
-
'''
|
|
203
|
-
|
|
204
|
-
#convert the file
|
|
205
|
-
mydf=pd.read_csv(input_file)
|
|
206
|
-
|
|
207
|
-
if which=='plot':
|
|
208
|
-
|
|
209
|
-
stress=mydf['Load']/count
|
|
210
|
-
strain=mydf['Extension']/250
|
|
211
|
-
plt.plot(stress,strain)
|
|
212
|
-
plt.title('stress-strain curve')
|
|
213
|
-
plt.xlabel('stress')
|
|
214
|
-
plt.ylabel('strain')
|
|
215
|
-
plt.show()
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
if which=='max stress':
|
|
219
|
-
stress_max=mydf['stress'].max()
|
|
220
|
-
return stress_max
|
|
221
|
-
|
|
222
|
-
if which=='max strain':
|
|
223
|
-
strain_max=mydf['strain'].max()
|
|
224
|
-
return strain_max
|
|
225
190
|
|
|
226
191
|
|
|
227
192
|
|
|
228
|
-
|
|
229
|
-
def Strain_Stress2(df,operation):
|
|
193
|
+
def Stress_Strain1(df,operation,L0=90,D0=9):
|
|
230
194
|
'''
|
|
231
195
|
|
|
232
196
|
|
|
@@ -239,17 +203,17 @@ def Strain_Stress2(df,operation):
|
|
|
239
203
|
df : DataFrame
|
|
240
204
|
It has 2 columns: DL(which is length in mm) & F (which is the force in N).
|
|
241
205
|
operation :
|
|
242
|
-
It tells the function to whether
|
|
206
|
+
It tells the function to whether PLOT the curve or find the UTS valu.
|
|
207
|
+
|
|
208
|
+
L0: initial length of the sample
|
|
209
|
+
D0: initial diameter of the sample
|
|
243
210
|
|
|
244
211
|
Returns
|
|
245
212
|
-------
|
|
246
213
|
The Stress-Strain curve or the amount of UTS
|
|
247
214
|
|
|
248
215
|
'''
|
|
249
|
-
|
|
250
|
-
#L0: initial length of the sample
|
|
251
|
-
D0 = 9
|
|
252
|
-
#D0: initial diameter of the sample
|
|
216
|
+
|
|
253
217
|
A0 = math.pi / 4 * (D0 ** 2)
|
|
254
218
|
df['e'] = df['DL'] / L0
|
|
255
219
|
df['S'] = df['F'] / A0
|
|
@@ -271,6 +235,44 @@ def Strain_Stress2(df,operation):
|
|
|
271
235
|
|
|
272
236
|
|
|
273
237
|
|
|
238
|
+
|
|
239
|
+
def Stress_Strain2(input_file,which,count):
|
|
240
|
+
'''
|
|
241
|
+
This function claculates the stress and strain
|
|
242
|
+
Parameters from load and elongation data
|
|
243
|
+
----------
|
|
244
|
+
input_file : .csv format
|
|
245
|
+
the file must be inserted in csv.
|
|
246
|
+
whcih : str
|
|
247
|
+
please say which work we do ( plot or calculate?).
|
|
248
|
+
count: int
|
|
249
|
+
please enter the yarn count in Tex
|
|
250
|
+
remember: gauge length has been set in 250 mm
|
|
251
|
+
'''
|
|
252
|
+
|
|
253
|
+
#convert the file
|
|
254
|
+
mydf=pd.read_csv(input_file)
|
|
255
|
+
|
|
256
|
+
if which=='plot':
|
|
257
|
+
|
|
258
|
+
stress=mydf['Load']/count
|
|
259
|
+
strain=mydf['Extension']/250
|
|
260
|
+
plt.plot(stress,strain)
|
|
261
|
+
plt.title('stress-strain curve')
|
|
262
|
+
plt.xlabel('stress')
|
|
263
|
+
plt.ylabel('strain')
|
|
264
|
+
plt.show()
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
if which=='max stress':
|
|
268
|
+
stress_max=mydf['stress'].max()
|
|
269
|
+
return stress_max
|
|
270
|
+
|
|
271
|
+
if which=='max strain':
|
|
272
|
+
strain_max=mydf['strain'].max()
|
|
273
|
+
return strain_max
|
|
274
|
+
|
|
275
|
+
|
|
274
276
|
def Stress_Strain3(input_data, action):
|
|
275
277
|
stress = input_data['Stress (MPa)']
|
|
276
278
|
strain = input_data['Strain (%)']
|
|
@@ -1251,10 +1253,10 @@ def Xrd_Analysis(data, operation):
|
|
|
1251
1253
|
operation : str
|
|
1252
1254
|
determine an operation which apply on data
|
|
1253
1255
|
possible values:
|
|
1254
|
-
information
|
|
1255
1256
|
max intensity
|
|
1256
1257
|
scatter plot
|
|
1257
1258
|
line graph
|
|
1259
|
+
line graph fill between
|
|
1258
1260
|
Returns
|
|
1259
1261
|
-------
|
|
1260
1262
|
max intensity and degree of max intensity
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: PyGamLab
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: A scientific Python library with constants, unit convertors, formulas, and data analysis tools.
|
|
5
|
+
Home-page: https://github.com/APMaii/pygamlab/tree/main
|
|
6
|
+
Author: Ali Pilehvar Meibody
|
|
7
|
+
Author-email: Ali Pilehvar Meibody <ai.2024.pilehvar@Gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Project-URL: Source, https://github.com/APMaii/pygamlab/tree/main
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering
|
|
14
|
+
Requires-Python: >=3.7
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: pandas
|
|
18
|
+
Requires-Dist: scipy
|
|
19
|
+
Requires-Dist: matplotlib
|
|
20
|
+
Requires-Dist: seaborn
|
|
21
|
+
Requires-Dist: scikit-learn
|
|
22
|
+
Dynamic: author
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: requires-python
|
|
25
|
+
|
|
26
|
+
# PyGamLab
|
|
27
|
+
|
|
28
|
+
**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.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 📌 Overview
|
|
33
|
+
|
|
34
|
+
**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)**.
|
|
35
|
+
|
|
36
|
+
- **Author:** Ali Pilehvar Meibody
|
|
37
|
+
- **Supervisor:** Prof. Naderi
|
|
38
|
+
- **Affiliation:** GAMLab, Amirkabir University of Technology (AUT)
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 📦 Modules
|
|
43
|
+
|
|
44
|
+
PyGAMLab is composed of **four core modules**, each focused on a specific area of scientific computation:
|
|
45
|
+
|
|
46
|
+
### 🔹 ` Constants.py`
|
|
47
|
+
This module includes a comprehensive set of scientific constants used in physics, chemistry, and engineering.
|
|
48
|
+
|
|
49
|
+
Examples:
|
|
50
|
+
- Planck's constant
|
|
51
|
+
- Boltzmann constant
|
|
52
|
+
- Speed of light
|
|
53
|
+
- Universal gas constant
|
|
54
|
+
- Density of Metals
|
|
55
|
+
- Tm of Metals
|
|
56
|
+
- And many more...
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### 🔹 `Convertors.py`
|
|
61
|
+
Contains unit conversion functions that follow the format:
|
|
62
|
+
`FirstUnit_To_SecondUnit()`
|
|
63
|
+
|
|
64
|
+
Examples:
|
|
65
|
+
- `Kelvin_To_Celsius(k)`
|
|
66
|
+
- `Celsius_To_Kelvin(c)`
|
|
67
|
+
- `Meter_To_Foot(m)`
|
|
68
|
+
- ...and many more standard conversions used in science and engineering.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### 🔹 `Functions.py`
|
|
73
|
+
This module provides a wide collection of **scientific formulas and functional tools** commonly used in engineering applications.
|
|
74
|
+
|
|
75
|
+
Examples:
|
|
76
|
+
- Thermodynamics equations
|
|
77
|
+
- Mechanical stress and strain calculations
|
|
78
|
+
- Fluid dynamics formulas
|
|
79
|
+
- General utility functions
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### 🔹 `Data_Analysis.py`
|
|
84
|
+
Provides tools for working with data, either from a **file path** or directly from a **DataFrame**.
|
|
85
|
+
|
|
86
|
+
Features include:
|
|
87
|
+
- Reading and preprocessing datasets
|
|
88
|
+
- Performing scientific calculations
|
|
89
|
+
- Creating visualizations (e.g., line plots, scatter plots, histograms)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 📦 Requirements
|
|
96
|
+
|
|
97
|
+
To use **PyGamLab**, make sure you have the following Python packages installed:
|
|
98
|
+
|
|
99
|
+
- `numpy`
|
|
100
|
+
- `pandas`
|
|
101
|
+
- `scipy`
|
|
102
|
+
- `matplotlib`
|
|
103
|
+
- `seaborn`
|
|
104
|
+
- `scikit-learn`
|
|
105
|
+
|
|
106
|
+
You can install all dependencies using:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pip install numpy pandas scipy matplotlib seaborn scikit-learn
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 🚀 Installation
|
|
117
|
+
|
|
118
|
+
To install PyGAMLab via pip (after uploading it to PyPI):
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pip install pygamlab
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
or
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
git clone https://github.com/APMaii/pygamlab.git
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## 📖 Usage Example
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
import PyGamLab
|
|
136
|
+
|
|
137
|
+
#--------------Constants-----------------------
|
|
138
|
+
|
|
139
|
+
print(PyGamLab.Constants.melting_point_of_Cu)
|
|
140
|
+
print(PyGamLab.Constants.melting_point_of_Al)
|
|
141
|
+
print(PyGamLab.Constants.Fe_Tm_Alpha)
|
|
142
|
+
print(PyGamLab.Constants.Fe_Tm_Gama)
|
|
143
|
+
|
|
144
|
+
print(PyGamLab.Constants.Boltzmann_Constant)
|
|
145
|
+
print(PyGamLab.Constants.Faraday_Constant)
|
|
146
|
+
|
|
147
|
+
#----------------Convertors---------------------
|
|
148
|
+
|
|
149
|
+
print(PyGamLab.Convertos.Kelvin_to_Celcius(300))
|
|
150
|
+
print(PyGamLab.Convertos.Coulomb_To_Electron_volt())
|
|
151
|
+
print(PyGamLab.Convertos.Angstrom_To_Milimeter())
|
|
152
|
+
print(PyGamLab.Convertos.Bar_To_Pascal())
|
|
153
|
+
|
|
154
|
+
#------------Functions-----------------------
|
|
155
|
+
|
|
156
|
+
PyGamLab.Functions.Gibs_free_energy(H0,T,S0)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
PyGamLab.Functions.Bragg_Law(h, k, l, a, y)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
PyGamLab.Functions.Electrical_Resistance(v,i)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
PyGamLab.Functions.Hall_Petch(d_grain,sigma0,k)
|
|
166
|
+
|
|
167
|
+
#-----------Data_Analysis--------------------
|
|
168
|
+
import pandas as pd
|
|
169
|
+
|
|
170
|
+
df= pd.read_csv('/users/apm/....../data.csv')
|
|
171
|
+
PyGamLab.Data_Analysis.Stress_Strain1(df, 'PLOT')
|
|
172
|
+
my_uts=PyGamLab.Data_Analysis.Stress_Strain1(df, 'UTS')
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
data=pd.read_csv('/users/apm/....../data.csv')
|
|
176
|
+
my_max=PyGamLab.Data_Analysis.Xrd_Analysis(data,'max intensity')
|
|
177
|
+
PyGamLab.Data_Analysis.Xrd_Analysis(data,'scatter plot')
|
|
178
|
+
PyGamLab.Data_Analysis.Xrd_Analysis(data,'line graph')
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Structure
|
|
186
|
+
```
|
|
187
|
+
pygamlab/
|
|
188
|
+
├── __init__.py
|
|
189
|
+
├── Constants.py
|
|
190
|
+
├── Convertors.py
|
|
191
|
+
├── Functions.py
|
|
192
|
+
├── Data_Analysis.py
|
|
193
|
+
└── contributers.md
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
## 🤝 Contributing
|
|
209
|
+
|
|
210
|
+
**Contributions** are welcome! Here's how to get started:
|
|
211
|
+
|
|
212
|
+
Fork the repository.
|
|
213
|
+
Create your feature branch
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
git checkout -b feature/my-feature
|
|
217
|
+
```
|
|
218
|
+
Commit your changes
|
|
219
|
+
```bash
|
|
220
|
+
git commit -am 'Add some feature'
|
|
221
|
+
```
|
|
222
|
+
Push to the branch
|
|
223
|
+
```bash
|
|
224
|
+
git push origin feature/my-feature
|
|
225
|
+
```
|
|
226
|
+
Create a new Pull Request.
|
|
227
|
+
Please make sure to update tests as appropriate and follow PEP8 guidelines.
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
## 📄 License
|
|
233
|
+
|
|
234
|
+
This project is licensed under the MIT License — see the LICENSE.txt file for details
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 🙏 Acknowledgements
|
|
241
|
+
|
|
242
|
+
This project is part of the scientific research activities at **GAMLab (Generalized Applied Mechanics Laboratory)** at **Amirkabir University of Technology (AUT)**.
|
|
243
|
+
|
|
244
|
+
Special thanks to:
|
|
245
|
+
|
|
246
|
+
- **Prof. Nader** – For his guidance, mentorship, and continuous support.
|
|
247
|
+
- **Ali Pilehvar Meibody** – Main developer and author of PyGamLab.
|
|
248
|
+
- **GAMLab Research Group** – For providing a collaborative and innovative environment.
|
|
249
|
+
|
|
250
|
+
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](contributors.md) file.
|
|
251
|
+
|
|
252
|
+
This project was made possible thanks to the powerful Python open-source ecosystem:
|
|
253
|
+
`NumPy`, `SciPy`, `Pandas`, `Matplotlib`, `Seaborn`, `Scikit-learn`, and many more.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
pygamlab-0.1.1/README.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# PyGamLab
|
|
2
|
+
|
|
3
|
+
**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.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📌 Overview
|
|
8
|
+
|
|
9
|
+
**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)**.
|
|
10
|
+
|
|
11
|
+
- **Author:** Ali Pilehvar Meibody
|
|
12
|
+
- **Supervisor:** Prof. Naderi
|
|
13
|
+
- **Affiliation:** GAMLab, Amirkabir University of Technology (AUT)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 📦 Modules
|
|
18
|
+
|
|
19
|
+
PyGAMLab is composed of **four core modules**, each focused on a specific area of scientific computation:
|
|
20
|
+
|
|
21
|
+
### 🔹 ` Constants.py`
|
|
22
|
+
This module includes a comprehensive set of scientific constants used in physics, chemistry, and engineering.
|
|
23
|
+
|
|
24
|
+
Examples:
|
|
25
|
+
- Planck's constant
|
|
26
|
+
- Boltzmann constant
|
|
27
|
+
- Speed of light
|
|
28
|
+
- Universal gas constant
|
|
29
|
+
- Density of Metals
|
|
30
|
+
- Tm of Metals
|
|
31
|
+
- And many more...
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### 🔹 `Convertors.py`
|
|
36
|
+
Contains unit conversion functions that follow the format:
|
|
37
|
+
`FirstUnit_To_SecondUnit()`
|
|
38
|
+
|
|
39
|
+
Examples:
|
|
40
|
+
- `Kelvin_To_Celsius(k)`
|
|
41
|
+
- `Celsius_To_Kelvin(c)`
|
|
42
|
+
- `Meter_To_Foot(m)`
|
|
43
|
+
- ...and many more standard conversions used in science and engineering.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### 🔹 `Functions.py`
|
|
48
|
+
This module provides a wide collection of **scientific formulas and functional tools** commonly used in engineering applications.
|
|
49
|
+
|
|
50
|
+
Examples:
|
|
51
|
+
- Thermodynamics equations
|
|
52
|
+
- Mechanical stress and strain calculations
|
|
53
|
+
- Fluid dynamics formulas
|
|
54
|
+
- General utility functions
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### 🔹 `Data_Analysis.py`
|
|
59
|
+
Provides tools for working with data, either from a **file path** or directly from a **DataFrame**.
|
|
60
|
+
|
|
61
|
+
Features include:
|
|
62
|
+
- Reading and preprocessing datasets
|
|
63
|
+
- Performing scientific calculations
|
|
64
|
+
- Creating visualizations (e.g., line plots, scatter plots, histograms)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 📦 Requirements
|
|
71
|
+
|
|
72
|
+
To use **PyGamLab**, make sure you have the following Python packages installed:
|
|
73
|
+
|
|
74
|
+
- `numpy`
|
|
75
|
+
- `pandas`
|
|
76
|
+
- `scipy`
|
|
77
|
+
- `matplotlib`
|
|
78
|
+
- `seaborn`
|
|
79
|
+
- `scikit-learn`
|
|
80
|
+
|
|
81
|
+
You can install all dependencies using:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pip install numpy pandas scipy matplotlib seaborn scikit-learn
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 🚀 Installation
|
|
92
|
+
|
|
93
|
+
To install PyGAMLab via pip (after uploading it to PyPI):
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install pygamlab
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
or
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git clone https://github.com/APMaii/pygamlab.git
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 📖 Usage Example
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
import PyGamLab
|
|
111
|
+
|
|
112
|
+
#--------------Constants-----------------------
|
|
113
|
+
|
|
114
|
+
print(PyGamLab.Constants.melting_point_of_Cu)
|
|
115
|
+
print(PyGamLab.Constants.melting_point_of_Al)
|
|
116
|
+
print(PyGamLab.Constants.Fe_Tm_Alpha)
|
|
117
|
+
print(PyGamLab.Constants.Fe_Tm_Gama)
|
|
118
|
+
|
|
119
|
+
print(PyGamLab.Constants.Boltzmann_Constant)
|
|
120
|
+
print(PyGamLab.Constants.Faraday_Constant)
|
|
121
|
+
|
|
122
|
+
#----------------Convertors---------------------
|
|
123
|
+
|
|
124
|
+
print(PyGamLab.Convertos.Kelvin_to_Celcius(300))
|
|
125
|
+
print(PyGamLab.Convertos.Coulomb_To_Electron_volt())
|
|
126
|
+
print(PyGamLab.Convertos.Angstrom_To_Milimeter())
|
|
127
|
+
print(PyGamLab.Convertos.Bar_To_Pascal())
|
|
128
|
+
|
|
129
|
+
#------------Functions-----------------------
|
|
130
|
+
|
|
131
|
+
PyGamLab.Functions.Gibs_free_energy(H0,T,S0)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
PyGamLab.Functions.Bragg_Law(h, k, l, a, y)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
PyGamLab.Functions.Electrical_Resistance(v,i)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
PyGamLab.Functions.Hall_Petch(d_grain,sigma0,k)
|
|
141
|
+
|
|
142
|
+
#-----------Data_Analysis--------------------
|
|
143
|
+
import pandas as pd
|
|
144
|
+
|
|
145
|
+
df= pd.read_csv('/users/apm/....../data.csv')
|
|
146
|
+
PyGamLab.Data_Analysis.Stress_Strain1(df, 'PLOT')
|
|
147
|
+
my_uts=PyGamLab.Data_Analysis.Stress_Strain1(df, 'UTS')
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
data=pd.read_csv('/users/apm/....../data.csv')
|
|
151
|
+
my_max=PyGamLab.Data_Analysis.Xrd_Analysis(data,'max intensity')
|
|
152
|
+
PyGamLab.Data_Analysis.Xrd_Analysis(data,'scatter plot')
|
|
153
|
+
PyGamLab.Data_Analysis.Xrd_Analysis(data,'line graph')
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Structure
|
|
161
|
+
```
|
|
162
|
+
pygamlab/
|
|
163
|
+
├── __init__.py
|
|
164
|
+
├── Constants.py
|
|
165
|
+
├── Convertors.py
|
|
166
|
+
├── Functions.py
|
|
167
|
+
├── Data_Analysis.py
|
|
168
|
+
└── contributers.md
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
## 🤝 Contributing
|
|
184
|
+
|
|
185
|
+
**Contributions** are welcome! Here's how to get started:
|
|
186
|
+
|
|
187
|
+
Fork the repository.
|
|
188
|
+
Create your feature branch
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
git checkout -b feature/my-feature
|
|
192
|
+
```
|
|
193
|
+
Commit your changes
|
|
194
|
+
```bash
|
|
195
|
+
git commit -am 'Add some feature'
|
|
196
|
+
```
|
|
197
|
+
Push to the branch
|
|
198
|
+
```bash
|
|
199
|
+
git push origin feature/my-feature
|
|
200
|
+
```
|
|
201
|
+
Create a new Pull Request.
|
|
202
|
+
Please make sure to update tests as appropriate and follow PEP8 guidelines.
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
## 📄 License
|
|
208
|
+
|
|
209
|
+
This project is licensed under the MIT License — see the LICENSE.txt file for details
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 🙏 Acknowledgements
|
|
216
|
+
|
|
217
|
+
This project is part of the scientific research activities at **GAMLab (Generalized Applied Mechanics Laboratory)** at **Amirkabir University of Technology (AUT)**.
|
|
218
|
+
|
|
219
|
+
Special thanks to:
|
|
220
|
+
|
|
221
|
+
- **Prof. Nader** – For his guidance, mentorship, and continuous support.
|
|
222
|
+
- **Ali Pilehvar Meibody** – Main developer and author of PyGamLab.
|
|
223
|
+
- **GAMLab Research Group** – For providing a collaborative and innovative environment.
|
|
224
|
+
|
|
225
|
+
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](contributors.md) file.
|
|
226
|
+
|
|
227
|
+
This project was made possible thanks to the powerful Python open-source ecosystem:
|
|
228
|
+
`NumPy`, `SciPy`, `Pandas`, `Matplotlib`, `Seaborn`, `Scikit-learn`, and many more.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "PyGamLab"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
description = "A scientific Python library with constants, unit convertors, formulas, and data analysis tools."
|
|
9
9
|
authors = [
|
|
10
10
|
{ name="Ali Pilehvar Meibody", email="ai.2024.pilehvar@Gmail.com" }
|
|
@@ -5,7 +5,7 @@ from setuptools import setup, find_packages
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="PyGamLab",
|
|
8
|
-
version="0.1.
|
|
8
|
+
version="0.1.1",
|
|
9
9
|
author="Ali Pilehvar Meibody",
|
|
10
10
|
author_email="your_email@example.com",
|
|
11
11
|
description="A scientific Python library with constants, unit convertors, formulas, and data analysis tools.",
|
pygamlab-0.1.0/PKG-INFO
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: PyGamLab
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: A scientific Python library with constants, unit convertors, formulas, and data analysis tools.
|
|
5
|
-
Home-page: https://github.com/APMaii/pygamlab/tree/main
|
|
6
|
-
Author: Ali Pilehvar Meibody
|
|
7
|
-
Author-email: Ali Pilehvar Meibody <ai.2024.pilehvar@Gmail.com>
|
|
8
|
-
License-Expression: MIT
|
|
9
|
-
Project-URL: Source, https://github.com/APMaii/pygamlab/tree/main
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Classifier: Intended Audience :: Science/Research
|
|
13
|
-
Classifier: Topic :: Scientific/Engineering
|
|
14
|
-
Requires-Python: >=3.7
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
Requires-Dist: numpy
|
|
17
|
-
Requires-Dist: pandas
|
|
18
|
-
Requires-Dist: scipy
|
|
19
|
-
Requires-Dist: matplotlib
|
|
20
|
-
Requires-Dist: seaborn
|
|
21
|
-
Requires-Dist: scikit-learn
|
|
22
|
-
Dynamic: author
|
|
23
|
-
Dynamic: home-page
|
|
24
|
-
Dynamic: requires-python
|
|
25
|
-
|
|
26
|
-
# PyGamMLab
|
|
27
|
-
|
|
28
|
-
**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.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## 📌 Overview
|
|
33
|
-
|
|
34
|
-
**PyGAMLab** stands for *Python GAMLAb tools*, a collection of scientific tools and functions developed at the **GAMLab** under the supervision of **Prof. Nader** at **Amirkabir University of Technology (AUT)**.
|
|
35
|
-
|
|
36
|
-
- **Author:** Ali Pilehvar Meibody
|
|
37
|
-
- **Supervisor:** Prof. Nader
|
|
38
|
-
- **Affiliation:** GAMLab, Amirkabir University of Technology (AUT)
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## 📦 Modules
|
|
43
|
-
|
|
44
|
-
PyGAMLab is composed of **four core modules**, each focused on a specific area of scientific computation:
|
|
45
|
-
|
|
46
|
-
### 🔹 `constants.py`
|
|
47
|
-
This module includes a comprehensive set of scientific constants used in physics, chemistry, and engineering.
|
|
48
|
-
|
|
49
|
-
Examples:
|
|
50
|
-
- Planck's constant
|
|
51
|
-
- Boltzmann constant
|
|
52
|
-
- Speed of light
|
|
53
|
-
- Universal gas constant
|
|
54
|
-
- And many more...
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
### 🔹 `convertors.py`
|
|
59
|
-
Contains unit conversion functions that follow the format:
|
|
60
|
-
`FirstUnit_To_SecondUnit()`
|
|
61
|
-
|
|
62
|
-
Examples:
|
|
63
|
-
- `Kelvin_To_Celsius(k)`
|
|
64
|
-
- `Pascal_To_Bar(p)`
|
|
65
|
-
- `Meter_To_Foot(m)`
|
|
66
|
-
- ...and many more standard conversions used in science and engineering.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
### 🔹 `functions.py`
|
|
71
|
-
This module provides a wide collection of **scientific formulas and functional tools** commonly used in engineering applications.
|
|
72
|
-
|
|
73
|
-
Examples:
|
|
74
|
-
- Thermodynamics equations
|
|
75
|
-
- Mechanical stress and strain calculations
|
|
76
|
-
- Fluid dynamics formulas
|
|
77
|
-
- General utility functions
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
### 🔹 `data_analysis.py`
|
|
82
|
-
Provides tools for working with data, either from a **file path** or directly from a **DataFrame**.
|
|
83
|
-
|
|
84
|
-
Features include:
|
|
85
|
-
- Reading and preprocessing datasets
|
|
86
|
-
- Performing scientific calculations
|
|
87
|
-
- Creating visualizations (e.g., line plots, scatter plots, histograms)
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## 🚀 Installation
|
|
92
|
-
|
|
93
|
-
To install PyGAMLab via pip (after uploading it to PyPI):
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
pip install pygamlab
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## 📖 Usage Example
|
|
103
|
-
|
|
104
|
-
```python
|
|
105
|
-
from pygamlab import Kelvin_To_Celsius, universal_gas_constant
|
|
106
|
-
from pygamlab import calculate_stress
|
|
107
|
-
from pygamlab import plot_from_csv
|
|
108
|
-
|
|
109
|
-
# Convert temperature
|
|
110
|
-
print(Kelvin_To_Celsius(300))
|
|
111
|
-
|
|
112
|
-
# Use a constant
|
|
113
|
-
print(universal_gas_constant)
|
|
114
|
-
|
|
115
|
-
# Use an engineering function
|
|
116
|
-
stress = calculate_stress(force=500, area=0.01)
|
|
117
|
-
print(stress)
|
|
118
|
-
|
|
119
|
-
# Analyze a dataset
|
|
120
|
-
plot_from_csv("data/experiment.csv", column_x="Time", column_y="Temperature")
|
|
121
|
-
```
|
|
122
|
-
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: PyGamLab
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: A scientific Python library with constants, unit convertors, formulas, and data analysis tools.
|
|
5
|
-
Home-page: https://github.com/APMaii/pygamlab/tree/main
|
|
6
|
-
Author: Ali Pilehvar Meibody
|
|
7
|
-
Author-email: Ali Pilehvar Meibody <ai.2024.pilehvar@Gmail.com>
|
|
8
|
-
License-Expression: MIT
|
|
9
|
-
Project-URL: Source, https://github.com/APMaii/pygamlab/tree/main
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Classifier: Intended Audience :: Science/Research
|
|
13
|
-
Classifier: Topic :: Scientific/Engineering
|
|
14
|
-
Requires-Python: >=3.7
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
Requires-Dist: numpy
|
|
17
|
-
Requires-Dist: pandas
|
|
18
|
-
Requires-Dist: scipy
|
|
19
|
-
Requires-Dist: matplotlib
|
|
20
|
-
Requires-Dist: seaborn
|
|
21
|
-
Requires-Dist: scikit-learn
|
|
22
|
-
Dynamic: author
|
|
23
|
-
Dynamic: home-page
|
|
24
|
-
Dynamic: requires-python
|
|
25
|
-
|
|
26
|
-
# PyGamMLab
|
|
27
|
-
|
|
28
|
-
**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.
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## 📌 Overview
|
|
33
|
-
|
|
34
|
-
**PyGAMLab** stands for *Python GAMLAb tools*, a collection of scientific tools and functions developed at the **GAMLab** under the supervision of **Prof. Nader** at **Amirkabir University of Technology (AUT)**.
|
|
35
|
-
|
|
36
|
-
- **Author:** Ali Pilehvar Meibody
|
|
37
|
-
- **Supervisor:** Prof. Nader
|
|
38
|
-
- **Affiliation:** GAMLab, Amirkabir University of Technology (AUT)
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## 📦 Modules
|
|
43
|
-
|
|
44
|
-
PyGAMLab is composed of **four core modules**, each focused on a specific area of scientific computation:
|
|
45
|
-
|
|
46
|
-
### 🔹 `constants.py`
|
|
47
|
-
This module includes a comprehensive set of scientific constants used in physics, chemistry, and engineering.
|
|
48
|
-
|
|
49
|
-
Examples:
|
|
50
|
-
- Planck's constant
|
|
51
|
-
- Boltzmann constant
|
|
52
|
-
- Speed of light
|
|
53
|
-
- Universal gas constant
|
|
54
|
-
- And many more...
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
### 🔹 `convertors.py`
|
|
59
|
-
Contains unit conversion functions that follow the format:
|
|
60
|
-
`FirstUnit_To_SecondUnit()`
|
|
61
|
-
|
|
62
|
-
Examples:
|
|
63
|
-
- `Kelvin_To_Celsius(k)`
|
|
64
|
-
- `Pascal_To_Bar(p)`
|
|
65
|
-
- `Meter_To_Foot(m)`
|
|
66
|
-
- ...and many more standard conversions used in science and engineering.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
### 🔹 `functions.py`
|
|
71
|
-
This module provides a wide collection of **scientific formulas and functional tools** commonly used in engineering applications.
|
|
72
|
-
|
|
73
|
-
Examples:
|
|
74
|
-
- Thermodynamics equations
|
|
75
|
-
- Mechanical stress and strain calculations
|
|
76
|
-
- Fluid dynamics formulas
|
|
77
|
-
- General utility functions
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
### 🔹 `data_analysis.py`
|
|
82
|
-
Provides tools for working with data, either from a **file path** or directly from a **DataFrame**.
|
|
83
|
-
|
|
84
|
-
Features include:
|
|
85
|
-
- Reading and preprocessing datasets
|
|
86
|
-
- Performing scientific calculations
|
|
87
|
-
- Creating visualizations (e.g., line plots, scatter plots, histograms)
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## 🚀 Installation
|
|
92
|
-
|
|
93
|
-
To install PyGAMLab via pip (after uploading it to PyPI):
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
pip install pygamlab
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## 📖 Usage Example
|
|
103
|
-
|
|
104
|
-
```python
|
|
105
|
-
from pygamlab import Kelvin_To_Celsius, universal_gas_constant
|
|
106
|
-
from pygamlab import calculate_stress
|
|
107
|
-
from pygamlab import plot_from_csv
|
|
108
|
-
|
|
109
|
-
# Convert temperature
|
|
110
|
-
print(Kelvin_To_Celsius(300))
|
|
111
|
-
|
|
112
|
-
# Use a constant
|
|
113
|
-
print(universal_gas_constant)
|
|
114
|
-
|
|
115
|
-
# Use an engineering function
|
|
116
|
-
stress = calculate_stress(force=500, area=0.01)
|
|
117
|
-
print(stress)
|
|
118
|
-
|
|
119
|
-
# Analyze a dataset
|
|
120
|
-
plot_from_csv("data/experiment.csv", column_x="Time", column_y="Temperature")
|
|
121
|
-
```
|
|
122
|
-
|
pygamlab-0.1.0/README.md
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
# PyGamMLab
|
|
2
|
-
|
|
3
|
-
**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.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 📌 Overview
|
|
8
|
-
|
|
9
|
-
**PyGAMLab** stands for *Python GAMLAb tools*, a collection of scientific tools and functions developed at the **GAMLab** under the supervision of **Prof. Nader** at **Amirkabir University of Technology (AUT)**.
|
|
10
|
-
|
|
11
|
-
- **Author:** Ali Pilehvar Meibody
|
|
12
|
-
- **Supervisor:** Prof. Nader
|
|
13
|
-
- **Affiliation:** GAMLab, Amirkabir University of Technology (AUT)
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## 📦 Modules
|
|
18
|
-
|
|
19
|
-
PyGAMLab is composed of **four core modules**, each focused on a specific area of scientific computation:
|
|
20
|
-
|
|
21
|
-
### 🔹 `constants.py`
|
|
22
|
-
This module includes a comprehensive set of scientific constants used in physics, chemistry, and engineering.
|
|
23
|
-
|
|
24
|
-
Examples:
|
|
25
|
-
- Planck's constant
|
|
26
|
-
- Boltzmann constant
|
|
27
|
-
- Speed of light
|
|
28
|
-
- Universal gas constant
|
|
29
|
-
- And many more...
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
### 🔹 `convertors.py`
|
|
34
|
-
Contains unit conversion functions that follow the format:
|
|
35
|
-
`FirstUnit_To_SecondUnit()`
|
|
36
|
-
|
|
37
|
-
Examples:
|
|
38
|
-
- `Kelvin_To_Celsius(k)`
|
|
39
|
-
- `Pascal_To_Bar(p)`
|
|
40
|
-
- `Meter_To_Foot(m)`
|
|
41
|
-
- ...and many more standard conversions used in science and engineering.
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
### 🔹 `functions.py`
|
|
46
|
-
This module provides a wide collection of **scientific formulas and functional tools** commonly used in engineering applications.
|
|
47
|
-
|
|
48
|
-
Examples:
|
|
49
|
-
- Thermodynamics equations
|
|
50
|
-
- Mechanical stress and strain calculations
|
|
51
|
-
- Fluid dynamics formulas
|
|
52
|
-
- General utility functions
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
### 🔹 `data_analysis.py`
|
|
57
|
-
Provides tools for working with data, either from a **file path** or directly from a **DataFrame**.
|
|
58
|
-
|
|
59
|
-
Features include:
|
|
60
|
-
- Reading and preprocessing datasets
|
|
61
|
-
- Performing scientific calculations
|
|
62
|
-
- Creating visualizations (e.g., line plots, scatter plots, histograms)
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## 🚀 Installation
|
|
67
|
-
|
|
68
|
-
To install PyGAMLab via pip (after uploading it to PyPI):
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
pip install pygamlab
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## 📖 Usage Example
|
|
78
|
-
|
|
79
|
-
```python
|
|
80
|
-
from pygamlab import Kelvin_To_Celsius, universal_gas_constant
|
|
81
|
-
from pygamlab import calculate_stress
|
|
82
|
-
from pygamlab import plot_from_csv
|
|
83
|
-
|
|
84
|
-
# Convert temperature
|
|
85
|
-
print(Kelvin_To_Celsius(300))
|
|
86
|
-
|
|
87
|
-
# Use a constant
|
|
88
|
-
print(universal_gas_constant)
|
|
89
|
-
|
|
90
|
-
# Use an engineering function
|
|
91
|
-
stress = calculate_stress(force=500, area=0.01)
|
|
92
|
-
print(stress)
|
|
93
|
-
|
|
94
|
-
# Analyze a dataset
|
|
95
|
-
plot_from_csv("data/experiment.csv", column_x="Time", column_y="Temperature")
|
|
96
|
-
```
|
|
97
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|