Skip to main content

medpc2excel

medpc2excel is a Python package for converting single or multiple medpc data files into Excels. medpc2excel can also return a pandas DataFrame for further analysis

Installation

I recommend installing an Anaconda distribution of Python. The current validation target is Python 3.12. Use the package manager pip to install medpc2excel. The current version is 4.0.0

pip install medpc2excel==4.0.0

To install directly from GitHub and bypass PyPI, run:

pip install "git+https://github.com/cyf203/medpc2excel.git"

If you downloaded or installed the latest version of Anaconda or Miniconda, you can create a conda environment in your cmd. To do so:

conda env create --name <envname> --file=environments.yml

If conda has problem to install dependencies, you can also run:

pip install -r requirements.txt

Version updating note

Version 4.0.0 updates the package for Python 3.12, current pandas/openpyxl behavior, and more resilient handling of malformed MED-PC chunks.

Configure *.MPC file

Please include a medpc protocol file (*.MPC) that you used for behavior task. The file name of this MPC file should be the same as that of the medpc data file. The medpc2excel will open the medpc data file and automatically search the used *.MPC file in the same directory. In *.MPC file, please explicitly declare each array as below:

<... your MPC code...>

    DIM C =9999  \ Levertype                     
    DIM D =9999  \ PelHLON                       
    DIM E =9999  \ PelHLOFF   
    
<... your MPC code ...>

Naming and formatting medpc data file

Please make sure medpc data file is a 'file' but not not a '*.txt' file. If so, just remove *.txt at the end Please make sure the data file's name starts with some number. I usually keep a time tag like: '20240904_xxx' But it can also be any number like: '2000_xxx'

Running medpc2excel

The quickest way to start is to open the GUi from a command line terminal in Anaconda cmd prompt:

python -m medpc2excel

After installing the package, you can also launch the GUI directly with:

medpc2excel

You can use the data explorer tab to see the raster of each event. alt text

You also can import this module and use the function called medpc_read as following

from medpc2excel.medpc_read import medpc_read

f = <file path>

ts_df, log = medpc_read(f, override = True, replace = False) # return a timestamp dataframe and a log string

Please download the Example folder to your local disk and run the medpc2excel_example.py to give a try.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

Dependencies

numpy==2.4.1
pandas==2.3.3
openpyxl==3.1.5
matplotlib==3.10.8
mplcursors==0.7.1
PyQt5==5.15.10

Metadata

Release files for medpc2excel 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for medpc2excel 4.0.0
File Size Uploaded Provenance Actions
medpc2excel-4.0.0.tar.gz 18.4 kB With provenance Details for medpc2excel-4.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for medpc2excel 4.0.0
File Interpreter ABI Platform Actions
medpc2excel-4.0.0-py3-none-any.whl Python 3 none any Details for medpc2excel-4.0.0-py3-none-any.whl

Total release size: 34.7 kB

Release files / medpc2excel-4.0.0.tar.gz

Download URL medpc2excel-4.0.0.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6b5c24d7d5d77836aaee783c86ebc20aaf5f3c1f008b7724ca3eded3cb70c770
BLAKE2b-256 checksum
How to use checksums
a6c17cc1053a97e8f6c86b89afa953a6d58ae64bf3edcc3643b2f8981e36fb09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release files / medpc2excel-4.0.0-py3-none-any.whl

Download URL medpc2excel-4.0.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06790d0e61e8204f202940a27264abaeab7afa25b0c3ec38b4c5039c8ed42912
BLAKE2b-256 checksum
How to use checksums
01f2cfc1b977b90a72a1f4acda9bce42dee04e32220b028ba3491a10ed2b521f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Security for medpc2excel 4.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for medpc2excel-4.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page