Skip to content

UbiStaff/Millikan-Automator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Millikan-Automator

English Chinese

Note: This project is a modified version based on the original repository by ricktjwong.

Key Modifications

  • Documentation: Added Chinese documentation (README_CN.md).
  • Code Adjustments: Updated file paths for better compatibility.
  • Feature Enhancements: Added trajectory visualization in transform.py to inspect particle movements.
  • Parameter Tuning: Adjusted parameters in extract.py and transform.py for specific experimental conditions (e.g., voltage settings, detection thresholds).

Recognising charged oil drops in Millikan's oil drop experiment

Millikan's oil drop experiment involves the measurement of several terminal velocities of oil droplets at various conditions to be able to eventually deduce its charge. One would usually look through the microscope, keeping track of one oil droplet at a time, and record its velocity from observation the change in position over time.

This process is time consuming and tedious. These Python scripts were written to:

  1. Recognise the oil droplets through the microscope.
  2. Calculate velocities of oil droplets through the microscope.

These were implemented using trackpy, a Python implementation of the Crocker-Grier algorithm which helps with particle tracking across frames.

Prerequisites

  • Python 3.6 or higher
  • Libraries: trackpy, numpy, pandas, matplotlib, pims, slicerator

Installation

  1. Clone the repository:

    git clone https://github.com/UbiStaff/Millikan-Automator.git
    cd Millikan-Automator
  2. Create and activate a virtual environment (optional but recommended):

    python3 -m venv millikan_env
    source millikan_env/bin/activate
    # On Windows use: millikan_env\Scripts\activate
  3. Install dependencies:

    pip install trackpy numpy pandas matplotlib pims slicerator

Usage

1. Extract Data

Run python/extract.py to read the sample MOV file from test_video. This script recognises the oil droplets, tracks them, and extracts the important data into a CSV file at csvs/extract.csv.

Note: This might take a while as processing is done on most frames in the video.

python python/extract.py

2. Transform Data

After extraction is done, run python/transform.py. This filters the oil droplets which did not change direction upon the removal of the electric field, calculates useful fields such as velocity, and saves the result into csvs/transformed.csv.

python python/transform.py

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors