A simple wrapper of numpy and matplotlib to make physics experiment data analyse easier

# PhysicsExp

### 中科大大物实验数据处理工具

#### Comes with NO WARRENTY

The package is also released on pypi.

This README is shown in both pypi package and github repo, but is designed for github only.

• The github repo(ustcpetergu/PhysicsExp) includes: physicsexp python package(directory physicsexp), my experiment data(in directory Experiments, archived by semester), some misc files and automation scripts.

• The pypi package(physicsexp) only includes the main python package, but that's enough and easy to use.

### A Simple Guide

#### The easy way

Create a virtualenv(here named test-env)

python -m venv test-env


Activate it

./test-env/Scripts/activate.bat


Install the package from pypi, (optional) use mirror to accelerate

pip install -i https://mirrors.ustc.edu.cn/pypi/web/simple physicsexp


python path/to/plot.py


You'll see graphs poped out and saved to .png, a generated gen.docx ready to print, and calculations(if any) printed to output. Then you can modify the code or write your own code to process data!

Assuming you are using Windows.

Change the command to make then work on your device! Don't just copy & paste!

Prepare to build

Set up environment to build and release python packages, detailed guide can be found on pypi website.

Build

python setup.py sdist bdist_wheel


Then the packaged wheel file can be found at ./dist/physicsexp-0.0.1-py3-none-any.whl(Name may be different)

Install

This package haven't been tested as it should and I don't know what will happen after installation.

**So use a virtualenv is recommended. **

Create a virtualenv(here named test-env)

python -m venv test-env


Activate it

./test-env/Scripts/activate.bat


Install the wheel (Use USTC mirror to accelerate, and it will download and install other required packages)

pip install -i https://mirrors.ustc.edu.cn/pypi/web/simple path\to\physicsexp-0.0.1-py3-none-any.whl


Wait a moment for the installation to finish.

Use

python


Import the package (from xxx import * may be bad, don't imitate me)

>>> from physicsexp.mainfunc import *
>>> from physicsexp.gendocx import *
>>>


Enjoy.

### Usage

Wanna know how to use? Read the source code yourself, see templates at physicsexp/Template/ and examples at Experiments/(Most of them are already outdated and cannot be run, if you really need to run them, maybe a git reset is the last way) , or contact developer.

But most of the time neither of these works.

**And can using these tools boost your efficiency? I don't know, but probably can't. **

**Finally, think twice before wasting time on this project, instead, enjoy your life, learn some real physics, and find a (boy|girl)friend. **