Python Resources for PHYS 4430

This page provides resources for using Python for data acquisition, analysis, and visualization in PHYS 4430.


Getting Started

Setup & Installation

Install Python, packages, and hardware drivers (NI-DAQmx, NI-VISA, Thorlabs Kinesis).

Workflows

Choose between JupyterLab, VS Code, and Jupyter in VS Code. When to use each.


Data Analysis

Data Analysis with Python

Core skills for experimental physics:

  • Python basics, NumPy arrays, file I/O
  • Plotting with Matplotlib (error bars, subplots, saving figures)
  • Curve fitting with SciPy (weighted fits, chi-squared, residuals)
  • FFT and spectral analysis
  • Error propagation with the uncertainties package

Hardware Interfacing

NI-DAQmx

Interface with the USB-6009 DAQ for voltage measurements, sampling, and continuous acquisition.

VISA Instruments

Control oscilloscopes, function generators, and power supplies via PyVISA. Covers Keysight and Tektronix equipment.

Thorlabs Motors

Control stepper motors via the Kinesis SDK for automated positioning and scanning.


Additional Resources

Python Learning

Hardware Documentation

Course Resources