qt3-ion-trap

Code for the pollen trap instructional labs developed by QT3.

https://github.com/qt3uw/qt3-ion-trap

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Code for the pollen trap instructional labs developed by QT3.

Basic Info
  • Host: GitHub
  • Owner: qt3uw
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Size: 57.8 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 3
  • Releases: 0
Created over 1 year ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

Planar pollen trap instructional lab

This repository contains tracking programs, graphing scripts, and raw data for our QT3 Planar Trap demonstration lab. This project can perform three experiments: * Experiment 1: Measure the micromotion amplitude, height, charge-to-mass ratio, and escape voltage of a single particle * Code use: Use "Tracking.py" to generate the Tuple.txt file containing the data points. The "push" function in "calibratepixeldistances.py" will then convert the data points into units of mm and store the new data file in a separate folder. Running the "pull" function of "calibratepixeldistances.py" over this new data folder will print group statistics. * Experiment 2: Observe shuttling motion of a single particle and identify its maximum velocity * Experiment 3: Observe the separation (splitting) motion of two particles and identify their maximum velocities

Example video data can be found in this google shared drive.

How to Plot

In our top level directory we have included the python scripts and text data files which were used to produce our plots for figures 2, 4, and 5. To plot with our "figures234.py" file, set the fname parameter to your desired file name such as "data/rawmicromotion/8-18Trial18data.txt". To plot with our "figure5.py" script, put your desired file name (e.g. "data/shuttleexperimentdata/COMSOLShuttle1.txt") in the builddata_comsol() function argument. This applies to each of the four plots produced by that script.

Python Code Installation

These instructions assume you've installed anaconda. I also recommend the pycharm community IDE for editing and debugging python code. The instructions also assume that you know how to use the command line "cd" command to change directory.

Open a terminal (git bash if using windows, terminal on mac or linux). Navigate to the parent folder where you store your git repositories using the 'cd' command in the terminal. Once there clone the repository and cd into it. git clone https://github.com/qt3uw/qt3-ion-trap.git cd qt3-ion-trap You can use the .yml file contained in the repository to set up an anaconda environment with the required packages using the following command (if you are in windows, you will need to switch from the git bash terminal to the "anaconda prompt" terminal that can be found in start menu if you've installed anaconda, on a mac or linux you can use the good old terminal for everything): conda env create -f environment.yml This creates an anaconda environment called "qt3iontrap", which contains all of the python dependencies of this repository. You can activate that environment with the following command: conda activate qt3_ion_trap Once activated your terminal will usually show (qt3iontrap) to the left of the command prompt.

Now that your terminal has activated the anaconda environment you can use pip to install this package in that environment. cd into the parent folder that contains the qt3-ion-trap repository you cloned earlier. Then use the following command to install the repository into the qt3iontrap conda environment. pip install -e qt3_ion_trap

Configure Interpreter in IDE

At this point is complete. If using an IDE, like pycharm, you will need to make sure that the python interpreter for your project is set to the python.exe file for the anaconda environment that you just created. An easy way to find the path to that python executable within the environment is to use the following command in a terminal where the qt3iontrap enviornment is activated: angular2html where python The path that we want is the middle line. If using pycharm, follow these instructions to set your interpereter to that path.

Micromotion Experiment Instructions

Relevant code files for micromotion experiments are acquisition/micromotiontracking.py, micromotiondataanalysis.py, and figures234.py.

micromotion
tracking.py evaluates raw .avi video files to detect a particle's location over time. These results are evaluated using the micromotiondataanalysis.py file to find charge-to-mass ratio, RF null height, and RF null voltage. Lastly, figures234.py can visualize these data and save the resulting figures. Follow the steps below to navigate full video analysis.

  1. Collect a calibration image or video of a measuring tool in the viewframe. Use this to determine the pixel-to-millimeter conversion, using the following steps if necessary. Do not move the optical setup beyond this point.
  2. Place your video file into the acquisition directory, then open tracking.py and change the class variable "self.VIDEO_FILE" to the desired .avi file.
  3. Ensure all parameters within the "TrackingConfig" class reflect those of your experiment.
  4. Run the code. Use any letter or arrow key to progress through the frames one at a time.
  5. Identify the desired object's location and change the "self.XRANGE" and "self.YRANGE" class variables to fit the object in frame. Make sure the bottom of the frame is set to the central surface of the trap, as gathered from the calibration video. This ensures proper height data collection.
  6. Once the viewframe is set, press the spacebar and the data will begin to collect automatically. Values will appear in the terminal of the form:
    "Saved: {voltage}, {height}, {micromotion}; Completion: {percent completion}, {pixel number}".
    The results are output to a .txt file of the same name as the video as lists for each data point in the form "[voltage, height, micromotion]".
  7. "calibratepixeldistances.py" can be used to analyze the data. It will generate a file containing the list [charge to mass ratio (C/kg), RF null voltage (-V), RF null height (mm)].
  8. "figures234py" can then be used to visualize the data via the "plotheightandmicro" and "plotc2m_hist" functions.

LICENSE

LICENSE

Owner

  • Name: QT3 lab at the University of Washington
  • Login: qt3uw
  • Kind: organization

Citation (CITATION.cff)

message: "If you use this software, please cite it using these metadata."
authors: 
  - family-names: "Wolfram"
    given-names: "Cole"
  - family-names: "Warren"
    given-names: "Noah" 
  - family-names: "Thomas"
    given-names: "Robert"
  - family-names: "Parsons" 
    given-names: "Max"   
cff-version: 1.2.0
title: "Planar Trap Laboratory Data Analysis and Visualization"
repository-code: https://github.com/qt3uw/qt3-ion-trap.git

GitHub Events

Total
  • Issues event: 1
  • Delete event: 1
  • Issue comment event: 5
  • Push event: 69
  • Pull request review comment event: 2
  • Pull request review event: 3
  • Pull request event: 12
  • Fork event: 1
  • Create event: 15
Last Year
  • Issues event: 1
  • Delete event: 1
  • Issue comment event: 5
  • Push event: 69
  • Pull request review comment event: 2
  • Pull request review event: 3
  • Pull request event: 12
  • Fork event: 1
  • Create event: 15

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 1
  • Total pull requests: 20
  • Average time to close issues: 2 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 1
  • Total pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.3
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 20
  • Average time to close issues: 2 months
  • Average time to close pull requests: 4 days
  • Issue authors: 1
  • Pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.3
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cmordi (1)
Pull Request Authors
  • robert-academic (13)
  • cole0wolf (8)
  • cmordi (4)
  • mfparsons314 (3)
Top Labels
Issue Labels
Pull Request Labels