magmeas
Python package to import magnetometry data and calculate extrinsic magnetic properties
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.7%) to scientific vocabulary
Repository
Python package to import magnetometry data and calculate extrinsic magnetic properties
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
magmeas
Python module that enables the import and handling of VSM-data acquired on a Quantum Design PPMS measurement system. Extrinsic magnetic properties can be calculated from M(H) hysteresis loops and exported to JSON- or CSV-files. Automatic plotting with matplotlib is also available. The same functionality is available for M(T) measurements, although it can only be used for measurements containing a single Curie-temperature and great care should be taken.
Installation
Please clone or download this repository and install with pip.
bash
cd magmeas
pip install .
Usage
Input file formatting
Make sure that the necessary sample properties are given in the .DAT file. The formatting is as follows:
INFO,m,SAMPLE_MASS
INFO,(a, b, c),SAMPLE_SIZE
With m being the sample mass in mg, a and b being the sample dimensions perpendicular to the magnetization axis and c being the sample dimension parallel to the magnetization axis. So far only cuboid samples are supported and the density is assumed to be m / (a * b * c)
Command line
Get a quick overview with the "--help" or "-h" flag
bash
magmeas -h
To print the magnetic properties calculated from the measurement saved in "file.DAT" to the console you can use:
bash
magmeas file.DAT
To plot the measurement with matplotlib, type "-p" or "--plot":
bash
magmeas -p file.DAT
If you want to store the calculated properties in a YAML-file, use "-d" or "--dump":
bash
magmeas -d file.DAT
The flags can also be combined. To store the properties in a YAML-file, plot the measurement and save it as a png and prevent the printing of any information to the console with the flag "-s" or "--silent":
bash
magmeas -dps file.DAT
To operate on all files in a folder, just give the path to the folder in question:
bash
magmeas -d folder_with_files
The content of the specified DAT-file can also be written into an hdf5-file together with the calculated properties
bash
magmeas --hdf5 file.DAT
Python
You can also import the module in python and use it with a bit more control. Most things are handled within the class "VSM". This reads in .DAT files which are formatted as specified above or those which had their properties entered manually in a console dialog. There are also functions that plot multiple VSM objects or write the properties of several measurements to a YAML or CSV-like .TXT file.
```python import magmeas as mm
dat1 = mm.VSM("file1.DAT") dat2 = mm.VSM("file2.DAT", read_method="manual")
dat1.plot("file1plot.png") dat2.propertiestofile("file2properties.yaml")
mm.plotmultipleVSM([dat1, dat2], ["Measurement 1", "Measurement 2"]) mm.multpropertiesto_txt("properties.txt", [dat1, dat2], ["Measurement 1", "Measurement 2"]) ```
Dependencies
- NumPy
- Pandas
- Matplotlib
- h5py
- mammos-entity
- PyQT6
Requires Python >= 3.6 because f-strings are used
Code Archive
Owner
- Name: MAgnetic Multiscale MOdelling Suite (MaMMoS) - placeholder
- Login: MaMMoS-project
- Kind: organization
- Repositories: 1
- Profile: https://github.com/MaMMoS-project
Citation (CITATION.cff)
abstract: "Python module that enables the import and handling of magnetometry data."
authors:
- family-names: Winkler
given-names: Jonas
orcid: "https://orcid.org/0009-0000-7815-5916"
affiliation: "Leibniz Institute for Solid State and Materials Research (ROR: https://ror.org/04zb59n70)"
- name: The magmeas Developers
website: "https://github.com/MaMMoS-project/magmeas"
cff-version: 1.2.0
keywords:
- magnetometry
- vibrating sample magnetometry
- experimental data processing
license: MIT
message: "If you would like to cite this code, please do so using these metadata."
repository-code: "https://github.com/MaMMoS-project/magmeas"
title: "magmeas"
version: 0.4.1
GitHub Events
Total
- Push event: 5
Last Year
- Push event: 5
Dependencies
- h5py *
- mammos-entity *
- matplotlib *
- numpy *
- pandas *