
Product
Redesigned Repositories Page: A Faster Way to Prioritize Security Risk
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
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.
To install the GRE Tool Library, run the following command:
pip install itcpr
table.txt
files according to their parent directory names.plot_list(file_path)
Lists the parameters available for plotting from a given file, excluding the independent variable.
Args:
This function helps you identify which parameters can be plotted from your data file, aiding in the visualization process of your GRE preparation data:
import spintronics as spin
file_path = "path/to/your/data/filename.txt" # make sure to use / instead of \ in the path
spin.plot_list(file_path)
plot(file_path, parameter_names)
Plots specified parameters from a given file.
Args:
file_path
: Path to the data file.parameter_names
: List of parameter names to plot.Plot specified parameters from a data file to visualize your GRE preparation data:
import spintronics as spin
file_path = "path/to/your/data/filename.txt" # make sure to use / instead of \ in the path
parameter_names = ["Parameter1", "Parameter2"] #use one or more parameters
spin.plot(file_path, parameter_names)
Look into your table.txt
file to know what parameters you have there. For example:
mx ()
my ()
mz ()
m3_commands(base_folder, filename_pattern, ranges)
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.
Args:
Generate mumax3 commands for a series of files, facilitating batch run of simulations:
import spintronics as spin
base_folder = "path/to/base/folder" # make sure to use / instead of \ in the path
filename_pattern = "N_2_2_2_C_1_1_1_A_cng_f_cng.m3"
ranges = [(10, 15, 1), (18.5, 21.2, 0.1)] # Example for two placeholders with their ranges
spin.m3_commands(base_folder, filename_pattern, ranges)
rename_tables(base_dir)
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.
Args:
Automatically rename table.txt files within .out folders to match their parent folder's name, improving file organization:
import spintronics as spin
base_dir = "path/to/your/base/directory" # make sure to use / instead of \ in the path
spin.rename_tables(base_dir)
If you have discovered a bug or something else you want to change, feel free to contact the author at abdussamiakanda@gmail.com
.
© 2024 Md. Abdus Sami Akanda
This repository is licensed under the MIT license. See LICENSE for details.
FAQs
Physics-focused data analysis and plotting toolkit by ITCPR
We found that itcpr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Our redesigned Repositories page adds alert severity, filtering, and tabs for faster triage and clearer insights across all your projects.
Security News
Slopsquatting is a new supply chain threat where AI-assisted code generators recommend hallucinated packages that attackers register and weaponize.
Security News
Multiple deserialization flaws in PyTorch Lightning could allow remote code execution when loading untrusted model files, affecting versions up to 2.4.0.