Skip to main content

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

Project description

PhysicsExp

USTC Physics Experiments Data Processing Tools

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

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.

For readers from pypi, here please.

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

最终目的是建造一套用于自动化处理大物实验数据、绘制图像、生成可打印文档、将文档提交到在线打印系统的工具;针对常用数据处理需求实现简化和自动化,只要简单的几行代码,就能完成通用的绘图、拟合、不确定度计算等大物实验常用任务。 理想与现实差距还很大,目前仅仅包装了一些matplotlib绘图库和文件输入简化重复劳动。

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

Run the scripts you downloaded from github in the virtualenv

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!

For advanced users

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

Launch python in your venv

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

physicsexp-0.0.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

physicsexp-0.0.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file physicsexp-0.0.2.tar.gz.

File metadata

  • Download URL: physicsexp-0.0.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for physicsexp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 32daee948f7107f94fed6aa55d40a808f062aadd13fcb26a47394fd6c2023d18
MD5 d05b308047bafb6caeee744d14837291
BLAKE2b-256 1b429f9398c842d2bf92b93409e0f66750b0c1fc46d013d4d6fb4979ca7537ad

See more details on using hashes here.

File details

Details for the file physicsexp-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: physicsexp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for physicsexp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 75a09d884693469de253612fadb6fbf015a29486c7a5b0c7350901ab87f102d9
MD5 500be3434c5382d147a8c24f91d98791
BLAKE2b-256 f722c19802f27a2a7cc26896ad4d50452cbdb819a5ce82ed9fcc92bef2d45588

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page