Skip to main content

Dip Measurement Core Algorithm

Core 4-wire resistance measurement module using current reversal technique for high-accuracy offset-compensated measurements.

Instruments

  • Keithley K2450 SourceMeter — programmable current source
  • DAQ6510 with 7702 Multiplexer — multi-channel voltage measurement

Features

  • Current reversal technique: V_true = (V+ − V−) / 2 to cancel thermal EMF
  • 4-wire relay addressing on 7702 multiplexer (up to 20 channels)
  • Dynamic per-channel current calibration to target 2 mV excitation
  • PT100/PT1000 resistance-to-temperature conversion
  • Support for PT1000, PT100, Thermistor, Diode, and Zirconium Oxynitride sensors

Installation

From PyPI (after publishing)

pip install dip-measurement-core

From GitHub

pip install git+https://github.com/YOUR_USERNAME/dip-measurement-core.git

Local development install

git clone https://github.com/YOUR_USERNAME/dip-measurement-core.git
cd dip-measurement-core
pip install -e .

Dependencies

Note: The ki488, k2450-gpib, and daq-gpib packages must also be pip-installable (either on PyPI or installable via pip install git+https://...).

Quick Start

from dip_measurement_core import DipMeasurement

dip = DipMeasurement()

# Connect to instruments via GPIB
success, msg = dip.connect(k2450_address=18, daq_address=20)

# Configure measurement
dip.configure(current_ma=0.1, sensor_type='ZIRCONIUM')

# Measure a single channel
result = dip.measure_channel(1)
print(f"Channel 1: {result['resistance']:.4f} Ω")

# Measure multiple channels
results = dip.measure_all_channels([1, 2, 3, 4, 5])
for ch, data in sorted(results.items()):
    print(f"  Ch {ch}: R={data['resistance']:.4f} Ω")

# Disconnect
dip.disconnect()

Dynamic Current Calibration

To automatically adjust excitation current per channel (targeting 2 mV):

dip.configure(current_ma=0.01, dynamic_current=True)
success, msg = dip.calibrate_currents(channels=[1, 2, 3, 4, 5])
print(msg)

# Subsequent measurements use calibrated currents
results = dip.measure_all_channels([1, 2, 3, 4, 5])

Publishing to PyPI

# Install build tools
pip install build twine

# Build the package
python -m build

# Upload to PyPI (you'll need a PyPI account and API token)
python -m twine upload dist/*

License

MIT

Metadata

Release files for dip-measurement-core 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dip-measurement-core 1.0.0
File Size Uploaded
dip_measurement_core-1.0.0.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dip-measurement-core 1.0.0
File Interpreter ABI Platform
dip_measurement_core-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / dip_measurement_core-1.0.0.tar.gz

Download URL dip_measurement_core-1.0.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
36c7e12f5768fad8841bdc9717743a53026710b92c19eae393b6d697088739b0
BLAKE2b-256 checksum
How to use checksums
52bc02d0a48ee644171431a898b7c229d0a190b71375c1c85ef144b18c9ce914
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release files / dip_measurement_core-1.0.0-py3-none-any.whl

Download URL dip_measurement_core-1.0.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7885db42f9c1cf96543a53f69e3856bf80c1a9fd2be6d136fb326420d97df299
BLAKE2b-256 checksum
How to use checksums
6b3541c992f52c60b6dfbc5fa476337a0fcb816043f432c87948fa6a580c0328
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page