Automated test equipment control and data acquisition skill for hardware validation, with VISA/SCPI instrument communication, test sequence scripting, and measurement uncertainty analysis.
Automates hardware test equipment control, data acquisition, and measurement uncertainty analysis for validation workflows.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
Automated test equipment control and data acquisition for hardware validation and characterization.
This skill provides comprehensive capabilities for automating electronic test equipment, enabling consistent and repeatable hardware validation workflows. It supports instrument communication, automated test sequences, data logging, and analysis.
pip install pyvisa pyvisa-py numpy pandas matplotlib
# For HDF5 data storage
pip install h5py tables
# For advanced analysis
pip install scipy uncertainties
# For report generation
pip install jinja2 weasyprint
import pyvisa
# Initialize resource manager
rm = pyvisa.ResourceManager()
# List available instruments
print(rm.list_resources())
# Connect to oscilloscope
scope = rm.open_resource('TCPIP::192.168.1.100::INSTR')
scope.timeout = 5000 # 5 second timeout
# Query identification
idn = scope.query('*IDN?')
print(f"Connected to: {idn}")
# Configure and measure
scope.write(':CHANnel1:DISPlay ON')
scope.write(':CHANnel1:SCALe 1.0') # 1V/div
scope.write(':TIMebase:SCALe 0.001') # 1ms/div
scope.write(':TRIGger:EDGE:SOURce CHANnel1')
scope.write(':TRIGger:EDGE:LEVel 0.5')
# Read measurement
vpp = float(scope.query(':MEASure:VPP? CHANnel1'))
freq = float(scope.query(':MEASure:FREQuency? CHANnel1'))
print(f"Vpp: {vpp:.3f} V, Frequency: {freq:.2f} Hz")
scope.close()
from dataclasses import dataclass
from typing import List, Dict, Any
import time
@dataclass
class TestResult:
name: str
passed: bool
value: float
unit: str
limit_low: float
limit_high: float
class TestSequence:
def __init__(self, instruments: Dict[str, Any]):
self.instruments = instruments
self.results: List[TestResult] = []
def run_test(self, name: str, measure_func, limit_low: float,
limit_high: float, unit: str) -> TestResult:
value = measure_func()
passed = limit_low <= value <= limit_high
result = TestResult(name, passed, value, unit, limit_low, limit_high)
self.results.append(result)
return result
def generate_report(self) -> Dict:
return {
'total_tests': len(self.results),
'passed': sum(1 for r in self.results if r.passed),
'failed': sum(1 for r in self.results if not r.passed),
'results': [vars(r) for r in self.results]
}
# Example usage
def measure_output_voltage():
return float(dmm.query(':MEASure:VOLTage:DC?'))
sequence = TestSequence({'dmm': dmm, 'psu': psu})
sequence.run_test('Output Voltage', measure_output_voltage, 4.9, 5.1, 'V')
from uncertainties import ufloat
import numpy as np
class UncertaintyAnalysis:
def __init__(self):
self.measurements = []
self.instrument_uncertainty = 0.0
def add_measurement(self, value: float):
self.measurements.append(value)
def set_instrument_uncertainty(self, uncertainty: float):
"""Set Type B uncertainty from instrument specifications"""
self.instrument_uncertainty = uncertainty
def calculate_combined_uncertainty(self, coverage_factor: float = 2.0):
# Type A uncertainty (statistical)
n = len(self.measurements)
mean = np.mean(self.measurements)
std = np.std(self.measurements, ddof=1)
type_a = std / np.sqrt(n)
# Type B uncertainty
type_b = self.instrument_uncertainty / np.sqrt(3) # Rectangular distribution
# Combined standard uncertainty
combined = np.sqrt(type_a**2 + type_b**2)
# Expanded uncertainty
expanded = coverage_factor * combined
return {
'mean': mean,
'type_a_uncertainty': type_a,
'type_b_uncertainty': type_b,
'combined_uncertainty': combined,
'expanded_uncertainty': expanded,
'coverage_factor': coverage_factor
}
# Usage
analysis = UncertaintyAnalysis()
for _ in range(10):
analysis.add_measurement(float(dmm.query(':MEASure:VOLTage:DC?')))
analysis.set_instrument_uncertainty(0.001) # 1mV from spec sheet
result = analysis.calculate_combined_uncertainty()
print(f"Voltage: {result['mean']:.4f} +/- {result['expanded_uncertainty']:.4f} V (k=2)")
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.