Metadata-Version: 2.5
Name: mumax2csv
Version: 0.1
Summary: Converts a micromagnetic data table file generated by Mumax3 simulations into a CSV data file for better compatibility with modern applications
Project-URL: Homepage, https://github.com/samarlyka/mumax2csv
Project-URL: Repository, https://github.com/samarlyka/mumax2csv.git
Project-URL: Issues, https://github.com/samarlyka/mumax2csv/issues
Author-email: Samarthya Lykamanuella <lykamanuella@outlook.com>
Maintainer-email: Samarthya Lykamanuella <lykamanuella@outlook.com>
License-Expression: MIT
License-File: LICENSE
Keywords: CSV,GNU Plot,Mumax,Mumax3,conversion,data table,magnetism,micromagnetic,micromagnetics,nanomagnetic,physics,simulation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Education :: Testing
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# mumax2csv

Converts Mumax3 data table to CSV format

## Features

Allows Mumax3 data table to be parsed by various data processing programs other than [gnuplot](https://sourceforge.net/projects/gnuplot).

## Installation

To run `mumax2csv`, simply install the latest Python version from https://www.python.org/downloads and execute the following command to download `mumax2csv` from Python Package Index (PyPI):

```sh
pip install mumax2csv
```

## Usage

To convert a Mumax3 data table file into CSV, execute the following from the command line/terminal:

```sh
python -m mumax2csv path/to/mumax3/datatable.txt
```

Glob pattern and multiple file arguments are also supported:

```sh
#!/bin/bash
# Using the UNIX Glob pattern:
python -m mumax2csv path/to/mumax3/*.txt

# Specifying multiple data table files:
python -m mumax2csv table1.txt table2.txt table3.txt
```

You can also specify whether the unit name of each column in the data table file should be preserved. This can be achieved by accessing the `keep_unit` parameter in the converter. The default behavior is `False` (i.e., omitting the unit name altogether). If you set `keep_unit` to `True`, the second row of the output CSV file will keep the unit name information.

Examples on how to set the `keep_unit` parameter via the terminal:

```sh
python -m mumax2csv -k 1 table.txt
python -m mumax2csv --keep-unit false table.txt
# "1" for "true", "0" for "false".
```

An example on how to set the `keep_unit` parameter by importing the Python module:

```python
import mumax2csv
mumax2csv.convert(
    file_input='path/to/mumax3/datatable.txt',
    keep_unit=False
)
```
