Git Product home page Git Product logo

medpc2excel's Introduction

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 -- Choose Python 3.7 (a higher version like 3.11 causes a problem). Use the package manager pip to install medpc2excel. The current version is 3.0.9

pip install medpc2excel

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

Add data explorer to visualize timestamp data

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 ...>

Running medpc2excel

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

python -m 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

Pandas==1.3.5
Numpy==1.21.6
dill==0.3.7
mplcursors==0.3
openpyxl==3.0.5
matplotlib==3.5.3
PyQt5==5.11.3
Medpc2excel==3.0.9

medpc2excel's People

Contributors

cyf203 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.