This repository provides tools for processing and analyzing data from the correlator instrument for measurement of low noise amplifiers and transistors. The correlator instrument measures voltage signals from two channels to characterize noise properties and gain parameters of RF devices. This software processes the raw correlator data through several calibration and analysis stages to extract meaningful gain and noise figure measurements. For a detailed overview of the mathematical processing involved, see math.md.
The goal of this software is to provide a complete data processing pipeline for correlator-based noise measurements. The pipeline includes:
- Continuous Wave (CW) Processing - Analyzes known CW signals to determine channel gains and phase relationships
- Noise Diode (ND) Processing - Uses calibrated noise sources for power-based gain measurements
- Load Calibration - Characterizes system noise using 50-ohm terminations
- Device Under Test (DUT) Analysis - Combines all calibrations to extract noise parameters of test devices
The software outputs processed data, plots, and comprehensive noise parameter analysis including noise figure, minimum noise temperature, and optimal reflection coefficients.
git clone https://github.com/apfox500/Correlator-Processing.git
cd "Correlator Processing"The recommended approach is to use the provided environment.yml file with Anaconda or Miniconda:
# Create the environment from the yml file
conda env create -f environment.yml
# Activate the environment
conda activate corr-proc-envThis will install all required dependencies including:
- NumPy and SciPy for numerical processing
- Matplotlib and Bokeh for plotting
- Pandas for data handling
- scikit-rf for RF parameter analysis
- tqdm for progress bars
Alternatively, if you prefer pip, you can install packages manually, though conda is recommended for better dependency management.
Before running any processing, you must configure the Constants.py file to match your data setup:
-
Data Directory: Set
DATA_DIRto point to your measurement data location -
Dates: Update the date strings (
CW_DATE,ND_DATE,LOAD_DATE,DUT_DATE) to match your measurement files -
File Formats: Ensure all filename patterns match your data files (example format shown below):
- CW:
f_CW{freq}GHz_PwrSensorOnCouplerZUDC20-5R23-S+PortB_Split02P1P2OnCorrelatorCh1Ch2_NSamp131072_PWR-30dBm_Att20dB_Ch115dBCh225dB__Fs{FS}GHz_{date}_0.npy(includes index_0and.npyextension) - ND:
NoiseDiode136_AttCh115dBCh225dB_Splitter02_Port0_NSamp2097152_Att0dB__Fs10.0GHz_{date}(ends at date) - Load:
LoadCal_AttCh1_15dBCh2_25dB_NSamp2097152__Fs10.0GHz_{date}(ends at date) - DUT:
DUT_ZKL2Plus_AttCh1_15dBCh2_25dB_NSamp2097152__Fs10.0GHz_{date}(ends at date)
- CW:
-
File Paths: Verify all S-parameter and calibration file paths in the
alphabeta/directory -
Output Directory: Optionally modify
OUT_DIRfor where processed results should be saved
The constants file contains two main sections:
- User-configurable section (top) - Change this for each measurement session
- System constants section (bottom) - Generally doesn't need changes
There are several ways to run the processing pipeline:
The simplest approach is to use your IDE's run button on main.py. With no arguments, this will launch the interactive CLI menu system.
Launch the menu-driven interface:
python main.py --cliThe CLI provides a numbered menu with options:
- Process CW - Analyze continuous wave measurements
- Process Noise Diode - Analyze noise diode calibration data
- Process Load Cal - Analyze 50-ohm load calibration
- Process DUT - Analyze device under test with full noise parameter extraction
- Process All (30 traces) - Run complete pipeline with 30 data files
- Process All (500 traces) - Run complete pipeline with 500 data files
- Exit
The CLI guides you through each step and uses defaults from Constants.py. Simply press Enter to accept defaults or provide custom values.
You can run individual processing modes directly with command-line arguments:
Process All Steps:
python main.py --allIndividual Processing Modes:
# CW Processing
python main.py --cw [--cw-date DATE] [--cw-filename FILENAME] [--cw-graph 0|1|2]
# Noise Diode Processing
python main.py --nd [--nd-date DATE] [--nd-filename FILENAME] [--nd-num-samples N]
# Load Calibration
python main.py --load [--load-date DATE] [--load-filename FILENAME] [--load-graph]
# DUT Processing
python main.py --dut [--dut-date DATE] [--dut-filename FILENAME] [--dut-num-samples N]Available Flags:
--cli: Launch interactive menu--all: Run complete processing pipeline--cw: Run CW processing only--nd: Run noise diode processing only--load: Run load calibration only--dut: Run DUT processing only--cw-graph: Set CW plotting mode (0=none, 1=basic, 2=detailed)--load-graph: Show load calibration plots- Date flags:
--cw-date,--nd-date,--load-date,--dut-date - File flags:
--cw-filename,--nd-filename, etc. - Sample count:
--nd-num-samples,--load-num-samples,--dut-num-samples
You can also run the individual processing modules directly:
python CW.py # CW processing functions
python ND.py # Noise diode processing
python LoadCal.py # Load calibration
python DUT.py # DUT analysisHowever, it is recommended to use the main main.py script for a complete workflow, as it handles data flow between modules.
If using VS Code, pre-configured launch configurations may be available in .vscode/launch.json for easy debugging and execution.
All processed data and plots are saved in the correlator_testing_output/ directory structure:
correlator_testing_output/
├── CW/ # CW processing results
├── NoiseDiode/ # Noise diode results
├── LoadCal/ # Load calibration results
└── DUT/ # DUT analysis results
Each processing run generates:
- CSV files with processed data
- PNG plots showing frequency responses and analysis
- Summary text files documenting the processing parameters and output files
This software was created in part by an employee of the National Institute of Standards and Technology (NIST), an agency of the U.S. government. Pursuant to title 17 Section 105 of the United States Code, this software is not subject to copyright protection and is in the public domain. See NOTICE.md for full details.
