itcpr 2.0.0__py3-none-any.whl
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.
- itcpr/__init__.py +0 -0
- itcpr-2.0.0.dist-info/METADATA +120 -0
- itcpr-2.0.0.dist-info/RECORD +6 -0
- itcpr-2.0.0.dist-info/WHEEL +5 -0
- itcpr-2.0.0.dist-info/licenses/LICENSE +10 -0
- itcpr-2.0.0.dist-info/top_level.txt +1 -0
itcpr/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: itcpr
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: Physics-focused data analysis and plotting toolkit by ITCPR
|
|
5
|
+
Author: Md Abdus Sami Akanda
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: numpy
|
|
11
|
+
Requires-Dist: matplotlib
|
|
12
|
+
Requires-Dist: scipy
|
|
13
|
+
Requires-Dist: pandas
|
|
14
|
+
Requires-Dist: jupyterlab
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# ITCPR Tools Library
|
|
18
|
+
|
|
19
|
+
This Python library provides utilities for your internship at ITCPR, including features for plotting data, generating mumax3 commands based on file naming patterns, and renaming files for organizational purposes.
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
To install the GRE Tool Library, run the following command:
|
|
24
|
+
|
|
25
|
+
```pip install itcpr```
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
- **Listing Available Parameters**: Find the parameters from data files for plotting.
|
|
31
|
+
- **Data Plotting**: Easily plot specific parameters from data files for analysis.
|
|
32
|
+
- **MuMaX3 Command Generation**: Automate the generation of mumax3 commands for simulations.
|
|
33
|
+
- **File Renaming**: Streamline your file organization by renaming `table.txt` files according to their parent directory names.
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
#### Listing Available Parameters for Plotting `plot_list(file_path)`
|
|
38
|
+
|
|
39
|
+
Lists the parameters available for plotting from a given file, excluding the independent variable.
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
|
|
43
|
+
- file_path: Path to the data file.
|
|
44
|
+
|
|
45
|
+
This function helps you identify which parameters can be plotted from your data file, aiding in the visualization process of your GRE preparation data:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
import spintronics as spin
|
|
49
|
+
|
|
50
|
+
file_path = "path/to/your/data/filename.txt" # make sure to use / instead of \ in the path
|
|
51
|
+
spin.plot_list(file_path)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Plotting Data `plot(file_path, parameter_names)`
|
|
55
|
+
|
|
56
|
+
Plots specified parameters from a given file.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
- `file_path`: Path to the data file.
|
|
60
|
+
- `parameter_names`: List of parameter names to plot.
|
|
61
|
+
|
|
62
|
+
Plot specified parameters from a data file to visualize your GRE preparation data:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import spintronics as spin
|
|
66
|
+
|
|
67
|
+
file_path = "path/to/your/data/filename.txt" # make sure to use / instead of \ in the path
|
|
68
|
+
parameter_names = ["Parameter1", "Parameter2"] #use one or more parameters
|
|
69
|
+
spin.plot(file_path, parameter_names)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Look into your `table.txt` file to know what parameters you have there. For example:
|
|
73
|
+
- `mx ()`
|
|
74
|
+
- `my ()`
|
|
75
|
+
- `mz ()`
|
|
76
|
+
- and more...
|
|
77
|
+
|
|
78
|
+
#### Generating mumax3 Commands `m3_commands(base_folder, filename_pattern, ranges)`
|
|
79
|
+
|
|
80
|
+
Prints mumax3 commands for files based on a pattern with multiple 'cng' placeholders, each having different start, end values, and increments, and then prints 'mumax3' at the end.
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
- base_folder: The base folder address where the files are located or will be saved.
|
|
84
|
+
- filename_pattern: The pattern of the filename with 'cng' as placeholders.
|
|
85
|
+
- ranges: A list of tuples, each tuple contains (start_value, end_value, increment) for each 'cng'.
|
|
86
|
+
|
|
87
|
+
Generate mumax3 commands for a series of files, facilitating batch run of simulations:
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
import spintronics as spin
|
|
91
|
+
|
|
92
|
+
base_folder = "path/to/base/folder" # make sure to use / instead of \ in the path
|
|
93
|
+
filename_pattern = "N_2_2_2_C_1_1_1_A_cng_f_cng.m3"
|
|
94
|
+
ranges = [(10, 15, 1), (18.5, 21.2, 0.1)] # Example for two placeholders with their ranges
|
|
95
|
+
spin.m3_commands(base_folder, filename_pattern, ranges)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### Renaming Table Files `rename_tables(base_dir)`
|
|
99
|
+
|
|
100
|
+
Renames all 'table.txt' files to match their parent folder names (without the '.out' extension) with '.txt' extension, within folders ending with '.out' found anywhere under the specified base directory.
|
|
101
|
+
|
|
102
|
+
Args:
|
|
103
|
+
- base_dir: The base directory to recursively search for '.out' folders.
|
|
104
|
+
|
|
105
|
+
Automatically rename table.txt files within .out folders to match their parent folder's name, improving file organization:
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
import spintronics as spin
|
|
109
|
+
|
|
110
|
+
base_dir = "path/to/your/base/directory" # make sure to use / instead of \ in the path
|
|
111
|
+
spin.rename_tables(base_dir)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Contribute
|
|
115
|
+
If you have discovered a bug or something else you want to change, feel free to contact the author at `abdussamiakanda@gmail.com`.
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
© 2024 Md. Abdus Sami Akanda
|
|
119
|
+
|
|
120
|
+
This repository is licensed under the MIT license. See LICENSE for details.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
itcpr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
itcpr-2.0.0.dist-info/licenses/LICENSE,sha256=mGFWSkmFNB1pkXw9do6mtLXKpb1hGPCQ9GYqjoNghGs,1089
|
|
3
|
+
itcpr-2.0.0.dist-info/METADATA,sha256=YlWN_p95fVvYu9x-qXMSJbFfzCjvty7itqyO7Hmndeo,4170
|
|
4
|
+
itcpr-2.0.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
5
|
+
itcpr-2.0.0.dist-info/top_level.txt,sha256=3vi3TcgbHNvsUtd2oIeIVFzBhGg8BWSQblmvXtKr_k4,6
|
|
6
|
+
itcpr-2.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Md. Abdus Sami Akanda
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
itcpr
|