Skip to main content
Glama
dfieser

io.github.dfieser/thermocouple-its90

by dfieser

thermocouple-its90

Python向けNIST ITS-90熱電対変換ライブラリ:8種類すべての文字指定タイプ(B、E、J、K、N、R、S、T)について、電圧から温度へ、温度から電圧への変換を提供します。冷接点補償とゼーベック係数にも対応しています。テストスイートは、NIST参照テーブルの12,026すべての表記載点を毎回の実行で検証します。

Tests PyPI Python License: MIT DOI

純粋な標準ライブラリのみを使用し、依存関係はありません。完全に型付けされています。このエンジンのブラウザ版は、無料のオンライン熱電対計算機として動作しており、リリースのたびにこのリポジトリからベンダリングされています。

インストール

pip install thermocouple-its90

Related MCP server: mcp-units

熱電対のミリボルトを温度に変換する

from thermocouple_its90 import TypeK

TypeK.emf(300.0)          # 12.209  (mV at 300 C, 0 C reference: the table value)
TypeK.temperature(12.209) # 300.0   (C, ice-bath reference)
TypeK.seebeck(300.0)      # 0.0416  (mV per C)
TypeK.range               # (-270.0, 1372.0)

冷接点補償

熱電対は2つの接点間の差を測定します。参照テーブルは冷接点が0℃にあることを前提としています。メーターの端子が室温にある場合、テーブルを直接参照すると誤差が生じます:

from thermocouple_its90 import TypeK

# Meter reads 4.096 mV, terminals at 25 C:
TypeK.temperature(4.096)                  # 100.0 C  <- naive lookup, wrong
TypeK.temperature(4.096, reference=25.0)  # 124.3 C  <- the actual answer

8種類すべてのタイプが同じ方法で動作します:

from thermocouple_its90 import get, letters

letters()                       # ['B', 'E', 'J', 'K', 'N', 'R', 'S', 'T']
get("s").emf(1400.0)            # 14.373 mV
get("t").temperature(-4.648)    # -149.98 C (cryogenic ranges included)

精度:主張ではなく検証に基づく

  • 順方向参照関数は、NIST参照テーブルの全12,026点の1度刻みの値を、0.001 mVの印刷丸め誤差内で再現します。完全な比較は、プッシュのたびにCIで実行されます(tests/test_full_tables.py)。

  • 逆変換は、公開されているITS-90逆多項式を初期値として使用し、正確な順方向関数に対するニュートン反復法で精密化します。往復変換は、逆多項式の0.02〜0.06℃の誤差帯域ではなく、マイクロ度単位で一致します。

  • K、E、Tタイプは、低温全域(-270℃まで)で逆変換が可能です。これは公開されている逆多項式の適用範囲を超えています。

  • Bタイプは物理に基づいて処理されます:その起電力は室温付近で非単調であるため、0.291 mV未満(約250℃以下)での逆変換は、2つの可能な答えのいずれかを返すのではなく、説明付きで拒否されます。

AIエージェント向けMCPサーバー

言語モデルは熱電対多項式を誤って記憶することがあります。このパッケージにはModel Context Protocolサーバーが同梱されており、エージェントは記憶に頼る代わりに検証済みの実装を呼び出すことができます:

pip install "thermocouple-its90[mcp]"
claude mcp add thermocouple -- thermocouple-its90-mcp

ツール:thermocouple_to_temperaturethermocouple_to_emfthermocouple_types

データの出所とライセンス

係数は、NIST ITS-90熱電対データベース(SRD 60、https://its90.nist.gov/)から手入力ではなく機械的に解析されました。このデータベースは、NISTモノグラフ175(Burns、Scroger、Strouse、Croarkin、Guthrie、1993年)を再現したものです。これは米国政府の出版物であり、著作権の対象外です。正規のデータセットはdata/its90.jsonに格納されており、_data.pyはそこから生成されます。両者に乖離が生じた場合、CIが失敗します。コードはMITライセンスです。

関連情報

引用

このライブラリを学術研究で使用する場合は、コンセプトDOI https://doi.org/10.5281/zenodo.22036393 を通じて引用してください。このDOIは常に最新リリースに解決されます(CITATION.cffを参照)。また、基礎となる参考文献も併せて引用してください:Burns, G. W., Scroger, M. G., Strouse, G. F., Croarkin, M. C., & Guthrie, W. F. (1993). Temperature-electromotive force reference functions and tables for the letter-designated thermocouple types based on the ITS-90 (NIST Monograph 175). NIST.

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    MCP server for converting cooking measurements (volume, weight, temperature) between common units like ml, cup, g, oz, and Celsius/Fahrenheit.
    3
    1
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    An MCP server for controlling lab instruments (oscilloscopes, signal generators, etc.) via standardized interfaces like USBTMC, RS-232, and LAN.
    100
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    This MCP server enables AI clients to calculate the boiling temperature of water at a given absolute pressure using the IAPWS-IF97 standard, separating natural-language reasoning from authoritative scientific computation.
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dfieser/thermocouple-its90'

If you have feedback or need assistance with the MCP directory API, please join our Discord server