METFLOW社 UVPデータファイル読み込みプログラム

METFLOW社のUVP計測装置(MS-DOS, WindowsNT の古いやつ)のデータファイル .dat 形式を扱うプログラムのライブラリです.

標準的な.datファイルを読み込むプログラムです. マルチプレクサなどには非対応.

Python

Pythonによるプログラムです.
(Python3で動作確認,Python2以前では検証していません.)

dat2img.py
.dat 形式のファイルを読み込んで,画像にカラーマップを表示します.

C/C++言語

Headerヘッダファイル

.datファイルのヘッダ情報を構造体で表現.
最近のOSでは,intなどのサイズが異なっているので,int16_t などを使用.
Windows10 x64 で動作確認.

ヘッダ表示+データ本体出力(csv, console)

(上記ヘッダファイルが必要.)

dat2csv.cpp
.dat 形式のファイルを読み込んで,coutまたはcsvファイルに書き出す.
出力例:
-------------- header --------------------
chn_dx =, 740, um,Channel Distance
p_ch_s =, 22, mm,Window start position
p_ch_e =, 117, mm,Window end Position
c_sound =, 1480, m/s,Sound velocity
sto_int =, 0,,Storing interval
rf_g_s =, 8,,RF gain start
rf_g_e =, 9,,RF gain end
emis_v =, 150, V,Emission voltage
scr_scl =, 2,,Screen scale
trg_mod =, 1,,Trigger mode 0=off 1=Man 3=Pos 5=Neg
aut_mod =, 0,,Auto record mode 0=off 1=HD 2=FD
scr_typ =, 0,,Display type 0=Normal 1=Pos 2=Pos double 3=Neg 4=Neg double
frq_bas =, 4000, kHz, Basic frequency of ultrsdound
frq_prf =, 1784, Hz,Pulse repetition frequency f_prf
mstime  =, 73, ms,Measuring time
frq_rep =, 0,, number of repetition for Doppler calculation
cyc_pls =, 64,, Cycles per pulse
n_level =, 16,,Noise level
no_block =, 19,
no_prof_block =, 1024,
memo =, [],
-----------------------------------------
Raw profiles
x index, x(mm), t index,0,1,2, ...
,,t (sec),0,0.073,0.146, ...