Skip to content

RayZh-hs/SJPHY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SJPHY Logo

SJPHY

End-to-end calculator for Physics Experiments in SJTU.

English | 中文

This project aims at providing fast, reliable physics experiment data analysis results including graphics and uncertainty analysis.

It is currently under active development. See the dev branch for up-to-date info.

Installation

Ensure that you have Python and Git installed. First clone the repository:

git clone https://github.com/RayZh-hs/SJPHY.git
cd SJPHY

Since the project uses uv for environment management, install it if it is not already installed:

For linux and macOS:

curl -LsSf https://astral.sh/uv/install.sh | sh

For Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Then within the folder, create and activate the environment:

uv run poe sync             # Create environment, install dependencies and link sjphy dynamic python library

Activate the environment. On macOS/Linux:

source .venv/bin/activate

On Windows:

.venv\Scripts\activate

This should automatically setup and install all dependencies.

Using Experiment Templates

Finish the installation steps above, then go to the experiments folder. Find the corresponding experiment folder. You can find a list in experiments/experiments.md.

In each folder, you will find a main.ipynb file. Open it with any code editor.

To use the template, copy the first python cell to a reliable AI agent (e.g. Google Gemini 2.5 Pro), along with all photos of your worksheet, constituting the all data needed to conduct analysis. The AI agent should produce a python snippet extracting all data from the photos. Replace the content of the first cell with the snippet, then run the file cell by cell. Some notebooks require you to fill in or tweak some parameters, so be sure to look for comments in them if the output is not as expected.

Then, run all cells in order. The notebook should produce all analysis results, including uncertainty analysis and graphs. If it is the first time you run any notebook, it will ask you to fill in your name and student ID for report generation. This result is saved at me.yaml, at the project root. Tweak it manually if there is any mistake.

You will see an output folder created in the experiment folder, containing:

  • All generated graphs in PNG format;

All the data you need will be printed in order when you run the cells.

Attributions

The project's logo comes from FlatIcon, and is designed by smalllikeart.

About

💡 End-to-end physics experiment calculator for SJTU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors